From 811167944e671686459c6296c738b75607d2456b Mon Sep 17 00:00:00 2001 From: trashmasteruni Date: Sat, 25 Apr 2026 13:36:44 +0200 Subject: [PATCH] so much event updating --- events/_events.info | 303 +- events/accolade_events.txt | 739 - .../coronation_activity/coronation_events.txt | 103 +- .../coronation_events_1.txt | 1048 +- .../coronation_events_6.txt | 1077 +- .../hold_court_events_general.txt | 112 +- .../pilgrimage_activity/pilgrimage_events.txt | 48 +- .../tour_grounds_events_chad.txt | 6 +- .../tour_phase_cultural_festival.txt | 34 +- .../tour_activity/tour_travel_events.txt | 9 +- .../artifacts/historical_artifacts_events.txt | 257 +- events/birth_events.txt | 4625 --- events/blackmail_events.txt | 292 - events/bookmark_events.txt | 2316 -- events/bp1_dan_events.txt | 4362 --- events/court_events/01_ep3_court_events_3.txt | 49 +- events/court_events/court_events_general.txt | 48 +- .../court_events/court_events_general_1.txt | 10 +- events/court_maintenance_events.txt | 8 +- .../decisions_events/east_europe_events.txt | 36 +- .../iberia_north_africa_events.txt | 6 + .../mpo_greatest_of_khans_events.txt | 6 +- .../roman_restoration_events.txt | 6 + events/dlc/ach/ach_coronation_events.txt | 48 +- events/dlc/ach/ach_maintenance_events.txt | 720 - events/dlc/bp3/bp3_journey_events.txt | 1 - events/dlc/bp3/bp3_mapmaking.txt | 2793 -- events/dlc/bp3/bp3_roaming_events.txt | 2828 -- events/dlc/bp3/bp3_survey_events.txt | 4489 --- events/dlc/ce1/epidemic_events.txt | 30 +- events/dlc/ce1/epidemic_events_2.txt | 951 - events/dlc/ce1/legend_events.txt | 790 - events/dlc/ce1/legend_spread_events_nick.txt | 6 +- .../dlc/ce1/legend_spread_events_veronica.txt | 3067 -- events/dlc/ce1/legitimacy_events.txt | 32 - events/dlc/ce1/physician_epidemic_events.txt | 1479 - .../ep1/ep1_character_interaction_events.txt | 719 - events/dlc/ep1/ep1_court_position_events.txt | 552 - events/dlc/ep1/ep1_flavor_events.txt | 6004 ---- .../dlc/ep1/ep1_fund_inspiration_events.txt | 46 +- events/dlc/ep2/ep2_accolade_events.txt | 1200 - events/dlc/ep2/ep2_tournament_events.txt | 784 +- .../ep2_bloody_wedding_events.txt | 1845 -- .../ep2/wedding_events/ep2_wedding_events.txt | 23494 --------------- .../ep2_wedding_events_ewan.txt | 24 +- events/dlc/ep3/ep3_contract_events.txt | 10151 ------- events/dlc/ep3/ep3_decisions_events.txt | 91 +- events/dlc/ep3/ep3_emperor_yearly_2.txt | 228 +- events/dlc/ep3/ep3_emperor_yearly_8.txt | 2206 -- events/dlc/ep3/ep3_governor_yearly_3.txt | 88 +- events/dlc/ep3/ep3_interactions_events.txt | 142 +- events/dlc/ep3/ep3_laamp_decision_events.txt | 22296 --------------- events/dlc/ep3/ep3_laamp_events.txt | 9172 ------ events/dlc/ep3/ep3_laamp_events_8.txt | 3979 --- events/dlc/ep3/ep3_laamp_flavor_oltner.txt | 328 - .../dlc/ep3/ep3_laamp_flavour_ewan_events.txt | 23648 ---------------- .../dlc/ep3/ep3_roman_restoration_events.txt | 521 - .../ep3_story_cycle_admin_eunuch_events.txt | 2 + ...ep3_story_cycle_grand_ambitions_events.txt | 1 + ...ory_cycle_harrying_of_the_north_events.txt | 4688 --- .../ep3_story_cycle_violet_poet_events.txt | 4 + events/dlc/ep3/ep3_wedding_events.txt | 2616 -- events/dlc/fp1/fp1_jomsvikings_events.txt | 2222 -- events/dlc/fp1/fp1_major_decision_events.txt | 1423 - .../fp1_scandinavian_adventurer_events.txt | 1113 - events/dlc/fp1/fp1_shieldmaiden_events.txt | 1426 - events/dlc/fp1/fp1_trade_events.txt | 2494 -- events/dlc/fp1/fp1_yearly_events.txt | 34 +- events/dlc/fp1/fp1_yearly_events_oltner.txt | 2687 -- events/dlc/fp2/fp2_el_cid_events.txt | 552 - events/dlc/fp2/fp2_lyonese_monk_events.txt | 4800 ---- events/dlc/fp2/fp2_other_decision_events.txt | 2572 -- events/dlc/fp2/fp2_struggle_events.txt | 50 +- events/dlc/fp2/fp2_yearly_events.txt | 711 +- events/dlc/fp3/fp3_heritage_events.txt | 6 +- events/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 - 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 --- events/dlc/fp3/fp3_yearly_frontier_chains.txt | 824 - events/dlc/mpo/court_astrologer_events.txt | 307 - events/dlc/mpo/mpo_decisions_events.txt | 9095 ------ events/dlc/mpo/mpo_events_ariana.txt | 4812 ---- events/dlc/mpo/mpo_events_tova.txt | 1870 -- events/dlc/mpo/mpo_flavor_events_settled.txt | 453 - events/dlc/mpo/mpo_jamukha_flavor_events.txt | 450 - events/dlc/mpo/mpo_migration_events.txt | 4573 --- .../dlc/mpo/mpo_migration_travel_events.txt | 8 + events/dlc/mpo/mpo_nomad_events_1.txt | 8980 ------ events/dlc/mpo/mpo_nomads_flavour_events.txt | 5743 ---- .../mpo_story_cycle_temujin_flavor_events.txt | 835 - events/error_suppression_events.txt | 198 - events/game_rule_events.txt | 7419 ----- events/global_religion_events.txt | 1328 - events/harm_events.txt | 9668 ------- events/health_events.txt | 12008 -------- events/jester_stress_relief_events.txt | 1982 -- .../learning_medicine_events.txt | 35 +- .../learning_scholarship_events.txt | 4559 --- .../learning_theology_events.txt | 2 +- .../historical_commander_trait_events.txt | 884 - .../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 - events/pregnancy_events.txt | 1735 -- events/realm_maintenance_events.txt | 423 - .../faith_conversion_events.txt | 469 - .../religion_events/faith_creation_events.txt | 668 - events/religion_events/heresy_events.txt | 1355 - events/religion_events/holy_order_events.txt | 1865 -- .../religion_events/local_shrine_events.txt | 795 - .../religious_decision_events.txt | 3028 -- .../religious_interaction_events.txt | 2824 -- .../court_scheme_ongoing_events.txt | 5 +- .../governor_contract_events.txt | 69 + events/siege_events.txt | 1368 - events/single_combat_events.txt | 11831 -------- .../mpo_the_great_steppe_events.txt | 425 - events/test_events/debug.txt | 679 + events/test_events/insult_poetry.txt | 104 - events/test_events/poetry_events.txt | 317 - events/title_events.txt | 91 +- events/travel_events/travel_events_james.txt | 25 +- events/witch_events.txt | 95 +- events/yearly_events/bp1_yearly_james.txt | 24 +- events/yearly_events/court_yearly_events.txt | 25 +- 135 files changed, 4885 insertions(+), 297691 deletions(-) delete mode 100644 events/birth_events.txt delete mode 100644 events/blackmail_events.txt delete mode 100644 events/bookmark_events.txt delete mode 100644 events/bp1_dan_events.txt delete mode 100644 events/dlc/ach/ach_maintenance_events.txt delete mode 100644 events/dlc/bp3/bp3_mapmaking.txt delete mode 100644 events/dlc/bp3/bp3_roaming_events.txt delete mode 100644 events/dlc/bp3/bp3_survey_events.txt delete mode 100644 events/dlc/ce1/epidemic_events_2.txt delete mode 100644 events/dlc/ce1/legend_events.txt delete mode 100644 events/dlc/ce1/legend_spread_events_veronica.txt delete mode 100644 events/dlc/ce1/legitimacy_events.txt delete mode 100644 events/dlc/ce1/physician_epidemic_events.txt delete mode 100644 events/dlc/ep1/ep1_character_interaction_events.txt delete mode 100644 events/dlc/ep1/ep1_court_position_events.txt delete mode 100644 events/dlc/ep1/ep1_flavor_events.txt delete mode 100644 events/dlc/ep2/ep2_accolade_events.txt delete mode 100644 events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt delete mode 100644 events/dlc/ep2/wedding_events/ep2_wedding_events.txt delete mode 100644 events/dlc/ep3/ep3_contract_events.txt delete mode 100644 events/dlc/ep3/ep3_emperor_yearly_8.txt delete mode 100644 events/dlc/ep3/ep3_laamp_decision_events.txt delete mode 100644 events/dlc/ep3/ep3_laamp_events.txt delete mode 100644 events/dlc/ep3/ep3_laamp_events_8.txt delete mode 100644 events/dlc/ep3/ep3_laamp_flavor_oltner.txt delete mode 100644 events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt delete mode 100644 events/dlc/ep3/ep3_roman_restoration_events.txt delete mode 100644 events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt delete mode 100644 events/dlc/ep3/ep3_wedding_events.txt delete mode 100644 events/dlc/fp1/fp1_jomsvikings_events.txt delete mode 100644 events/dlc/fp1/fp1_major_decision_events.txt delete mode 100644 events/dlc/fp1/fp1_scandinavian_adventurer_events.txt delete mode 100644 events/dlc/fp1/fp1_shieldmaiden_events.txt delete mode 100644 events/dlc/fp1/fp1_trade_events.txt delete mode 100644 events/dlc/fp1/fp1_yearly_events_oltner.txt delete mode 100644 events/dlc/fp2/fp2_el_cid_events.txt delete mode 100644 events/dlc/fp2/fp2_lyonese_monk_events.txt delete mode 100644 events/dlc/fp2/fp2_other_decision_events.txt delete mode 100644 events/dlc/fp3/fp3_misc_decision_events.txt delete mode 100644 events/dlc/fp3/fp3_religious_decision_events.txt delete mode 100644 events/dlc/fp3/fp3_scholarship_events.txt delete mode 100644 events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt delete mode 100644 events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt delete mode 100644 events/dlc/fp3/fp3_struggle_events.txt delete mode 100644 events/dlc/fp3/fp3_tax_collector_events_ola.txt delete mode 100644 events/dlc/fp3/fp3_tax_collector_flavor_events.txt delete mode 100644 events/dlc/fp3/fp3_yearly_events_eren.txt delete mode 100644 events/dlc/fp3/fp3_yearly_events_hugo.txt delete mode 100644 events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt delete mode 100644 events/dlc/fp3/fp3_yearly_frontier_chains.txt delete mode 100644 events/dlc/mpo/court_astrologer_events.txt delete mode 100644 events/dlc/mpo/mpo_decisions_events.txt delete mode 100644 events/dlc/mpo/mpo_events_ariana.txt delete mode 100644 events/dlc/mpo/mpo_events_tova.txt delete mode 100644 events/dlc/mpo/mpo_flavor_events_settled.txt delete mode 100644 events/dlc/mpo/mpo_jamukha_flavor_events.txt delete mode 100644 events/dlc/mpo/mpo_migration_events.txt delete mode 100644 events/dlc/mpo/mpo_nomad_events_1.txt delete mode 100644 events/dlc/mpo/mpo_nomads_flavour_events.txt delete mode 100644 events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt delete mode 100644 events/error_suppression_events.txt delete mode 100644 events/game_rule_events.txt delete mode 100644 events/global_religion_events.txt delete mode 100644 events/harm_events.txt delete mode 100644 events/health_events.txt delete mode 100644 events/jester_stress_relief_events.txt delete mode 100644 events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt delete mode 100644 events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt delete mode 100644 events/lifestyles/warfare_lifestyle/martial_authority_events.txt delete mode 100644 events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt delete mode 100644 events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt delete mode 100644 events/lifestyles/warfare_lifestyle/martial_strategy_events.txt delete mode 100644 events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt delete mode 100644 events/pregnancy_events.txt delete mode 100644 events/realm_maintenance_events.txt delete mode 100644 events/religion_events/faith_conversion_events.txt delete mode 100644 events/religion_events/faith_creation_events.txt delete mode 100644 events/religion_events/heresy_events.txt delete mode 100644 events/religion_events/holy_order_events.txt delete mode 100644 events/religion_events/local_shrine_events.txt delete mode 100644 events/religion_events/religious_decision_events.txt delete mode 100644 events/religion_events/religious_interaction_events.txt delete mode 100644 events/siege_events.txt delete mode 100644 events/single_combat_events.txt delete mode 100644 events/situation_events/mpo_the_great_steppe_events.txt delete mode 100644 events/test_events/insult_poetry.txt delete mode 100644 events/test_events/poetry_events.txt diff --git a/events/_events.info b/events/_events.info index f2d415fe..631d2eb2 100644 --- a/events/_events.info +++ b/events/_events.info @@ -1,14 +1,49 @@ -=== Structure === + Structure === -Note: this is very very incomplete... +Note: May not be exhaustive. -event_namespace.42 = { - type = character_event/letter_event/court_event/activity_event # Default to character, what type of event this is - scope = scope_type # Optional, defaults to character, will make this event fire with a different expected root scope. none can be used to have no scopes set up. - window = window_name # Optional, what special event file and widget in gui/event_windows should this event use, only used for character events +Event IDs are namespaced. In each events file, define a namespace once at the top: + namespace = my_events +Then define events as: + my_events.1001 = { ... } - # If you have a cooldown, the recipient will get a variable saved with that duration. The variable name will be the event ID - # Anything that checks that an event is legal to fire will also check that the recipient doesn't have that variable +my_events.1001 = { + type = character_event/letter_event/court_event/activity_event # Optional, defaults to character_event + scope = scope_type # Overrides the events root scope. Optional, defaults to character scope. Use scope = none for no root scope, scope = artifact for events centered around artifacts, etc. + + # Optional custom event window name. + # For character/letter events this is the popup window in gui/event_windows. + # For activity events this is used by activity event inserts. + window = window_name + # anonymous_letter_event - letter_event, but without sender portrait and sigil widget + # big_event_window - used for task_contracts, bookmark events, decision outcomes, story cycles, black plague, etc. + # character_event - default + # duel_event - used in single combat events + # fullscreen_event - use splash screen queue + # letter_event - used for responses to character_interactions, between characters that are not in the same location + # scheme_conclusion_window - big_event_window, however we always use one of the sub-types: + # scheme_failed_event - scheme_conclusion_window, but with failure header + # scheme_preparations_event - scheme_conclusion_window, but with scheme_preparation widget + # scheme_successful_event - scheme_conclusion_window, but with successful header + # scheme_conclusion_event_no_header + # scheme_conclusion_window, but without header + #visit_settlement_window - big_event_window, used by laamp visit settlement decision + + # Basic event text/effects (commonly used) + title = my_event_title # Dynamic Description syntax, see bottom of document + desc = my_event_desc # Dynamic Description syntax, see bottom of document + trigger = { ... } + immediate = { ... } + after = { ... } + hidden = yes/no # If yes, no event window is shown + major = yes/no + major_trigger = { ... } + + # Non-character scoped events generally need to be hidden or major. + + # If you have a cooldown, the recipient root gets a saved variable with that duration. + # The variable name is based on the event ID. + # Trigger legality checks include cooldown. cooldown = { days/weeks/months/years = script value } @@ -23,89 +58,112 @@ event_namespace.42 = { lower_left_portrait = X lower_center_portrait = X lower_right_portrait = X - sender = X # for letter events, required + sender = X # required for letter events # X can be one of: X = event target X = { character = event target - trigger = ... # optional, a trigger saying whether this portrait should be visible, in the scope of the portrait character, the event scope is accessible as root scope - animation = animation name # optional, the animation to show for this portrait. It's used if no triggered animations pass their trigger. The default animation will be used if nothing is this item is not specified. - scripted_animation = key_of_scripted_animation # optional, instead of 'animation' you can also define a 'scripted_animation' + trigger = ... # optional, controls visibility for this portrait in the scope of the portrait character + animation = animation name # optional default animation, used if no triggered animations pass their trigger. See animations.txt for all possible animations, in-game: toggle event tools in the event or open portrait editor through the console. + scripted_animation = key_of_scripted_animation # optional alternative to animation - # A list of triggered animations. The first triggered animation that passes the trigger check will be used. + # First triggered animation whose trigger passes is used. triggered_animation = { trigger = ... animation = animation name - # Instead of 'animation' you can also define a 'scripted_animation' + # Or use scripted_animation instead of animation scripted_animation = key_of_scripted_animation - - ### brief: camera ( database key, optional ) - # A camera type defined for a triggered animation will override the default - # camera defined for the event portrait if that animation is chosen - # - camera = camera_name + camera = camera_name # optional, overrides portrait camera when chosen } triggered_animation = ... - # A list of triggered outfits. The first triggered otfit that passes the trigger check will be used. + # First triggered outfit whose trigger passes is used. triggered_outfit = { trigger = ... outfit_tags = ... remove_default_outfit = ... - hide_info = ... } triggered_outfit = ... - # Override camera to be used instead of the normal event ones + # Optional portrait behavior toggles camera = camera_key + override_imprisonment_visuals = yes/no + animate_if_dead = yes/no - outfit_tags = { tag1 tag2 } # Specifies outfit tags for this portrait in ascending priority (i.e. tag2 will "override" tag1 here if anything with tag2 is found in a specific portrait modifier category) - remove_default_outfit = yes/no # If set to yes, portrait modifier categories in which nothing matches any of the event tags will be disabled completely (no by default) - hide_info = yes/no # If set to yes, only the portrait will be shown, with no identifiable elements (no CoA, tooltips, clicks...) (no by default) + outfit_tags = { tag1 tag2 } # Specifies outfit tags for this portrait in ascending priority (i.e. tag2 will "override" tag1 here if anything with tag2 is found in a specific portrait modifier category) + remove_default_outfit = yes/no # If set to yes, portrait modifier categories in which nothing matches any of the event tags will be disabled completely (no by default) + hide_info = yes/no # If set to yes, only the portrait will be shown, with no identifiable elements (no CoA, tooltips, clicks...) (no by default) } # Specify an artifact to appear in the event on the specified position artifact = { target = event target position = lower_left_portrait/lower_center_portrait/lower_right_portrait - # Can't be in the same position as a portrait - trigger = ... # Optional, as for character portraits + # Cannot share the same position as a portrait + trigger = ... # Optional, as for portraits } - # This will be run if a queued event (or one triggered immediately from script) does not fulfil its trigger - # Events failing to trigger from an on-action will *not* run this + # Letter events should define an opening text + opening = my_letter_opening # Localization key or dynamic desc block + + # Court events may define court scene behavior + court_scene = { + button_position_character = scope:a_character + court_owner = scope:a_character + court_event_force_open = yes/no + show_timeout_info = yes/no + should_pause_time = yes/no + roles = { + scope:a_character = { + role = some_court_scene_role # or group = some_court_scene_group + animation = some_animation + scripted_animation = some_scripted_animation + } + } + } + + # Runs if a queued/instant event fails trigger checks. + # Events selected from on_actions are filtered by validity before queuing, so this is typically not run for that path. on_trigger_fail = { some effect } - # Specify custom widgets to embed in the event. See section about Custom Widgets below. + # Specify custom widgets to embed in the event. See Custom Widgets below. widgets = { widget = { - # Trigger that controls the availability of the widget. Scope: same as the event, after immediate effect. Default: always = yes + # Scope: event scope after immediate effect. Default: always = yes is_shown = {} - # Name of the widget to use. Must be at the path /.gui + # Widget file at /.gui gui = "" - # Name of the widget where this custome widget will be insert + # Parent container widget name in the event window container = "" - # Some widgets require a custom controller (see below). Default: default + + # Controller syntax: + # Simple form: controller = - # Effect to set up the scope as required by the controller. Scope: same as the event, after immediate effect, doesn't modify the event scope, though. Default: {} + # Structured form (used by some controllers, e.g. text): + # controller = { + # type = + # data = { ... } + # } + + # Optional scope setup effect for controller expectations setup_scope = {} } } - widget = { ... } # alternative syntax for a single widget. Follows the same info as the widget in the widgets parameter + widget = { ... } # alternative syntax for one widget option = { # An option the player/AI can pick - # Localization key for the event option button text - name = X + # Localization key or dynamic name block + name = X # Dynamic Description syntax, see bottom of document - # The effects that will be run when picking the options. Written directly here with no label + # Effects run when this option is picked (inline, no label) X.. - # A trigger that has to be fulfilled for this option to be valid. + # Trigger required for option to be valid trigger = {} - # If the event is invalid, but this trigger is valid, then the option will be shown (but disabled). + # If the option is invalid, but this trigger is valid, then the option will be shown (but disabled). # This behavior is also influenced by the EVENT_OPTIONS_SHOWN_HIDE_UNAVAILABLE or SCHEME_PREPARATION_OPTIONS_SHOWN_HIDE_UNAVAILABLE defines depending on event type. show_as_unavailable = {} @@ -113,9 +171,19 @@ event_namespace.42 = { highlight_portrait = scope:a_character reason = # Special reason for why this option is unlocked, can be any arbitrary string, is be checked in the UI to show special by reason + skill = diplomacy/martial/stewardship/intrigue/learning/prowess # Marks this option as skill-relevant in unlock reason UI (if shown); you still have to specify the skill and level in the trigger to unlock it + trait = some_trait # Marks this option as trait-relevant in unlock reason UI (if shown); you still have to specify the trait in the trigger to unlock it - # Parameters to impact the way ai-characters pick options to resolve their events - # We have 2 mutually exclusive parameters; ai_chance, and ai_will_select where the only difference is the syntax for calculating the value + # Misc option behavior + show_unlock_reason = yes/no # Controls whether unlock reason UI is shown for this option + is_cancel_option = yes/no # Marks this option as a cancel/back-out style option (used by some widgets/controllers) + clicksound = "sound_event" # Sound to play when selecting this option + fallback = yes/no # If no regular options are valid, fallback options are considered + exclusive = yes/no # If any exclusive option is valid, non-exclusive options are ignored + + # Parameters to impact the way ai-characters pick options to resolve their events. + # We have 2 mutually exclusive parameters; ai_chance, and ai_will_select where the only difference is the syntax for calculating the value. + # In practice if both are present, ai_will_select is used. ai_chance = { # See common/scripted_modifiers/_scripted_modifiers.info for more details base = 10 modifier = { @@ -145,20 +213,20 @@ event_namespace.42 = { } } - theme = "" # Theme to use in the event. For a list, check: 00_event_themes.txt - override_background = { # A background that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + theme = "" # Theme to use in the event. For a list, check: 00_event_themes.txt + override_background = { # A background that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } - override_transition = { # A transition that can be shown when the event pops up, before the event options and backgrounds. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_transition = { # A transition that can be shown when the event pops up, before the event options and backgrounds. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } - override_effect_2d = { # A 2d effect that can be put on top of the background. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_effect_2d = { # A 2d effect that can be put on top of the background. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # key to the effect } - override_icon = { # An icon that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_icon = { # An icon that can be shown when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Path to the texture } @@ -166,10 +234,11 @@ event_namespace.42 = { trigger = {} reference = "" } - override_sound = { # A sound that can be played when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones inthe theme will be checked after. + override_sound = { # A sound that can be played when the event pops up. This overrides the theme one. In case that there are multiples the first one that fits the trigger will be the one selected. In case none fits the ones in the theme will be checked after. trigger = {} # Receives the event scope to check if it's valid. reference = "" # Reference of the sound } + orphan = yes # The game will not log an error about this event being unreferenced. Useful for debug events } @@ -189,7 +258,139 @@ Controller Type | Data Context Name | Notes ------------------------+----------------------------------------+------------------------------------------------------------------------------------------------------------- default | EventWindowWidget | Default controller, no special behavior name_character | EventWindowWidgetNameCharacter | Changes a character's name. Scope must have the name_character_target saved scope. -text | EventWindowWidgetEnterText | Saves some text onto the character. +text | EventWindowWidgetEnterText | Saves some text onto the character. May use controller = { type = text data = { ... } } and setup_scope for text_target. event_chain_progress | EventWindowWidgetChainProgress | Displays progress through an event chain, needs event_chain_length and event_chain_progress scope values set struggle_info | EventWindowCustomWidgetStruggleInfo | Displays information for the struggle, needs "start" scope value set situation_info | EventWindowCustomWidgetSituationInfo | Displays information for the situation + +=== Dynamic Description Appendix === + +Dynamic descriptions are supported by event `title`, `desc`, `opening`, and option `name` (with special notes for option names below). +They resolve localization keys at runtime using current event scopes. + +High-level behavior: +- A plain localization key is valid: + - `desc = my_event.desc` +- A block is also valid: + - `desc = { ... }` +- In blocks, entries are evaluated in script order. +- Each selected piece is appended to the final text with automatic spacing between pieces. +- Missing localization keys are logged as errors. + +Core block members (CDynamicDescription): + +1) `desc` +- Appends text to output. +- Accepts either a key or another nested dynamic description block. + +Example: + desc = { + desc = my_event.intro + desc = my_event.outro + } + +2) `triggered_desc` +- Conditional description node. +- Body may only contain: + - `trigger = { ... }` (optional; if omitted, always valid) + - `desc = ` or `desc = { ... }` +- If trigger passes, its `desc` content is appended. + +Example: + triggered_desc = { + trigger = { has_trait = brave } + desc = my_event.brave_line + } + +3) `first_valid` +- Checks child entries in order. +- Uses only the first child whose validity is true. +- Typical fallback pattern is placing a plain `desc = some_fallback_key` last. + +Example: + first_valid = { + triggered_desc = { + trigger = { has_trait = brave } + desc = my_event.brave + } + triggered_desc = { + trigger = { has_trait = craven } + desc = my_event.craven + } + desc = my_event.fallback + } + +4) `random_valid` +- Collects all valid children, then picks random entries from that set. +- Default picks: `count = 1` +- Optional: `count = N` picks up to N unique valid children (no replacement). +- If fewer than N are valid, all valid children are used. +- Chosen entries are appended by the random order. + +Example: + random_valid = { + count = 2 + desc = my_event.random_a + triggered_desc = { + trigger = { has_trait = patient } + desc = my_event.random_b + } + desc = my_event.random_c + } + +5) `switch` +- Value-based branching for description selection. +- Structure: + - `trigger = ` + - ` = ` + - `fallback = ` (optional) +- First matching case is used. +- If no case matches and no `fallback` exists, nothing is appended. +- Case values are written as keys/tokens that match what the switch trigger returns. + +Example: + switch = { + trigger = scope:rite_memory.var:rites_of_passage_type + flag:dueling_rite_memory = { desc = bp2_yearly.7029.desc_duel } + flag:scarification_rite_memory = { desc = bp2_yearly.7029.desc_scarification } + fallback = { desc = bp2_yearly.7029.desc } + } + +Composition and nesting: +- Nodes can be nested arbitrarily (`desc` in `desc`, `first_valid` inside `random_valid`, etc.). + +Option name specifics: +- Option names support two forms: + - `name = my_option_text_key` + - `name = { text = trigger = { ... } }` +- `trigger` inside `name = { ... }` gates whether that name candidate is available. +- Multiple `name = { ... }` blocks are allowed per option. + - If more than one candidate is valid, one valid candidate is chosen randomly. + - If none are valid, first defined candidate is used as fallback. +- Important limitation: name candidates are separate sibling `name` entries; you cannot nest multiple `name` nodes inside one `name` block. + +Known-good vanilla patterns to copy: +- Multi-chunk nested assembly with `random_valid`, `first_valid`, and `triggered_desc`: + - `game/events/board_game_events.txt` (e.g. event `board_games.0041`) + - `game/events/relations_events/adultery_events.txt` (e.g. event `adultery.4001`) +- Standard fallback chain in `first_valid`: + - `game/events/relations_events/adultery_events.txt` (e.g. event `adultery.1006`) +- Letter `opening` using dynamic desc block: + - `game/events/interaction_events/marriage_interaction_events.txt` (e.g. event `marriage_interaction.0001`) +- Dynamic description `switch`: + - `game/events/dlc/bp2/bp2_yearly_7.txt` (e.g. event `bp2_yearly.7029`) + +Practical authoring checklist: +- Always include a safe fallback path (`desc` fallback in `first_valid`, or `fallback` in `switch`). +- Keep localization keys flat and explicit; nesting controls selection, loc does the prose. +- When building long descriptions, split into semantic chunks and compose with nested blocks. +- Prefer `first_valid` for deterministic branching and `random_valid` for variation. +- For option names, prefer multiple gated `name` entries over overly complex single-entry nesting. + +COMMON GOTCHA WHEN BUILDING DYNAMIC DESCRIPTIONS, FOR INTERNAL DESIGNERS: If you're building a complex loc string that includes dialogue, it's common to end up with keys that contains an odd number of citation marks. In these cases you may need to escape the odd citation marks using double-backslash to pass the sanity checking git hook before you commit your work. E.g.: + +my_cool_event_desc.intro: "The guy says, \\"Hey " +my_cool_event_desc.intro.friend: "friend" +my_cool_event_desc.intro.buddy: "buddy" +my_cool_event_desc.intro.idiot: "idiot" +my_cool_event_desc.intro.outro: ", watch where you're going!\\" I pay him no mind and continue on my way." diff --git a/events/accolade_events.txt b/events/accolade_events.txt index 6128f83d..932ddfc1 100644 --- a/events/accolade_events.txt +++ b/events/accolade_events.txt @@ -150,742 +150,3 @@ accolade.0002 = { } } } - -#Accolade becomes idle -# by Jason Cantalini -accolade.0003 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_active - title = accolade.0003.accolade_becomes_idle.tt - custom_tooltip = accolade.0003.accolade_becomes_idle_effects.tt - } - } -} - -#Accolade succession with unchanged types -# by Jason Cantalini -accolade.0004 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_succession - title = accolade.0004.new_acclaimed_knight.tt - left_icon = scope:new_acclaimed_knight - custom_tooltip = accolade.0004.new_acclaimed_knight_name.tt - custom_tooltip = accolade.glory_loss.tt - } - } -} - -#Accolade succession with new secondary type -# by Jason Cantalini -accolade.0005 = { - hidden = yes - - trigger = { - has_dlc_feature = accolades - } - - immediate = { - send_interface_toast = { - type = msg_accolade_succession_toast - title = accolade.0005.new_acclaimed_knight_new_type.tt - left_icon = scope:new_acclaimed_knight - custom_tooltip = accolade.0005.new_accolade_type.tt - custom_tooltip = accolade.0005.new_acclaimed_knight_succeeds.tt - custom_tooltip = accolade.glory_loss.tt - } - } -} - -#Find Accolade Successor knight creation event -accolade.0006 = { - hidden = yes - - trigger = { - exists = scope:accolade_in_need - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - is_healthy = yes - save_temporary_scope_as = temp_knight - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:temp_knight - } - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - is_healthy = yes - save_temporary_scope_as = temp_knight - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:temp_knight - } - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - #if = { # Balance testing variables - # limit = { - # NOT = { - # exists = global_var:accolade_fail - # } - # } - # set_global_variable = { - # name = accolade_fail - # value = 1 - # } - #} - #else = { - # change_global_variable = { - # name = accolade_fail - # add = 1 - # } - #} - accolade_character_creation_effect = yes - } - #else = { # Balance testing variables - # if = { - # limit = { - # NOT = { - # exists = global_var:accolade_success - # } - # } - # set_global_variable = { - # name = accolade_success - # value = 1 - # } - # } - # else = { - # change_global_variable = { - # name = accolade_success - # add = 1 - # } - # } - #} - - if = { - limit = { - exists = scope:chosen_knight - } - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - # make sure the chosen knight is not already a courtier - scope:chosen_knight ?= { - NOT = { is_courtier_of = root } - } - } - add_courtier = scope:chosen_knight - } - - trigger_event = { - id = accolade.0007 - days = 1 - } - } - - } -} - -#Find Accolade Successor join event -accolade.0007 = { - hidden = yes - - immediate = { - if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - #SEND A TOAST NOTIFICATION - send_interface_toast = { - type = event_toast_effect_neutral - title = accolade.0007.notification - left_icon = scope:chosen_knight - custom_tooltip = accolade_call_acclaimed_knight_tooltip - hidden_effect = { - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - } - } - } - } - } - else = { - send_interface_message = { - type = event_accolade_bad_text - title = accolade.0007.notification_fail - desc = accolade_find_successor_fail_notification_tooltip - } - } - } -} - -#Call Acclaimed Knight first knight -accolade.0008 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_1 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_1 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight second knight -accolade.0009 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_2 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_2 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_clergy = no - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_clergy = no - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight third knight -accolade.0010 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_3 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_3 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight fourth knight -accolade.0011 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_4 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_4 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Acclaimed Knight fifth knight -accolade.0012 = { - hidden = yes - - trigger = { - exists = scope:empty_accolade_5 - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - immediate = { - # try to find a pool character first - scope:empty_accolade_5 = { - save_scope_as = accolade_in_need - } - every_courtier_or_guest = { - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - every_pool_character = { - province = root.capital_province - limit = { - ep2_can_be_accolade_successor_base_trigger = yes - can_be_knight_trigger = { ARMY_OWNER = root } - is_valid_successor_for_accolade = scope:accolade_in_need - faith = { - faith_hostility_level = { - target = root.faith - value <= faith_astray_level - } - } - is_clergy = no - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = this - } - is_healthy = yes - } - add_to_list = potential_knights - } - random_in_list = { - list = potential_knights - save_scope_as = chosen_knight - } - - # create a character if needed - if = { - limit = { - NOT = { exists = scope:chosen_knight } - } - accolade_character_creation_effect = yes - } - - - if = { - limit = { - can_recruit_character_to_court_trigger = { - RECRUITER = root - RECRUITEE = scope:chosen_knight - } - } - add_courtier = scope:chosen_knight - } - trigger_event = { - id = accolade.0013 - days = 1 - } - } -} - -#Call Accolade Knight join event -accolade.0013 = { - hidden = yes - - immediate = { - if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOR = { - government_has_flag = government_is_theocracy - has_character_flag = had_accolade_successor_notification - } - } - - #SEND A TOAST NOTIFICATION - send_interface_toast = { - type = event_toast_effect_neutral - title = accolade.0013.notification - left_icon = scope:chosen_knight - custom_tooltip = accolade_call_acclaimed_knight_tooltip - hidden_effect = { - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - set_knight_status = force - } - } - } - } - add_character_flag = { - flag = had_accolade_successor_notification - months = 6 - } - } - else_if = { - limit = { - exists = scope:accolade_in_need - exists = scope:chosen_knight - exists = root.capital_province - highest_held_title_tier >= tier_county - NOT = { government_has_flag = government_is_theocracy } - } - - #SEND A FEED NOTIFICATION FOR NEXT KNIGHTS - send_interface_message = { - type = event_accolade_good_with_text - title = accolade.0013.notification - desc = accolade_call_acclaimed_knight_tooltip - left_icon = scope:chosen_knight - scope:chosen_knight = { - if = { - limit = { - NOT = { is_knight_of = root } - } - set_knight_status = force - } - } - } - } - else = { - send_interface_message = { - type = event_accolade_bad_text - title = accolade.0013.notification_fail - desc = accolade_call_acclaimed_knight_fail_notification_tooltip - } - } - } -} diff --git a/events/activities/coronation_activity/coronation_events.txt b/events/activities/coronation_activity/coronation_events.txt index 7fc0bc96..8017382d 100644 --- a/events/activities/coronation_activity/coronation_events.txt +++ b/events/activities/coronation_activity/coronation_events.txt @@ -891,8 +891,6 @@ coronation_events.0100 = { trigger_event = coronation_events.0110 } } - # Cleanup of variable checks - remove_variable = learning_oath_1_university_exists if = { limit = { @@ -1071,7 +1069,30 @@ coronation_events.0110 = { } # Other - desc = coronation_events.0110.desc.fallback + triggered_desc = { + trigger = { + scope:host = { + ai_compassion >= low_positive_ai_value + } + } + desc = coronation_events.0110.desc.fallback_compassionate + } + triggered_desc = { + trigger = { + scope:host = { + ai_honor > low_positive_ai_value + } + } + desc = coronation_events.0110.desc.fallback_honorable + } + triggered_desc = { + trigger = { + scope:host = { + ai_energy < low_negative_ai_value + } + } + desc = coronation_events.0110.desc.fallback_feckless + } } desc = coronation_events.0110.desc.outro } @@ -1410,54 +1431,89 @@ coronation_events.0175 = { trigger = scope:find_oath flag:diplomacy_oath_1 = { coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_1 } + add_character_modifier = oath_of_alliances } flag:diplomacy_oath_2 = { coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_2 } + add_character_modifier = oath_of_children } flag:martial_oath_1 = { coronation_oath_reward_effect = { VARIABLE = martial_oath_1 } + add_character_modifier = oath_of_reconquest } flag:martial_oath_2 = { coronation_oath_reward_effect = { VARIABLE = martial_oath_2 } + add_character_modifier = oath_of_conquest } flag:stewardship_oath_1 = { coronation_oath_reward_effect = { VARIABLE = stewardship_oath_1 } + add_character_modifier = oath_of_peace } flag:stewardship_oath_2 = { coronation_oath_reward_effect = { VARIABLE = stewardship_oath_2 } + add_character_modifier = oath_of_buildings } flag:learning_oath_1 = { coronation_oath_reward_effect = { VARIABLE = learning_oath_1 } } flag:purge_pretenders_oath = { coronation_oath_reward_effect = { VARIABLE = purge_pretenders_oath } + add_character_modifier = oath_of_purge_pretenders + if = { + limit = { + government_has_flag = government_is_administrative + } + house ?= { + add_house_modifier = oath_of_purge_pretenders_house + } + } } flag:end_the_struggle_oath = { coronation_oath_reward_effect = { VARIABLE = end_the_struggle_oath } + add_character_modifier = oath_of_end_the_struggle } flag:greatest_hunter_oath = { coronation_oath_reward_effect = { VARIABLE = greatest_hunter_oath } + add_character_modifier = oath_greatest_hunter } flag:heir_preparation_oath = { coronation_oath_reward_effect = { VARIABLE = heir_preparation_oath } + add_character_modifier = oath_heir_preparation + + primary_heir ?= { + add_character_modifier = oath_heir_preparation_heir + } } flag:install_claimants_oath = { coronation_oath_reward_effect = { VARIABLE = install_claimants_oath } + add_character_modifier = oath_install_claimants } flag:mend_the_fracture_oath = { coronation_oath_reward_effect = { VARIABLE = mend_the_fracture_oath } + add_character_modifier = oath_mend_the_fracture + + culture = { + add_culture_tradition = oath_mend_the_fracture_tradition + } + var:mend_the_fracture_oath_target_culture = { + add_culture_tradition = oath_mend_the_fracture_tradition + } } flag:provide_for_the_warriors_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_warriors_oath } + add_character_modifier = oath_provide_for_the_warriors } flag:provide_for_the_faithful_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_faithful_oath } + add_character_modifier = oath_provide_for_the_faithful } flag:provide_for_the_poor_oath = { coronation_oath_reward_effect = { VARIABLE = provide_for_the_poor_oath } + add_character_modifier = oath_provide_for_the_poor } flag:repent_oath = { coronation_oath_reward_effect = { VARIABLE = repent_oath } + add_character_modifier = oath_repent } } } @@ -1801,11 +1857,7 @@ coronation_events.0205 = { 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 - } + scope:host.faith.religion = religion:christianity_religion } desc = coronation_events.0205.wawel } @@ -2110,6 +2162,7 @@ coronation_events.0205 = { geographical_region = graphical_india culture ?= { has_building_gfx = iranian_building_gfx } culture ?= { has_building_gfx = indian_building_gfx } + culture ?= { has_building_gfx = tibetan_building_gfx } AND = { geographical_region = world_europe_west_iberia faith ?= { religion = religion:islam_religion } @@ -2175,6 +2228,7 @@ coronation_events.0205 = { save_scope_as = value_target } activity_location = { save_scope_as = location } + activity_host = { save_scope_as = bg_override_char } #Guards for orderly east asian ceremonies in the palace if = { limit = { @@ -5019,19 +5073,19 @@ coronation_events.0312 = { #Guest ending event trigger = { exists = scope:high_magnificence } - desc = coronation_events.0310.desc.high_magnificence + desc = coronation_events.0312.desc.high_magnificence } triggered_desc = { trigger = { exists = scope:mid_magnificence } - desc = coronation_events.0310.desc.mid_magnificence + desc = coronation_events.0312.desc.mid_magnificence } triggered_desc = { trigger = { exists = scope:low_magnificence } - desc = coronation_events.0310.desc.low_magnificence + desc = coronation_events.0312.desc.low_magnificence } } } @@ -5170,3 +5224,30 @@ coronation_events.0400 = { # HoF supports anointment } } } + +#Invalidated from host's primary title change +coronation_events.0401 = { + type = letter_event + opening = { + desc = coronation_events.0401.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + highest_held_title_tier >= tier_kingdom + } + } + desc = coronation_events.0401.desc + } + desc = coronation_events.0401.desc_title_loss + } + } + + sender = scope:host + + option = { + name = coronation_events.0401.a + } +} diff --git a/events/activities/coronation_activity/coronation_events_1.txt b/events/activities/coronation_activity/coronation_events_1.txt index 5492d594..4eb49728 100644 --- a/events/activities/coronation_activity/coronation_events_1.txt +++ b/events/activities/coronation_activity/coronation_events_1.txt @@ -618,18 +618,15 @@ coronation_events.1004 = { } } save_scope_as = confidant + random_secret = { + limit = { + is_known_by = root + } + save_scope_as = secret_to_reveal + } } } - random_known_secret = { - limit = { - secret_owner = scope:confidant - is_known_by = root - } - - save_scope_as = secret_to_reveal - } - create_character = { template = intrigue_court_position_holder_template location = root.location @@ -1925,22 +1922,30 @@ coronation_events.1013 = { coronation_busy_effect = yes scope:activity.activity_host ?= { save_scope_as = host } - add_character_flag = { - flag = poor_activity_option_accident - years = 5 - } - + if = { limit = { - this = scope:host + scope:activity = { + has_activity_type = activity_coronation + } } - custom_tooltip = coronation_tt_negative - scope:activity = { activity_special_type_progression_negative = yes } - coronation_add_magnificence_log_effect = { - VALUE = flag:negative - CHAR = root + add_character_flag = { + flag = poor_activity_option_accident + years = 5 } + if = { + limit = { + this = scope:host + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + } } if = { limit = { @@ -2026,12 +2031,7 @@ coronation_events.1013 = { } } - if = { - limit = { - has_activity_intent = coronation_weaken_detractors - } - coronation_weaken_detractors_opinion_effect = yes - } + coronation_weaken_detractors_opinion_effect = yes stress_impact = { base = medium_stress_impact_loss @@ -2129,6 +2129,9 @@ coronation_events.1013 = { } if = { limit = { + scope:activity = { + has_activity_type = activity_coronation + } OR = { is_ai = no this = scope:activity.activity_host @@ -2200,6 +2203,9 @@ coronation_events.1013 = { add_prestige = minor_prestige_gain if = { limit = { + scope:activity = { + has_activity_type = activity_coronation + } OR = { is_ai = no this = scope:activity.activity_host @@ -2324,6 +2330,17 @@ coronation_events.1014 = { cooldown = { years = 5 } trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + } trigger_if = { limit = { scope:activity = { @@ -2377,37 +2394,18 @@ coronation_events.1014 = { } } - if = { - limit = { - is_ai = yes - } - scope:activity = { - random_attending_character = { - limit = { - is_ai = yes - is_adult = yes - NOT = { - this = root - this = scope:host - involved_activity.var:officiator ?= this - } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + this = scope:host + involved_activity.var:officiator ?= this } - save_scope_as = guest - } - } - } - else = { - scope:activity = { - random_attending_character = { - limit = { - is_ai = yes - is_adult = yes - NOT = { - this = root - } - } - save_scope_as = guest } + save_scope_as = guest } } } @@ -2492,8 +2490,8 @@ coronation_events.1014 = { activity_special_type_progression_tiny = yes every_attending_character = { limit = { - NOR = { this = scope:host } - this = root + this != scope:host + this != root } custom = custom.every_attending_character add_opinion = { @@ -2507,7 +2505,10 @@ coronation_events.1014 = { else = { scope:activity = { every_attending_character = { - limit = { NOT = { this = scope:host } } + limit = { + this != scope:host + this != root + } custom = custom.every_attending_character add_opinion = { target = root @@ -4773,6 +4774,9 @@ coronation_events.1022 = { } any_memory = { has_memory_category = positive + NOT = { + has_memory_type = had_sex + } has_memory_participant = root } } @@ -4801,6 +4805,9 @@ coronation_events.1022 = { } any_memory = { has_memory_category = positive + NOT = { + has_memory_type = had_sex + } has_memory_participant = root } is_ai = yes @@ -6359,7 +6366,21 @@ coronation_events.1026 = { } add_prestige = medium_prestige_gain - add_legitimacy = minor_legitimacy_gain + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + else_if = { + limit = { + government_has_flag = government_has_merit + } + change_merit = medium_merit_gain + } + else = { + add_prestige = minor_prestige_gain + } scope:activity = { every_attending_character = { @@ -7577,7 +7598,7 @@ coronation_events.1028 = { name = coronation_events.1028.b # Politely decline alternative blessings trigger = { - NOT = { + NOR = { has_trait = zealous has_trait = cynical } @@ -7614,96 +7635,6 @@ coronation_events.1028 = { } } - option = { - name = coronation_events.1028.c # Publicly rebuke the request - add_piety = major_piety_gain - scope:clergy_representative = { - add_opinion = { - target = root - modifier = insulted_opinion - opinion = -25 - } - } - if = { - limit = { - scope:clergy_representative = { is_courtier_of = root } - } - remove_courtier_or_guest = scope:clergy_representative - } - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:clergy_representative - this = root - } - has_trait = zealous - faith = root.faith - } - custom = coronation_events.1028.c.tt - add_opinion = { - target = root - modifier = pious_opinion - opinion = 20 - } - } - } - random = { - chance = { - value = 10 - if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_astray_level - } - } - } - add = 10 - } - else_if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_hostile_level - } - } - } - add = 20 - } - else_if = { - limit = { - scope:clergy_representative.faith = { - faith_hostility_level = { - target = root.faith - value >= faith_evil_level - } - } - } - add = 30 - } - } - add_trait = holy_warrior - } - - stress_impact = { - zealous = minor_stress_impact_loss - cynical = major_stress_impact_gain - compassionate = minor_stress_impact_gain - } - - ai_chance = { - base = 30 - ai_value_modifier = { - ai_zeal = high_chance_impact_positive_ai_value - ai_sociability = high_chance_impact_negative_ai_value - } - } - } - option = { name = coronation_events.1028.d # Evade the question entirely if = { @@ -7949,8 +7880,6 @@ coronation_events.1029 = { diplomacy < medium_skill_rating } - skill = diplomacy - custom_tooltip = coronation_tt_positive_tiny scope:activity = { activity_special_type_progression_tiny = yes @@ -8519,6 +8448,7 @@ coronation_events.1031 = { is_in_guest_subset = { name = detractor } has_trait = compassionate } + this != root } custom = every_attending_detractor_or_compassionate add_opinion = { @@ -9448,6 +9378,10 @@ coronation_events.1034 = { add_diplomacy_lifestyle_xp = minor_lifestyle_xp + add_merit_if_relevant_effect = { + MERIT = minor_merit_value + } + add_opinion = { target = scope:host modifier = respect_opinion @@ -10127,10 +10061,8 @@ coronation_events.1037 = { } # Ongoing plague any_sub_realm_county = { - any_county_province = { - any_province_epidemic = { - outbreak_intensity > minor - } + any_county_province_epidemic = { + outbreak_intensity > minor } } } @@ -10285,6 +10217,19 @@ coronation_events.1037 = { add_learning_lifestyle_xp = minor_lifestyle_xp } + if = { + limit = { + scope:respected_elder = { + num_of_relation_disciple < disciples_limit_value + } + } + set_elder_relation_effect = { + ELDER = scope:respected_elder + DISCIPLE = root + MERIT = minor_merit_gain + } + } + stress_impact = { zealous = minor_stress_impact_loss temperate = minor_stress_impact_loss @@ -10381,3 +10326,794 @@ coronation_events.1037 = { coronation_ready_effect = yes } } + +coronation_events.1038 = { + type = activity_event + title = coronation_events.1038.t + desc = coronation_events.1038.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = temple + } + + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = root + animation = emperor + camera = camera_event_center_pointing_right + } + + right_portrait = { + character = scope:rite_official + animation = hunting_knife_start + camera = camera_event_very_left + } + + trigger = { + has_title = title:h_china + scope:activity = { + any_attending_character = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + save_scope_as = rite_official + } + } + scope:rite_official = { + random_secret ?= { + limit = { + is_known_by = root + } + save_scope_as = secret + } + } + } + + option = { + name = coronation_events.1038.e # Cite the rites and leave + flavor = coronation_events.1038.e.flavor + trigger = { + has_trait = confucian_education + } + + add_piety = minor_piety_gain + + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_medium_value + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 35 + modifier = { + add = 25 + has_trait = confucian_education + } + modifier = { + add = 25 + has_trait = zealous + } + modifier = { + add = -15 + has_trait = cynical + } + } + } + + option = { + name = coronation_events.1038.a # Destroy rite official + trigger = { + scope:rite_official = { + is_in_guest_subset = { name = detractor } + } + } + scope:rite_official = { + add_stress = major_stress_gain + change_merit = medium_merit_loss + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -20 + } + } + + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + coronation_weaken_detractors_opinion_effect = yes + } + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = -20 + has_trait = compassionate + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 20 + has_activity_intent = coronation_weaken_detractors + } + } + } + + option = { + name = coronation_events.1038.b # Bond with rite official + + trigger = { + scope:rite_official = { + is_in_guest_subset = { name = detractor } + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + coronation_move_towards_supporter_effect = { CHARACTER = scope:rite_official } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + gregarious = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 30 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = callous + } + } + } + + option = { + name = coronation_events.1038.c # Use the situation to improve the ceremony + + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + coronation_impress_attendees_opinion_effect = yes + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 30 + has_trait = diligent + } + modifier = { + add = -20 + has_trait = lazy + } + } + + } + + option = { + name = coronation_events.1038.d # Make sure to mention your formidable house + + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + coronation_exalt_crown_opinion_effect = yes + } + + stress_impact = { + diligent = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 20 + has_trait = vengeful + } + modifier = { + add = -15 + has_trait = forgiving + } + modifier = { + add = -10 + has_trait = just + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} + +coronation_events.1039 = { + type = activity_event + title = coronation_events.1039.t + desc = coronation_events.1039.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = personality_zealous + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:supporter + animation = prayer + camera = camera_event_very_left_fov35 + } + + trigger = { + government_is_japanese_trigger = yes + is_independent_ruler = yes + trigger_if = { + limit = { tgp_realm_has_ceremonial_liege_trigger = yes } + tgp_has_ceremonial_liege_title_trigger = yes + } + scope:activity = { + any_guest_subset = { + name = supporter + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + save_scope_as = supporter + } + } + } + + option = { + name = coronation_events.1039.d # "Compose a poem on harmony." + flavor = coronation_events.1039.d.flavor + trigger = { + has_trait = lifestyle_poet + } + + save_scope_as = owner + custom_tooltip = coronation_events.1039.d.tt + hidden_effect_new_object = { + + get_artifact_quality_effect = yes + get_artifact_wealth_effect = yes + + scope:owner = { + create_artifact = { + name = coronation_events_1039_poem_name + creator = scope:owner + description = coronation_events_1039_poem_desc + visuals = scroll + type = miscellaneous + modifier = artifact_monthly_minor_prestige_1_modifier + modifier = artifact_attraction_opinion_1_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + + scope:newly_created_artifact = { + add_scaled_artifact_modifier_piety_effect = yes + add_scaled_artifact_modifier_majesty_effect = yes + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = -15 + has_trait = lazy + } + } + } + + option = { + name = coronation_events.1039.a # "The good of the realm." + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + just = minor_stress_impact_loss + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = just + } + modifier = { + add = -15 + has_trait = callous + } + modifier = { + add = -10 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1039.b # "I will make a statement." + + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = -20 + has_trait = humble + } + modifier = { + add = 15 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1039.c # "I will keep everything a secret." + add_intrigue_lifestyle_xp = major_lifestyle_xp + + stress_impact = { + deceitful = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = deceitful + } + modifier = { + add = -20 + has_trait = honest + } + modifier = { + add = 10 + has_trait = gregarious + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_trigger coronation_events_1040_neighbor_trigger = { + highest_held_title_tier <= root.highest_held_title_tier + is_tributary = no + is_at_war = no + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_trait = ambitious + has_trait = arrogant + has_trait = paranoid + } + opinion = { + target = root + value > -20 + } +} + +coronation_events.1040 = { + type = activity_event + title = coronation_events.1040.t + desc = coronation_events.1040.desc + theme = coronation_activity + cooldown = { years = 10 } + + override_background = { + reference = throne_room + } + + left_portrait = { + character = root + animation = chaplain + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:tributary_1 + animation = debating + camera = camera_event_center_pointing_left + } + + right_portrait = { + character = scope:tributary_2 + animation = personality_zealous + } + + trigger = { + has_government = mandala_government + scope:activity = { + any_guest_subset = { + name = supporter + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + } + } + any_neighboring_top_liege_realm_owner = { + coronation_events_1040_neighbor_trigger = yes + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + every_neighboring_top_liege_realm_owner = { + limit = { + coronation_events_1040_neighbor_trigger = yes + } + add_to_list = potential_tributaries + } + random_in_list = { + list = potential_tributaries + save_scope_as = tributary_1 + } + + if = { + limit = { + any_in_list = { + list = potential_tributaries + count > 1 + } + } + random_in_list = { + list = potential_tributaries + limit = { + NOT = { this = scope:tributary_1 } + } + save_scope_as = tributary_2 + } + } + } + + option = { # Special — Reuse one you found earlier + name = coronation_events.1040.special + + trigger = { + learning >= high_skill_rating + } + + add_learning_lifestyle_xp = medium_lifestyle_xp + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + if = { + limit = { exists = scope:tributary_2 } + scope:tributary_2 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = minor_stress_impact_loss + humble = medium_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 50 + learning >= high_skill_rating + } + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = 20 + has_trait = humble + } + modifier = { + add = -10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = diligent + } + } + } + + option = { # A — Spare no Expense + name = coronation_events.1040.a + + add_piety = massive_piety_loss + custom_tooltip = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + if = { + limit = { exists = scope:tributary_2 } + scope:tributary_2 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = -40 + has_trait = greedy + } + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = 20 + has_trait = arrogant + } + } + } + + option = { # B — Simple Mandala + name = coronation_events.1040.b + + add_piety = major_piety_loss + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + + if = { + limit = { exists = scope:tributary_1 } + scope:tributary_1 = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + add = -20 + has_trait = greedy + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = diligent + } + } + } + + option = { # C — That's wasteful + name = coronation_events.1040.c + + add_piety = minor_piety_gain + + stress_impact = { + diligent = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = -10 + has_trait = arrogant + } + modifier = { + add = -10 + has_trait = diligent + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} \ No newline at end of file diff --git a/events/activities/coronation_activity/coronation_events_6.txt b/events/activities/coronation_activity/coronation_events_6.txt index dd331a23..65827449 100644 --- a/events/activities/coronation_activity/coronation_events_6.txt +++ b/events/activities/coronation_activity/coronation_events_6.txt @@ -584,9 +584,7 @@ coronation_events.6000 = { every_vassal = { custom = custom.every_fellow_vassal limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -1106,7 +1104,7 @@ coronation_events.6010 = { has_title_law = confederation_elective_succession_law } highest_held_title_tier = tier_kingdom - any_neighboring_top_liege_realm_owner = { + any_land_neighboring_realm_with_tributaries_owner = { coronation_events_6010_assailant_trigger = yes } } @@ -1141,7 +1139,7 @@ coronation_events.6010 = { primary_heir ?= { save_scope_as = confederation_heir } - ordered_neighboring_top_liege_realm_owner = { + ordered_land_neighboring_realm_with_tributaries_owner = { order_by = { value = "opinion(scope:host)" multiply = -1 @@ -1521,9 +1519,7 @@ coronation_events.6010 = { } every_vassal = { limit = { - NOT = { - this = root - } + this != root } reverse_add_opinion = { target = root @@ -1546,9 +1542,7 @@ coronation_events.6010 = { every_vassal = { custom = custom.every_fellow_vassal limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -1607,9 +1601,7 @@ scripted_trigger coronation_events_6011_trigger = { has_variable = coronation_events_6011_liege } var:coronation_events_6011_liege = { - NOT = { - this = $CHARACTER$ - } + this != $CHARACTER$ } } prowess >= low_skill_rating @@ -1736,7 +1728,7 @@ coronation_events.6011 = { } } } - scope:warrior_youth = { + scope:warrior_youth ?= { add_character_flag = need_military_outfit } scope:loyal_vassal = { @@ -2287,7 +2279,7 @@ coronation_events.6011 = { limit = { has_activity_intent = coronation_exalt_crown } - dynasty = { + dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_value } custom_tooltip = improved_because_intent_tt @@ -2361,12 +2353,8 @@ scripted_trigger coronation_events_6020_foe_trigger = { } $CHARACTER$ = { NOR = { - var:coronation_war_foe ?= { - this = scope:foe_temp - } - var:coronation_war_foe_2 ?= { - this = scope:foe_temp - } + var:coronation_war_foe ?= scope:foe_temp + var:coronation_war_foe_2 ?= scope:foe_temp } } is_ruler = yes @@ -2374,9 +2362,7 @@ scripted_trigger coronation_events_6020_foe_trigger = { limit = { exists = scope:activity.var:officiator } - NOT = { - this = scope:activity.var:officiator - } + this != scope:activity.var:officiator } highest_held_title_tier >= tier_county current_military_strength <= $CHARACTER$.current_military_strength @@ -2459,11 +2445,11 @@ scripted_trigger coronation_events_6020_supporter_trigger = { ##Borders vassal to attack or independent ruler to attack OR = { any_neighboring_top_liege_realm_owner = { - coronation_events_6020_foe_trigger = {CHARACTER = scope:supporter_temp } + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } } root = { any_vassal = { - NOT = { this = scope:supporter_temp } + this != scope:supporter_temp coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } } } @@ -3216,7 +3202,7 @@ coronation_events.6020 = { name = detractor limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3230,7 +3216,7 @@ coronation_events.6020 = { } limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3243,7 +3229,7 @@ coronation_events.6020 = { } limit = { coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } - NOT = { this = scope:foe } + this != scope:foe } save_scope_as = foe_2 } @@ -3753,19 +3739,7 @@ coronation_events.6020 = { } } -scripted_effect coronation_events_6030_choose_courtesan_effect = { - had_sex_with_effect = { - CHARACTER = $COURTESAN$ - PREGNANCY_CHANCE = pregnancy_chance - } - - #Add to court - add_courtier = $COURTESAN$ - #Add progress to lover relation - set_relation_lover = { - reason = lover_coronation_courtesan - target = $COURTESAN$ - } +scripted_effect coronation_events_6030_accept_courtesan_effect = { if = { limit = { NOT = { @@ -3789,6 +3763,21 @@ scripted_effect coronation_events_6030_choose_courtesan_effect = { custom_tooltip = host_has_courtesan_hooks_tt } } +} + +scripted_effect coronation_events_6030_choose_courtesan_effect = { + had_sex_with_effect = { + CHARACTER = $COURTESAN$ + PREGNANCY_CHANCE = pregnancy_chance + } + + #Add to court + add_courtier = $COURTESAN$ + #Add progress to lover relation + set_relation_lover = { + reason = lover_coronation_courtesan + target = $COURTESAN$ + } $COURTESAN$ = { add_character_flag = { flag = picked_courtesan @@ -3838,9 +3827,7 @@ coronation_events.6030 = { trigger = { is_adult = yes is_playable_character = yes - NOT = { - this = involved_activity.activity_host - } + this != involved_activity.activity_host trigger_if = { limit = { is_ai = yes @@ -4037,16 +4024,16 @@ coronation_events.6030 = { location = root.location template = experienced_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = experienced_courtesan } create_character = { location = root.location template = funny_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture mother = scope:experienced_courtesan save_scope_as = funny_courtesan_1 } @@ -4057,8 +4044,8 @@ coronation_events.6030 = { location = root.location template = funny_courtesan_character gender = female - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture mother = scope:experienced_courtesan save_scope_as = funny_courtesan_2 } @@ -4097,8 +4084,8 @@ coronation_events.6030 = { location = root.location template = experienced_courtesan_character gender = male - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = experienced_courtesan } create_character = { @@ -4106,8 +4093,8 @@ coronation_events.6030 = { template = funny_courtesan_character gender = male father = scope:experienced_courtesan - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = funny_courtesan_1 } scope:funny_courtesan_1 = { @@ -4118,8 +4105,8 @@ coronation_events.6030 = { template = funny_courtesan_character gender = male father = scope:experienced_courtesan - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = funny_courtesan_2 } scope:funny_courtesan_2 = { @@ -4129,8 +4116,8 @@ coronation_events.6030 = { location = root.location template = cunning_courtesan_character gender = male - faith = scope:host.faith - culture = scope:host.culture + faith = location.faith + culture = location.culture save_scope_as = cunning_courtesan } scope:cunning_courtesan = { @@ -4242,6 +4229,7 @@ coronation_events.6030 = { add_prowess_skill = 1 coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:fearsome_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4284,6 +4272,7 @@ coronation_events.6030 = { add_intrigue_lifestyle_xp = medium_lifestyle_xp coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:cunning_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4326,6 +4315,7 @@ coronation_events.6030 = { add_stewardship_lifestyle_xp = medium_lifestyle_xp coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:experienced_courtesan } + coronation_events_6030_accept_courtesan_effect = yes stress_impact = { just = minor_stress_impact_gain @@ -4367,25 +4357,10 @@ coronation_events.6030 = { flavor = coronation_events.6030.d_flavor add_diplomacy_lifestyle_xp = medium_lifestyle_xp + save_scope_as = no_sex_memory coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:funny_courtesan_1 } - #Courtesan 2 - had_sex_with_effect = { - CHARACTER = scope:funny_courtesan_2 - PREGNANCY_CHANCE = pregnancy_chance - } - #Add to court - add_courtier = scope:funny_courtesan_2 - #Add progress to lover relation - set_relation_lover = { - reason = lover_coronation_courtesan - target = scope:funny_courtesan_2 - } - scope:funny_courtesan_2 = { - add_character_flag = { - flag = picked_courtesan - days = 30 - } - } + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:funny_courtesan_2 } + coronation_events_6030_accept_courtesan_effect = yes create_character_memory = { type = had_a_threesome_memory @@ -5294,9 +5269,7 @@ coronation_events.6100 = { name = { trigger = { scope:activity.var:activity_special_type_progression >= 25 - NOT = { - this = scope:host - } + this != scope:host } text = coronation_events.6100.a_guest } @@ -5330,9 +5303,7 @@ coronation_events.6100 = { triggered_desc = { trigger = { scope:activity.var:activity_special_type_progression < 25 - NOT = { - this = scope:host - } + this != scope:host } desc = coronation_events.6100.a_flavor_low_guest } @@ -5348,38 +5319,23 @@ coronation_events.6100 = { if = { limit = { this = scope:host - #Is only player at this coronation - NOT = { - scope:activity = { - any_attending_character = { - NOT = { - this = scope:host - } - is_ai = no - } - } - } } - scope:host = { - if = { - limit = { - exists = scope:crowning_artifact - can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } - } - scope:crowning_artifact = { equip_artifact_to_owner = yes } + if = { + limit = { + scope:crowning_artifact ?= { is_equipped = no } + can_equip_artifact = scope:crowning_artifact } - coronation_change_law_effect = yes + scope:crowning_artifact = { equip_artifact_to_owner = yes } } + coronation_change_law_effect = yes } else = { show_as_tooltip = { scope:host = { if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -5411,18 +5367,11 @@ coronation_events.6100 = { #Need to equip crown after guests get this event if = { limit = { - scope:activity = { - any_attending_character = { - NOT = { - this = scope:host - } - is_ai = no - } - } + this != scope:host + is_ai = no } trigger_event = { id = coronation_events.6103 - days = 5 } } } @@ -5463,9 +5412,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5489,9 +5436,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5515,9 +5460,7 @@ scripted_effect coronation_events_6101_self_crowning_effect = { custom = custom.every_zealot_vassal limit = { has_vassal_stance = zealot - NOT = { - this = scope:judger - } + this != scope:judger } add_opinion = { target = scope:host @@ -5590,11 +5533,7 @@ coronation_events.6101 = { triggered_desc = { trigger = { scope:host = { - OR = { - faith.religion = religion:eastern_orthodox_religion - faith.religion = religion:catholic_religion - faith.religion = religion:protestant_religion - } + faith.religion = religion:christianity_religion } } desc = coronation_events.6101.desc_words_christian @@ -5648,11 +5587,7 @@ coronation_events.6101 = { 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 - } + faith.religion = religion:christianity_religion culture = { has_cultural_pillar = heritage_iberian has_cultural_pillar = language_iberian @@ -5690,11 +5625,7 @@ coronation_events.6101 = { triggered_desc = { trigger = { scope:host = { - OR = { - faith.religion = religion:eastern_orthodox_religion - faith.religion = religion:catholic_religion - faith.religion = religion:protestant_religion - } + faith.religion = religion:christianity_religion } } desc = coronation_events.6101.desc_words_christian_guest @@ -5802,11 +5733,7 @@ coronation_events.6101 = { 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 - } + scope:host.faith.religion = religion:christianity_religion } } animation = personality_honorable @@ -5988,9 +5915,7 @@ coronation_events.6101 = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6013,9 +5938,7 @@ coronation_events.6101 = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6031,9 +5954,8 @@ coronation_events.6101 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6044,9 +5966,8 @@ coronation_events.6101 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6062,7 +5983,7 @@ coronation_events.6101 = { first_valid = { triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_disrupt_loyalists has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6076,7 +5997,7 @@ coronation_events.6101 = { } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_offer_support has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6092,7 +6013,7 @@ coronation_events.6101 = { } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host } desc = coronation_events.6101.a_guest } @@ -6679,9 +6600,7 @@ coronation_events.6102 = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6704,9 +6623,7 @@ coronation_events.6102 = { limit = { exists = scope:anointer } - NOT = { - this = scope:anointer - } + this != scope:anointer } } save_scope_as = observer @@ -6722,10 +6639,7 @@ coronation_events.6102 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact - scope:crowning_artifact = { - is_equipped = no - } + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact } scope:crowning_artifact = { equip_artifact_to_owner = yes } @@ -6737,9 +6651,8 @@ coronation_events.6102 = { coronation_ceremony_opinion_effect = yes if = { limit = { - exists = scope:crowning_artifact + scope:crowning_artifact ?= { is_equipped = no } can_equip_artifact = scope:crowning_artifact - scope:crowning_artifact = { is_equipped = no } } scope:crowning_artifact = { equip_artifact_to_owner = yes } } @@ -6755,7 +6668,7 @@ coronation_events.6102 = { first_valid = { triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host OR = { has_activity_intent = coronation_disrupt_loyalists has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } @@ -6779,14 +6692,14 @@ coronation_events.6102 = { has_trait = craven } } - NOT = { this = scope:host } + this != scope:host scope:activity.var:activity_special_type_progression >= 25 } desc = coronation_events.6102.a_guest_pos } triggered_desc = { trigger = { - NOT = { this = scope:host } + this != scope:host } desc = coronation_events.6102.a_guest } @@ -7356,9 +7269,7 @@ coronation_events.6110 = { artifact_slot_type = regalia } } - NOT = { - this = scope:crowning_artifact - } + this != scope:crowning_artifact trigger_if = { limit = { has_variable = artifact_succession_title @@ -7555,9 +7466,7 @@ coronation_events.6110 = { if = { limit = { cp:councillor_court_chaplain ?= { - NOT = { - this = scope:blesser - } + this != scope:blesser is_alive = yes is_imprisoned = no is_incapable = no @@ -8108,9 +8017,7 @@ coronation_events.6120 = { if = { limit = { cp:councillor_court_chaplain ?= { - NOT = { - this = scope:oather_1 - } + this != scope:oather_1 is_alive = yes is_imprisoned = no is_incapable = no @@ -8133,9 +8040,7 @@ coronation_events.6120 = { order_by = max_military_strength limit = { government_has_flag = government_is_theocracy - NOT = { - this = scope:oather_1 - } + this != scope:oather_1 } save_scope_as = oather_2 } @@ -8468,7 +8373,7 @@ scripted_trigger coronation_events_6121_minority_trigger = { government_has_flag = government_is_herder } culture = { - NOT = { this = root.culture } + this != root.culture cultural_acceptance = { target = root.culture value <= 80 @@ -8753,9 +8658,7 @@ coronation_events.6121 = { order_by = max_military_strength limit = { is_vassal_of = root - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 NOR = { is_at_war_with = root government_has_flag = government_is_theocracy @@ -8820,9 +8723,7 @@ coronation_events.6121 = { list = detractor_allies order_by = current_military_strength limit = { - NOT = { - this = scope:detractor_ally_1 - } + this != scope:detractor_ally_1 } save_scope_as = detractor_ally_2 @@ -8857,9 +8758,7 @@ coronation_events.6121 = { government_has_flag = government_is_theocracy government_has_flag = government_is_herder } - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } save_scope_as = vassal_2 } @@ -8901,9 +8800,7 @@ coronation_events.6121 = { order_by = max_military_strength limit = { coronation_events_6121_minority_trigger = yes - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 opinion = { target = root value >= -20 @@ -8915,15 +8812,11 @@ coronation_events.6121 = { target = root value >= -60 } - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } alternative_limit = { coronation_events_6121_minority_trigger = yes - NOT = { - this = scope:vassal_1 - } + this != scope:vassal_1 } save_scope_as = vassal_2 } @@ -9106,8 +8999,10 @@ coronation_events.6121 = { trigger = { has_activity_intent = coronation_impress_attendees stewardship >= decent_skill_rating - any_vassal = { - count >= 2 + scope:vassal_1 = { + coronation_events_6121_minority_trigger = yes + } + scope:vassal_2 = { coronation_events_6121_minority_trigger = yes } } @@ -10223,6 +10118,7 @@ coronation_events.6123 = { involved_activity = { activity_location = { save_scope_as = location } activity_host = { save_scope_as = host } + save_scope_as = activity } scope:host = { show_as_tooltip = { @@ -10452,16 +10348,20 @@ coronation_events.6123 = { NOT = { exists = scope:priest } - cp:councillor_court_chaplain ?= { - is_alive = yes - is_imprisoned = no - is_incapable = no - has_contagious_deadly_disease_trigger = no + scope:host = { + cp:councillor_court_chaplain ?= { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } } } #SAVE COURT CHAPLAIN - cp:councillor_court_chaplain = { - save_scope_as = priest + scope:host = { + cp:councillor_court_chaplain = { + save_scope_as = priest + } } } if = { @@ -10699,154 +10599,163 @@ coronation_events.6123 = { has_activity_intent = coronation_offer_support } #Bigger opinion gain if you're sticking your neck out for supporters - if = { - limit = { - scope:activity = { + scope:activity = { + if = { + limit = { number_of_supporters_activity <= number_of_detractors_activity } - } - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 35 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root - } - } + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 35 } } - } - } - else = { - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 25 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 35 } } + } + } + else = { + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 25 } } - } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 + } } } - add_opinion = { - target = root - modifier = rival_supporter_opinion - opinion = -35 + } + if = { + limit = { any_guest_subset = { name = detractor } } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -35 + } } } } } else = { #Bigger opinion gain if you're sticking your neck out for supporters - if = { - limit = { - scope:activity = { + scope:activity = { + if = { + limit = { number_of_supporters_activity <= number_of_detractors_activity } - } - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 25 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root - } - } + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 25 } } - } - } - else = { - scope:host = { - add_opinion = { - target = root - modifier = support_opinion - opinion = 15 - } - } - scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 } } + } + } + else = { + scope:host = { add_opinion = { target = root - modifier = fellow_supporter_opinion + modifier = support_opinion opinion = 15 } } - } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + if = { + limit = { any_guest_subset = { name = supporter } } + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 15 + } } } - add_opinion = { - target = root - modifier = rival_supporter_opinion - opinion = -30 + } + if = { + limit = { any_guest_subset = { name = detractor } } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -30 + } } } } } } } + if = { + limit = { + has_variable = supporters_pledge_var + } + change_variable = { + name = supporters_pledge_var + add = 1 + } + } + else = { + set_variable = { + name = supporters_pledge_var + value = 1 + } + } } if = { limit = { @@ -11158,59 +11067,57 @@ coronation_events.6123 = { } } scope:activity = { - every_guest_subset = { - name = supporter - custom = every_supporter_activity + if = { limit = { - NOT = { - this = root - } + any_guest_subset = { name = supporter } } - add_opinion = { - target = root - modifier = rival_detractor_opinion - opinion = -30 - } - } - } - #Bigger opinion gain if you are sticking your neck out for detractors - if = { - limit = { - scope:activity = { - number_of_detractors_activity <= number_of_supporters_activity - } - } - scope:activity = { every_guest_subset = { - name = detractor - custom = every_detractor_activity + name = supporter + custom = every_supporter_activity limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root - modifier = fellow_detractor_opinion - opinion = 45 + modifier = rival_detractor_opinion + opinion = -30 } } } - } - else = { - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity + if = { + limit = { + any_guest_subset = { name = detractor } + } + #Bigger opinion gain if you are sticking your neck out for detractors + if = { limit = { - NOT = { - this = root + number_of_detractors_activity <= number_of_supporters_activity + } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 45 } } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 35 + } + else = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 + } } } } @@ -11229,9 +11136,7 @@ coronation_events.6123 = { name = supporter custom = every_supporter_activity limit = { - NOT = { - this = root - } + this != root } add_opinion = { target = root @@ -11239,45 +11144,40 @@ coronation_events.6123 = { opinion = -25 } } - } - #Bigger opinion gain if you are sticking your neck out for detractors - if = { - limit = { - scope:activity = { - number_of_detractors_activity <= number_of_supporters_activity + if = { + limit = { + any_guest_subset = { name = supporter } } - } - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity + #Bigger opinion gain if you are sticking your neck out for detractors + if = { limit = { - NOT = { - this = root + number_of_detractors_activity <= number_of_supporters_activity + } + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 } } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 35 - } } - } - } - else = { - scope:activity = { - every_guest_subset = { - name = detractor - custom = every_detractor_activity - limit = { - NOT = { - this = root + else = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + this != root + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 20 } - } - add_opinion = { - target = root - modifier = fellow_detractor_opinion - opinion = 20 } } } @@ -11285,6 +11185,21 @@ coronation_events.6123 = { } } } + if = { + limit = { + has_variable = detractors_scorned_pledge_var + } + change_variable = { + name = detractors_scorned_pledge_var + add = 1 + } + } + else = { + set_variable = { + name = detractors_scorned_pledge_var + value = 1 + } + } } if = { limit = { @@ -11660,9 +11575,7 @@ scripted_trigger coronation_events_6130_dharmic_trigger = { faith.religion = { AND = { is_in_family = rf_eastern - NOT = { - this = religion:zoroastrianism_religion - } + this != religion:zoroastrianism_religion } } root.involved_activity.activity_location = { @@ -11824,9 +11737,7 @@ coronation_events.6130 = { scope:host.faith.religion = religion:eastern_orthodox_religion scope:host.faith.religion = religion:catholic_religion scope:host.faith.religion = religion:protestant_religion } scope:anointer = { - NOT = { - this = scope:host.cp:councillor_court_chaplain - } + this != scope:host.cp:councillor_court_chaplain is_landed = yes } } @@ -11998,14 +11909,13 @@ coronation_events.6130 = { trigger = { involved_activity ?= { activity_host = { - NAND = { - exists = faith.religious_head - this = faith.religious_head + NOT = { + faith.religious_head ?= this } } OR = { - activity_host.faith.religion = religion:christianity_religion - activity_host.faith.religion = religion:judaism_religion + activity_host.faith.religion = religion:christianity_religion + activity_host.faith.religion = religion:judaism_religion activity_host = { coronation_events_6130_dharmic_trigger = yes } @@ -12017,32 +11927,9 @@ coronation_events.6130 = { } } on_trigger_fail = { - if = { - limit = { - coronation_being_crowned_trigger = yes - } - #Skip to crowning - trigger_event = { - id = coronation_events.6100 - days = 3 - } - } - else_if = { - limit = { - coronation_self_crowning_trigger = yes - } - #Skip to crowning self - trigger_event = { - id = coronation_events.6101 - days = 3 - } - } - else = { - #Skip to enthroning - trigger_event = { - id = coronation_events.6102 - days = 3 - } + trigger_event = { + id = coronation_events.6131 + days = 3 } } immediate = { @@ -12066,9 +11953,7 @@ coronation_events.6130 = { scope:host = { if = { limit = { - faith = { - fervor >= 90 - } + faith.fervor >= 90 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12098,9 +11983,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 80 - } + faith.fervor >= 80 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12130,9 +12013,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 70 - } + faith.fervor >= 70 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12162,9 +12043,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 60 - } + faith.fervor >= 60 } every_vassal = { custom = custom.every_same_faith_vassal @@ -12191,9 +12070,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 30 - } + faith.fervor < 30 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12223,9 +12100,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 20 - } + faith.fervor < 20 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12255,9 +12130,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor < 10 - } + faith.fervor < 10 } every_vassal = { custom = custom.every_different_faith_vassal @@ -12299,9 +12172,7 @@ coronation_events.6130 = { #Scale rewards based on fervor if = { limit = { - faith = { - fervor >= 100 - } + faith.fervor >= 100 } every_vassal = { custom = custom.every_zealot_vassal @@ -12323,9 +12194,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 80 - } + faith.fervor >= 80 } every_vassal = { custom = custom.every_zealot_vassal @@ -12347,9 +12216,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 60 - } + faith.fervor >= 60 } every_vassal = { custom = custom.every_zealot_vassal @@ -12371,9 +12238,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 40 - } + faith.fervor >= 40 } every_vassal = { custom = custom.every_zealot_vassal @@ -12395,9 +12260,7 @@ coronation_events.6130 = { } else_if = { limit = { - faith = { - fervor >= 20 - } + faith.fervor >= 20 } every_vassal = { custom = custom.every_zealot_vassal @@ -12447,9 +12310,7 @@ coronation_events.6130 = { NOT = { has_trait = faith_warrior } - faith = { - fervor >= 75 - } + faith.fervor >= 75 trigger_if = { limit = { scope:activity = { @@ -12740,7 +12601,7 @@ coronation_events.6130 = { if = { limit = { faith = scope:host.faith - NOT = { this = scope:host } + this != scope:host scope:activity = { has_activity_option = { category = special_type @@ -12787,7 +12648,7 @@ coronation_events.6130 = { #To show audience else_if = { limit = { - NOT = { this = root } + this != root scope:activity = { has_activity_option = { category = special_type @@ -12811,7 +12672,7 @@ coronation_events.6130 = { } else_if = { limit = { - NOT = { this = root } + this != root } show_as_tooltip = { add_piety = medium_piety_gain @@ -12834,32 +12695,34 @@ coronation_events.6130 = { # For MP coronation_ready_effect = yes + trigger_event = { + id = coronation_events.6131 + days = 3 + } + } +} + +coronation_events.6131 = { + type = activity_event + hidden = yes + immediate = { if = { limit = { coronation_being_crowned_trigger = yes } #crowning - trigger_event = { - id = coronation_events.6100 - days = 3 - } + trigger_event = coronation_events.6100 } else_if = { limit = { coronation_self_crowning_trigger = yes } #self-crowning - trigger_event = { - id = coronation_events.6101 - days = 3 - } + trigger_event = coronation_events.6101 } else = { #enthroning - trigger_event = { - id = coronation_events.6102 - days = 3 - } + trigger_event = coronation_events.6102 } } } @@ -12875,9 +12738,7 @@ scripted_effect coronation_events_6140_spouse_effects = { } if = { limit = { - NOT = { - this = root - } + this != root is_ai = yes OR = { has_trait = arrogant @@ -12909,9 +12770,7 @@ scripted_effect coronation_events_6140_spouse_effects = { every_attending_character = { custom = custom.every_attending_character limit = { - NOT = { - this = scope:spouse - } + this != scope:spouse } add_opinion = { target = scope:spouse @@ -12940,9 +12799,7 @@ coronation_events.6140 = { trigger = { scope:host = { any_consort = { - NOT = { - this = scope:spouse - } + this != scope:spouse } } } @@ -13053,9 +12910,7 @@ coronation_events.6140 = { trigger = { scope:host = { any_consort = { - NOT = { - this = scope:spouse - } + this != scope:spouse } } } @@ -13660,6 +13515,59 @@ coronation_events.6140 = { } } } + #Yay! MAI WIFE + option = { + trigger = { + this = scope:host + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:spouse + has_relation_soulmate = scope:spouse + opinion = { + target = scope:spouse + value >= 90 + } + } + } + desc = coronation_events.6140.b_like + } + triggered_desc = { + trigger = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + desc = coronation_events.6140.b_dislike + } + desc = coronation_events.6140.b + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 15 + } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:spouse + opinion = 5 + } + } + ai_chance = { + base = 100 + } + } #I must get rid of this person... option = { trigger = { @@ -13828,59 +13736,6 @@ coronation_events.6140 = { } } } - #Yay! MAI WIFE - option = { - trigger = { - this = scope:host - } - name = { - text = { - first_valid = { - triggered_desc = { - trigger = { - OR = { - has_relation_lover = scope:spouse - has_relation_soulmate = scope:spouse - opinion = { - target = scope:spouse - value >= 90 - } - } - } - desc = coronation_events.6140.b_like - } - triggered_desc = { - trigger = { - OR = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } - opinion = { - target = scope:spouse - value < -60 - } - } - } - desc = coronation_events.6140.b_dislike - } - desc = coronation_events.6140.b - } - } - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:spouse - opinion = 15 - } - hidden_effect = { - add_opinion = { - modifier = grateful_opinion - target = scope:spouse - opinion = 5 - } - } - ai_chance = { - base = 100 - } - } #I am the spouse option = { trigger = { @@ -14221,9 +14076,7 @@ coronation_events.6150 = { is_confederation_member = yes suzerain ?= { is_confederation_member = yes - NOT = { - this = root - } + this != root } } } @@ -14335,7 +14188,7 @@ coronation_events.6150 = { faith = { faith_hostility_level = { target = root.faith - value <= faith.faith_hostile_level + value <= faith_hostile_level } } } @@ -14348,7 +14201,7 @@ coronation_events.6150 = { faith = { faith_hostility_level = { target = root.faith - value <= faith.faith_hostile_level + value <= faith_hostile_level } } } @@ -14575,9 +14428,7 @@ coronation_events.6150 = { scope:neighbor.confederation = { every_confederation_member = { limit = { - NOT = { - this = scope:confederate - } + this != scope:confederate } send_interface_toast = { type = event_toast_effect_bad @@ -14675,9 +14526,7 @@ coronation_events.6150 = { list = confederation_members order_by = ai_greed limit = { - NOT = { - this = scope:confederate - } + this != scope:confederate } confederation = { remove_confederation_member = prev @@ -15384,58 +15233,12 @@ coronation_events.6150 = { } } } - custom_tooltip = coronation_councillor_unity_tooltip - hidden_effect = { - if = { - limit = { - has_council_position = councillor_chancellor - } - add_character_modifier = { - modifier = councillor_unity_modifier_diplomacy - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_steward - } - add_character_modifier = { - modifier = councillor_unity_modifier_stewardship - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_spymaster - } - add_character_modifier = { - modifier = councillor_unity_modifier_intrigue - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_court_chaplain - } - add_character_modifier = { - modifier = councillor_unity_modifier_learning - years = 5 - } - } - else_if = { - limit = { - has_council_position = councillor_marshal - } - add_character_modifier = { - modifier = councillor_unity_modifier_martial - years = 5 - } - } - else = { - #Add highest skill to spouse... and other council positions I don't know about I guess + else = { + custom_tooltip = coronation_councillor_unity_tooltip + hidden_effect = { if = { limit = { - highest_skill = diplomacy + has_council_position = councillor_chancellor } add_character_modifier = { modifier = councillor_unity_modifier_diplomacy @@ -15444,7 +15247,7 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = stewardship + has_council_position = councillor_steward } add_character_modifier = { modifier = councillor_unity_modifier_stewardship @@ -15453,7 +15256,7 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = intrigue + has_council_position = councillor_spymaster } add_character_modifier = { modifier = councillor_unity_modifier_intrigue @@ -15462,19 +15265,67 @@ coronation_events.6150 = { } else_if = { limit = { - highest_skill = learning + has_council_position = councillor_court_chaplain } add_character_modifier = { modifier = councillor_unity_modifier_learning years = 5 } } - else = { + else_if = { + limit = { + has_council_position = councillor_marshal + } add_character_modifier = { modifier = councillor_unity_modifier_martial years = 5 } } + else = { + #Add highest skill to spouse... and other council positions I don't know about I guess + if = { + limit = { + highest_skill = diplomacy + } + add_character_modifier = { + modifier = councillor_unity_modifier_diplomacy + years = 5 + } + } + else_if = { + limit = { + highest_skill = stewardship + } + add_character_modifier = { + modifier = councillor_unity_modifier_stewardship + years = 5 + } + } + else_if = { + limit = { + highest_skill = intrigue + } + add_character_modifier = { + modifier = councillor_unity_modifier_intrigue + years = 5 + } + } + else_if = { + limit = { + highest_skill = learning + } + add_character_modifier = { + modifier = councillor_unity_modifier_learning + years = 5 + } + } + else = { + add_character_modifier = { + modifier = councillor_unity_modifier_martial + years = 5 + } + } + } } } } diff --git a/events/activities/hold_court_activity/hold_court_events_general.txt b/events/activities/hold_court_activity/hold_court_events_general.txt index 8f322c75..d958591e 100644 --- a/events/activities/hold_court_activity/hold_court_events_general.txt +++ b/events/activities/hold_court_activity/hold_court_events_general.txt @@ -911,7 +911,7 @@ hold_court.1021 = { scripted_trigger hold_court_3000_vassal_trigger = { basic_is_available_ai = yes is_adult = yes - short_term_gold >= standard_activity_cost + short_term_gold >= standard_activity_base_cost has_court_event_flag = no NOT = { has_hook_of_type = { @@ -1024,7 +1024,7 @@ hold_court.3000 = { } pay_short_term_gold = { target = root - gold = standard_activity_cost + gold = standard_activity_base_cost } } custom_tooltip = hold_court.3000.a.tt @@ -1080,7 +1080,7 @@ hold_court.3000 = { } pay_short_term_gold = { target = root - gold = standard_activity_cost + gold = standard_activity_base_cost } } custom_tooltip = hold_court.3000.a.tt @@ -2751,6 +2751,7 @@ hold_court.3060 = { opinion = 20 } fire_councillor = scope:cp_steward + scope:cp_steward_replacement = { set_employer = prev } assign_councillor_type = { type = councillor_steward target = scope:cp_steward_replacement @@ -3101,11 +3102,6 @@ hold_court.3090 = { desc = cultural_acceptance_gain_hold_court_event_outcome } } - reverse_add_opinion = { - modifier = pleased_opinion - target = scope:different_culture_vassal - opinion = 20 - } if = { limit = { any_vassal = { @@ -3119,17 +3115,22 @@ hold_court.3090 = { culture = scope:different_culture_vassal.culture } add_opinion = { - target = root - opinion = 5 modifier = respect_opinion + target = root + opinion = 5 } } } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:different_culture_vassal + opinion = 20 + } stress_impact = { - greedy = medium_stress_loss - arrogant = medium_stress_loss - generous = medium_stress_gain - humble = medium_stress_gain + greedy = medium_stress_gain + arrogant = medium_stress_gain + generous = medium_stress_loss + humble = medium_stress_loss } ai_chance = { @@ -4023,11 +4024,11 @@ hold_court.4600 = { has_trait = sadistic AND = { is_witch_trigger = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:witch GENDER_CHARACTER = root } } AND = { is_cannibal_trigger = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = cannibal GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:cannibal GENDER_CHARACTER = root } } } OR = { # I care about dread @@ -6211,6 +6212,7 @@ hold_court.6040 = { title = hold_court_6040_b_generic add_learning_skill = 1 add_prestige = minor_prestige_gain + random_dummy_gender_effect = yes create_artifact_book_effect = { OWNER = root CREATOR = scope:dummy_gender @@ -8299,22 +8301,28 @@ hold_court.6100 = { immediate = { random_vassal = { - limit = { vassal_war_char_trigger = yes } + limit = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } random_character_war = { limit = { vassal_war_conflict_trigger = yes } save_scope_as = vassal_war } } scope:vassal_war = { - primary_attacker = { + casus_belli = { + primary_attacker = { + court_event_character_flag_effect = yes save_scope_as = 6100_vassal_1 - court_event_character_flag_effect = yes + } + primary_defender = { + court_event_character_flag_effect = yes + save_scope_as = 6100_vassal_2 + } } - primary_defender = { - save_scope_as = 6100_vassal_2 - court_event_character_flag_effect = yes - } } + if = { limit = { employs_court_position = court_jester_court_position @@ -10185,7 +10193,16 @@ hold_court.6140 = { scripted_trigger hold_court_6160_valid_bankrupt_vassal_trigger = { has_court_event_flag = no is_available_ai_adult = yes - gold < 0 + OR = { + AND = { + has_treasury = yes + treasury < 0 + } + AND = { + has_treasury = no + gold < 0 + } + } } scripted_trigger hold_court_6160_valid_hook_trigger = { @@ -10382,12 +10399,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } add_hook = { type = indebted_hook @@ -10404,7 +10421,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10428,15 +10445,15 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_gold_value } } scope:6160_vassal = { remove_hook = { target = root } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } reverse_add_opinion = { target = scope:6160_vassal @@ -10449,7 +10466,7 @@ hold_court.6160 = { ai_chance = { base = 120 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10477,12 +10494,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = medium_gold_value + value = medium_treasury_or_gold_value } add_prestige = major_prestige_gain change_current_court_grandeur = medium_court_grandeur_gain @@ -10499,7 +10516,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10530,12 +10547,12 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } - pay_short_term_gold = { + pay_treasury_or_gold = { target = scope:6160_vassal - gold = major_gold_value + value = major_treasury_or_gold_value } add_piety = major_piety_gain change_current_court_grandeur = major_court_grandeur_gain @@ -10555,7 +10572,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < major_gold_value + short_term_treasury_or_gold < major_treasury_or_gold_value add = -95 } modifier = { @@ -10586,7 +10603,7 @@ hold_court.6160 = { limit = { is_ai = yes } - short_term_gold >= major_gold_value + short_term_treasury_or_gold >= major_treasury_or_gold_value } } if = { @@ -10626,7 +10643,7 @@ hold_court.6160 = { ai_chance = { base = 120 modifier = { - gold < medium_treasury_or_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = -95 } modifier = { @@ -10654,7 +10671,7 @@ hold_court.6160 = { ai_chance = { base = 100 modifier = { - gold < medium_gold_value + short_term_treasury_or_gold < medium_treasury_or_gold_value add = 95 } modifier = { @@ -17135,8 +17152,9 @@ hold_court.8090 = { } } scope:vassal = { - court_position_generator_effect = { VAR = target EMPLOYER = root } - court_position_generator_effect = { VAR = backup EMPLOYER = root } + court_position_generator_effect = { VAR = target EMPLOYER = root ONLY_EMPTY = no } + # SECONDARY OPTIONS SHOULD BE EMPTY + court_position_generator_effect = { VAR = backup EMPLOYER = root ONLY_EMPTY = yes } } # Trigger next event in chain. hold_court_queue_next_event_effect = yes @@ -23104,6 +23122,9 @@ hold_court.8180 = { any_character_artifact = { exists = yes } } ordered_character_artifact = { + limit = { + artifact_can_be_gift_to_trigger = { RECIPIENT = root } + } order_by = artifact_rarity save_scope_as = vassal_artifact } @@ -24868,6 +24889,7 @@ scripted_trigger hold_court_8210_vassal_trigger = { any_held_title = { title_tier = county any_neighboring_county = { + NOT = { this = root.capital_county } holder = { this = root NOR = { diff --git a/events/activities/pilgrimage_activity/pilgrimage_events.txt b/events/activities/pilgrimage_activity/pilgrimage_events.txt index a0ee1549..2adbc28b 100644 --- a/events/activities/pilgrimage_activity/pilgrimage_events.txt +++ b/events/activities/pilgrimage_activity/pilgrimage_events.txt @@ -286,8 +286,8 @@ scripted_trigger pilgrimage_0500_valid_holy_site_trigger = { NOR = { this = root.location.barony AND = { - exists = capital_province - this = capital_province.barony + exists = root.capital_province + this = root.capital_province.barony } } } @@ -1900,7 +1900,7 @@ pilgrimage.1130 = { pilgrimage_1130_anti_character_trigger = yes is_of_major_interest_to_root_trigger = yes } - limit = { + alternative_limit = { pilgrimage_1130_anti_character_trigger = yes is_of_minor_interest_to_root_trigger = yes } @@ -2934,12 +2934,14 @@ pilgrimage.2005 = { character = scope:rude_pilgrim animation = laugh } - cooldown = { years = 2 } + cooldown = { years = 5 } trigger = { is_location_valid_for_travel_event_on_land = yes current_travel_plan ?= { any_entourage_character = { is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_ruler = no this != root NOT = { is_courtier_of = root } } @@ -2951,6 +2953,8 @@ pilgrimage.2005 = { random_entourage_character = { limit = { is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_ruler = no this != root NOT = { is_courtier_of = root } } @@ -4721,7 +4725,7 @@ pilgrimage.2030 = { option = { name = pilgrimage.2030.c trigger = { has_activity_intent = reflection_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent bonus_to_all_types_effect = yes add_piety = miniscule_piety_gain if = { @@ -5420,7 +5424,7 @@ pilgrimage.2101 = { limit = { NOT = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } random = { @@ -5480,7 +5484,7 @@ pilgrimage.2101 = { limit = { NOT = { government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } + house ?= { has_house_aspiration_parameter = aspect_of_creation } } } random = { @@ -5686,6 +5690,7 @@ pilgrimage.2501 = { immediate = { create_character = { age = 31 + dynasty = none gender_female_chance = 0.5 trait = education_intrigue_1 trait = stubborn @@ -6335,6 +6340,7 @@ pilgrimage.3001 = { desc = pilgrimage.3001.desc theme = travel_pilgrimage override_background = { reference = terrain_travel } + widget = { gui = event_window_widget_vfx_rain_storm container = foreground_shader_vfx_container } left_portrait = { character = root triggered_animation = { @@ -6349,7 +6355,7 @@ pilgrimage.3001 = { } right_portrait = { character = scope:zealous_priest - animation = personality_zealous + animation = debating outfit_tags = { bishop_outfit } } cooldown = { years = 15 } @@ -6362,6 +6368,7 @@ pilgrimage.3001 = { random_dummy_gender_clergy_effect = yes create_character = { age = 40 + dynasty = none gender = scope:dummy_clergy_gender location = root.location faith = root.faith @@ -6490,6 +6497,7 @@ pilgrimage.3002 = { immediate = { create_character = { age = 40 + dynasty = none gender_female_chance = 50 location = root.location faith = faith:adamites @@ -6522,6 +6530,12 @@ pilgrimage.3002 = { worldly_type_option_effect = yes add_piety = massive_piety_loss set_character_faith = faith:adamites + if = { + limit = { + faith:adamites = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_to_entourage_court_and_activity_effect = { CHAR_TO_ADD = scope:naked_preacher NEW_COURT_OWNER = root @@ -6696,7 +6710,7 @@ pilgrimage.3004 = { } right_portrait = { character = scope:doomsayer - animation = personality_zealous + animation = debating outfit_tags = { monk_outfit } } cooldown = { years = 15 } @@ -6709,6 +6723,7 @@ pilgrimage.3004 = { random_dummy_gender_clergy_effect = yes create_character = { age = 40 + dynasty = none trait = devoted gender = scope:dummy_clergy_gender location = root.location @@ -7094,6 +7109,7 @@ pilgrimage.3301 = { random_dummy_gender_clergy_effect = yes create_character = { age = 80 + dynasty = none gender = scope:dummy_clergy_gender location = root.location faith = root.faith @@ -7187,6 +7203,7 @@ pilgrimage.3302 = { immediate = { create_character = { age = 80 + dynasty = none template = default_mystic_character location = root.location culture = root.location.county.culture @@ -7200,7 +7217,7 @@ pilgrimage.3302 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -7226,7 +7243,7 @@ pilgrimage.3302 = { } } } - #Humble Relection + #Humble Reflection option = { name = pilgrimage.3302.b pious_type_option_effect = yes @@ -7315,7 +7332,7 @@ pilgrimage.3303 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -7491,7 +7508,7 @@ pilgrimage.3401 = { factor = 2 OR = { #you're in a reflection journey has_activity_intent = reflection_intent - scope:activity = { + involved_activity = { has_activity_option = { category = special_type option = pilgrimage_type_pious @@ -8180,6 +8197,7 @@ pilgrimage.6007 = { immediate = { play_music_cue = "mx_cue_sacredrite" create_character = { + dynasty = none location = root.location template = priest_character_template faith = root.faith @@ -10323,6 +10341,7 @@ pilgrimage.6530 = { #template = peasant_villager_foundling_character location = root.location age = { 5 10 } + dynasty = none random_traits = yes culture = root.location.county.culture faith = root.location.county.faith @@ -13891,6 +13910,9 @@ pilgrimage.6850 = { #Improve your spymaster's secret discovery chance option = { name = pilgrimage.6850.b + trigger = { + exists = cp:councillor_spymaster + } add_learning_lifestyle_xp = medium_lifestyle_xp add_character_modifier = { modifier = spymaster_eyes_modifier diff --git a/events/activities/tour_activity/tour_grounds_events_chad.txt b/events/activities/tour_activity/tour_grounds_events_chad.txt index 2e561d2d..ba109a32 100644 --- a/events/activities/tour_activity/tour_grounds_events_chad.txt +++ b/events/activities/tour_activity/tour_grounds_events_chad.txt @@ -192,7 +192,7 @@ tour_grounds_events.6000 = { trigger_if = { limit = { NOT = { is_incestuous_trigger = yes } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = root } } NOT = { is_close_or_extended_family_of = scope:stop_host_scope } } @@ -392,6 +392,8 @@ scripted_trigger tg_6100_location_has_cathedral_trigger = { has_building_or_higher = holy_wisdom_01 has_building_or_higher = duomo_florence_01 has_building_or_higher = wawel_cathedral_01 + has_building_or_higher = holy_site_st_peters_basilica_01 + has_building_or_higher = mont_st_michel_02 } } @@ -404,6 +406,8 @@ scripted_trigger tg_6100_location_has_mosque_trigger = { has_building_or_higher = holy_site_great_mosque_of_samarra_01 has_building_or_higher = holy_site_prophetic_mosque_01 has_building_or_higher = damascus_mosque_01 + has_building_or_higher = qutb_minar_03 + has_building_or_higher = yazd_mosque_01 } } diff --git a/events/activities/tour_activity/tour_phase_cultural_festival.txt b/events/activities/tour_activity/tour_phase_cultural_festival.txt index 00c4e90a..3cc53fdf 100644 --- a/events/activities/tour_activity/tour_phase_cultural_festival.txt +++ b/events/activities/tour_activity/tour_phase_cultural_festival.txt @@ -2186,6 +2186,15 @@ cultural_festival.2060 = { } any_character_artifact = { #you bring something with you is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } + trigger_if = { + limit = { + scope:stop_host_scope = { + highest_held_title_tier > tier_kingdom #No point in giving a court artifact if this is a character without a court. + } + } + ep1_artifact_is_court_artifact_trigger = no + } } } @@ -2212,6 +2221,7 @@ cultural_festival.2060 = { random_character_artifact = { limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -2236,6 +2246,7 @@ cultural_festival.2060 = { } alternative_limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -2248,6 +2259,7 @@ cultural_festival.2060 = { } alternative_limit = { is_equipped = no + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } trigger_if = { limit = { scope:stop_host_scope = { @@ -3551,7 +3563,7 @@ cultural_festival.2110 = { trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent stress_impact = { base = major_stress_impact_loss #your reward callous = minor_stress_impact_gain @@ -5371,6 +5383,7 @@ cultural_festival.3040 = { artifact_type = dagger artifact_type = sword } + artifact_can_be_gift_advance_trigger = yes } } @@ -5384,6 +5397,7 @@ cultural_festival.3040 = { artifact_type = dagger artifact_type = sword } + artifact_can_be_gift_advance_trigger = yes } save_scope_as = sword_in_the_stone_scope } @@ -8819,12 +8833,15 @@ cultural_festival.4300 = { #Vassal: Decide which gift to give has_any_artifact = yes any_character_artifact = { category = inventory + NOT = { has_variable = historical_unique_artifact } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:visiting_liege } } } random_character_artifact = { limit = { category = inventory NOT = { has_variable = historical_unique_artifact } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:visiting_liege } } save_scope_as = existing_artifact } @@ -9171,21 +9188,20 @@ cultural_festival.4302 = { #Liege: Pick the gift for Vassal, mirror of cultural_ immediate = { if = { limit = { - root = { - has_any_artifact = yes - any_character_artifact = { - category = inventory - NOT = { has_variable = historical_unique_artifact } - NOT = { has_variable = received_as_cultural_gift } #make sure you don't give back the thing you just got - } + has_any_artifact = yes + any_character_artifact = { + category = inventory + NOT = { has_variable = historical_unique_artifact } + NOT = { has_variable = received_as_cultural_gift } #make sure you don't give back the thing you just got + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } } } random_character_artifact = { limit = { category = inventory - artifact_owner = root NOT = { has_variable = historical_unique_artifact } NOT = { has_variable = received_as_cultural_gift } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:stop_host_scope } } save_scope_as = existing_artifact } diff --git a/events/activities/tour_activity/tour_travel_events.txt b/events/activities/tour_activity/tour_travel_events.txt index c9480143..05aac49c 100644 --- a/events/activities/tour_activity/tour_travel_events.txt +++ b/events/activities/tour_activity/tour_travel_events.txt @@ -1739,7 +1739,10 @@ tour_travel.3120 = { chance = 50 set_variable = inn_artifact_var scope:vassal_inn = { - random_character_artifact = { save_scope_as = vassal_artifact } + random_character_artifact = { + limit = { artifact_can_be_gift_to_trigger = { RECIPIENT = root } } + save_scope_as = vassal_artifact + } } } } @@ -2043,7 +2046,7 @@ tour_travel.3130 = { trigger = { has_activity_intent = justice_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent capital_province.county = { add_county_modifier = { modifier = peasant_influx_modifier @@ -2272,7 +2275,7 @@ tour_travel.3140 = { } ################################################## -# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognisible, apologies. +# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognizable, apologies. # by Veronica Pazos # 3110-3111 ################################################## diff --git a/events/artifacts/historical_artifacts_events.txt b/events/artifacts/historical_artifacts_events.txt index 23bb3f19..851dcb3b 100644 --- a/events/artifacts/historical_artifacts_events.txt +++ b/events/artifacts/historical_artifacts_events.txt @@ -78,7 +78,7 @@ historical_artifacts.0023 = { } # Court Artifacts: Buddhism while = { - count = 6 + count = 12 random_character_with_royal_court = { limit = { faith.religion = religion:buddhism_religion @@ -351,6 +351,7 @@ historical_artifacts.0023 = { limit = { has_fp2_dlc_trigger = yes current_date >= 997.1.1 + current_date <= 1178.1.1 } title:c_toledo.holder = { create_artifact_various_aquamanile_santiago = { OWNER = this } @@ -363,6 +364,23 @@ historical_artifacts.0023 = { } } } + if = { + # If we're after Almanzor's raid, then the bells go to c_toledo's holder. + limit = { + has_fp2_dlc_trigger = yes + current_date >= 1178.1.1 + } + title:c_cordoba.holder = { + create_artifact_various_aquamanile_santiago = { OWNER = this } + # The bells have been morphed once. + scope:newly_created_artifact = { + set_variable = { + name = artefact_santiago_bells + value = 1 + } + } + } + } ## Weapons (including decoratives) ### Curtana #### Not the *actual* Curtana, but at least occasionally traced as Edward the Confessor's sword (and then ascribed an even more mythic origin from there). @@ -496,6 +514,165 @@ historical_artifacts.0023 = { create_artifact_spear_of_the_prophet_effect = { OWNER = this } } } + ### Banke no Hoken ~785 + if = { # Chrysanthemum Throne + limit = { + has_dlc_feature = royal_court + current_date >= 867.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_sakanoue_sword_effect = { OWNER = this } + } + } + ### Higekiri ~950 + if = { # Seiwa + limit = { + current_date = 1066.9.15 + exists = title:c_nf_minamoto_seiwa.holder + } + title:c_nf_minamoto_seiwa.holder = { + create_artifact_higekiri_sword_effect = { OWNER = this } + } + } + else_if = { # Kawachi + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_minamoto_kawachi.holder + } + title:c_nf_minamoto_kawachi.holder = { + create_artifact_higekiri_sword_effect = { OWNER = this } + } + } + ### Hizamaru ~950 + if = { # Kawachi + limit = { + current_date = 1066.9.15 + exists = title:c_nf_minamoto_kawachi.holder + } + title:c_nf_minamoto_kawachi.holder = { + create_artifact_hizamaru_sword_effect = { OWNER = this } + } + } + else_if = { # Yoshitsune + limit = { + current_date >= 1178.10.1 + exists = title:d_laamp_yoshitsune.holder + } + title:d_laamp_yoshitsune.holder = { + create_artifact_hizamaru_sword_effect = { OWNER = this } + } + } + ### Dojigiri ~880 + if = { # Uona + limit = { + current_date = 1066.9.15 + exists = title:c_nf_fujiwara_uona.holder + } + title:c_nf_fujiwara_uona.holder = { + create_artifact_dojigiri_sword_effect = { OWNER = this } + } + } + else_if = { # Oshu + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_fujiwara_oshu.holder + } + title:c_nf_fujiwara_oshu.holder = { + create_artifact_dojigiri_sword_effect = { OWNER = this } + } + } + ### Mikazuki Munechika ~980 + if = { # Kan'in + limit = { + current_date = 1066.9.15 + exists = title:c_nf_fujiwara_kanin.holder + } + title:c_nf_fujiwara_kanin.holder = { + create_artifact_mikazuki_munechika_sword_effect = { OWNER = this } + } + } + else_if = { # Tokudaiji + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_fujiwara_ashikaga.holder + } + title:c_nf_fujiwara_ashikaga.holder = { + create_artifact_mikazuki_munechika_sword_effect = { OWNER = this } + } + } + ### Ōtenta ~1082 + if = { # Kiso + limit = { + current_date >= 1178.10.1 + exists = title:c_nf_minamoto_kiso.holder + } + title:c_nf_minamoto_kiso.holder = { + create_artifact_odenta_sword_effect = { OWNER = this } + } + } + ### Hamayumi ~1145 + if = { # Chrysanthemum Throne + limit = { + has_dlc_feature = royal_court + current_date >= 1178.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_hamayumi_bow_effect = { OWNER = this } + } + } + ### Shichishitō <500 + if = { # Chrysanthemum Throne + limit = { + current_date >= 867.1.1 + exists = title:k_chrysanthemum_throne.holder + } + title:k_chrysanthemum_throne.holder = { + create_artifact_pedestal_seven_branched_sword_effect = { OWNER = this } + } + } + ### Gyerim-ro dagger ~867 + if = { # Silla + limit = { + current_date = 867.1.1 # Only 867 + exists = title:k_silla.holder + } + title:k_silla.holder = { + create_artifact_pedestal_gyerimro_dagger_effect = { OWNER = this } + } + } + ### Nukemaru ~1120 + if = { # Taira + limit = { + current_date >= 1178.1.1 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_nukemaru_sword_effect = { OWNER = this } + } + } + ### Kogarasumaru ~945 + if = { # Taira + limit = { + current_date >= 1066.9.15 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_kogarasumaru_sword_effect = { OWNER = this } + } + } + ## Armor + ### Karakawa ~800 + if = { # Taira + limit = { + current_date >= 867.1.1 + exists = title:c_nf_taira_kanmu.holder + } + title:c_nf_taira_kanmu.holder = { + create_artifact_karakawa_armor_effect = { OWNER = this } + } + } ## Books, Scrolls, & Other Recorded Nerdery ### Konagamana if = { @@ -768,6 +945,84 @@ historical_artifacts.0023 = { } } } + #Imperial Seals + every_character_with_royal_court = { + limit = { + has_tgp_dlc_trigger = yes + is_independent_ruler = yes + government_allows = merit + } + create_artifact_dynastic_imperial_seal_effect = { + OWNER = this + SMITH = this + } + } + title:k_chrysanthemum_throne.holder ?= { + create_artifact_dynastic_imperial_seal_effect = { + OWNER = this + SMITH = this + } + } + #Heirloom Seal + #Only in 867 + if = { + limit = { + has_tgp_dlc_trigger = yes + exists = title:h_china.holder + current_date <= 940.1.1 + } + title:h_china.holder = { + create_artifact_heirloom_seal_effect = { + OWNER = this + } + } + } + #Armillary Sphere + if = { + limit = { + has_tgp_dlc_trigger = yes + } + title:h_china.holder = { + create_artifact_chinese_armillary_sphere_effect = { + OWNER = this + } + } + } + #Eight-Fold Chest + if = { + limit = { + has_tgp_dlc_trigger = yes + } + title:h_china.holder = { + create_artifact_eight_fold_chest_effect = { + OWNER = this + } + } + } + #Complete Military Classics + if = { + limit = { + has_tgp_dlc_trigger = yes + current_date > 1150.1.1 #Needs to be long past creation date for this to make sense + } + title:h_china.holder = { + create_artifact_military_classics_effect = { + OWNER = this + } + } + } + #Green Stone Amitabha Buddha Statue + if = { + limit = { + has_tgp_dlc_trigger = yes + current_date >= 1066.5.1 + } + title:k_viet.holder = { + create_artifact_statue_viet_green_amitabha_buddha_effect = { + OWNER = this + } + } + } } } diff --git a/events/birth_events.txt b/events/birth_events.txt deleted file mode 100644 index 63dc983c..00000000 --- a/events/birth_events.txt +++ /dev/null @@ -1,4625 +0,0 @@ -#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/events/blackmail_events.txt b/events/blackmail_events.txt deleted file mode 100644 index 17225546..00000000 --- a/events/blackmail_events.txt +++ /dev/null @@ -1,292 +0,0 @@ -#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/events/bookmark_events.txt b/events/bookmark_events.txt deleted file mode 100644 index 7dd568ef..00000000 --- a/events/bookmark_events.txt +++ /dev/null @@ -1,2316 +0,0 @@ - -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/events/bp1_dan_events.txt b/events/bp1_dan_events.txt deleted file mode 100644 index 4fcbf40b..00000000 --- a/events/bp1_dan_events.txt +++ /dev/null @@ -1,4362 +0,0 @@ -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/events/court_events/01_ep3_court_events_3.txt b/events/court_events/01_ep3_court_events_3.txt index 125fd7cb..f006bb03 100644 --- a/events/court_events/01_ep3_court_events_3.txt +++ b/events/court_events/01_ep3_court_events_3.txt @@ -2929,22 +2929,24 @@ court_events.3120 = { any_courtier_or_guest = { is_available = yes OR = { - AND = { - inspiration ?= { - NOR = { - has_inspiration_type = adventure_inspiration - has_inspiration_type = alchemy_inspiration - has_inspiration_type = book_inspiration - } + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration } } AND = { has_completed_inspiration = yes var:created_artifact_type ?= { - NOR = { - this = flag:adventure - this = flag:alchemy - this = flag:book + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + this = flag:weaver + this = flag:artisan } } } @@ -3025,23 +3027,24 @@ court_events.3120 = { limit = { is_available = yes OR = { - AND = { - exists = inspiration - inspiration ?= { - NOR = { - has_inspiration_type = adventure_inspiration - has_inspiration_type = alchemy_inspiration - has_inspiration_type = book_inspiration - } + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration } } AND = { has_completed_inspiration = yes var:created_artifact_type ?= { - NOR = { - this = flag:adventure - this = flag:alchemy - this = flag:book + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + this = flag:weaver + this = flag:artisan } } } diff --git a/events/court_events/court_events_general.txt b/events/court_events/court_events_general.txt index 43a4a128..6fbcfaca 100644 --- a/events/court_events/court_events_general.txt +++ b/events/court_events/court_events_general.txt @@ -2486,6 +2486,7 @@ court.3031 = { option = { name = court.3031.c every_sub_realm_county = { + custom = every_culture_county_3031 limit = { culture = scope:reference_county.culture } @@ -8734,6 +8735,7 @@ court.8010 = { limit = { any_character_artifact = { count > 1 + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:underequipped } artifact_slot_type = primary_armament } } @@ -8741,6 +8743,7 @@ court.8010 = { limit = { is_equipped = no artifact_slot_type = primary_armament + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:underequipped } } order_by = { value = 0 @@ -13412,13 +13415,41 @@ court.9300 = { } immediate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = another_courtier_check + root = { + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + loves_food_trigger = yes + NOR = { + this = scope:another_courtier_check + is_of_major_interest_to_root_trigger = yes + } + is_of_minor_interest_to_root_trigger = yes + } + } + } + weight = { + base = 1 + modifier = { + add = 100 + is_knight = yes + } + } + save_scope_as = worried_courtier + court_event_character_flag_effect = yes + } random_courtier_or_guest = { limit = { is_available_ai_adult = yes has_court_event_flag = no loves_food_trigger = yes NOR = { - this = scope:another_courtier_check + this = scope:worried_courtier is_of_major_interest_to_root_trigger = yes } is_of_minor_interest_to_root_trigger = yes @@ -13439,21 +13470,6 @@ court.9300 = { save_scope_as = overindulger_target court_event_character_flag_effect = yes } - random_courtier = { - limit = { - is_available_ai_adult = yes - this != scope:overindulger_target - } - weight = { - base = 1 - modifier = { - add = 100 - is_knight = yes - } - } - save_scope_as = worried_courtier - court_event_character_flag_effect = yes - } } option = { # Stealing the King's treats, are we!? diff --git a/events/court_events/court_events_general_1.txt b/events/court_events/court_events_general_1.txt index 6391c4fa..1fbe000a 100644 --- a/events/court_events/court_events_general_1.txt +++ b/events/court_events/court_events_general_1.txt @@ -706,10 +706,7 @@ court_events.1010 = { scope:grander_ruler = { any_character_artifact = { ep1_artifact_is_court_artifact_trigger = yes - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - } + artifact_can_be_gift_advance_trigger = yes } } } @@ -717,10 +714,7 @@ court_events.1010 = { random_character_artifact = { limit = { ep1_artifact_is_court_artifact_trigger = yes - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - } + artifact_can_be_gift_advance_trigger = yes } save_scope_as = coveted_artifact } diff --git a/events/court_maintenance_events.txt b/events/court_maintenance_events.txt index 19ff1595..d31e9efa 100644 --- a/events/court_maintenance_events.txt +++ b/events/court_maintenance_events.txt @@ -292,8 +292,7 @@ court_maintenance.0011 = { # No owned house banner NOT = { any_character_artifact = { - has_variable = banner_house - var:banner_house = root.house + var:banner_house ?= root.house } } AND = { @@ -302,15 +301,14 @@ court_maintenance.0011 = { this = dynasty.dynast # Dynasty Head any_parent = { # Parent landless employer = prev - dynasty = prev.dynasty + dynasty ?= prev.dynasty this = dynasty.dynast } } # Dynasty banner does not exist NOT = { any_character_artifact = { - has_variable = banner_dynasty - var:banner_dynasty = root.dynasty + var:banner_dynasty ?= root.dynasty } } } diff --git a/events/decisions_events/east_europe_events.txt b/events/decisions_events/east_europe_events.txt index db76d256..b9bebf5b 100644 --- a/events/decisions_events/east_europe_events.txt +++ b/events/decisions_events/east_europe_events.txt @@ -30,12 +30,16 @@ #I united the western slavs east_europe.0001 = { #by Mathilda Bjarnehed type = character_event + window = big_event_window title = east_europe.0001.t desc = east_europe.0001.desc - theme = realm + theme = crown + override_effect_2d = { reference = legend_glow } + override_background = ep2_travel_farms left_portrait = { character = scope:western_slav_uniter - animation = personality_honorable + animation = sword_coup_degrace + camera = camera_event_center_very_large } immediate = { @@ -116,10 +120,14 @@ east_europe.0010 = { #by Mathilda Bjarnehed type = character_event title = east_europe.0010.t desc = east_europe.0010.desc - theme = realm + theme = crown + window = big_event_window + override_effect_2d = { reference = legend_glow } + override_background = courtyard left_portrait = { character = scope:slav_uniter - animation = personality_honorable + animation = jockey_wave + camera = camera_event_horse_right } immediate = { @@ -550,6 +558,12 @@ east_europe.0034 = { NOT = { religion = religion:magyar_religion } } set_character_faith_with_conversion = faith:magyar_pagan + if = { + limit = { + faith:magyar_pagan = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } #Those who aren't pagans are probably horrified. @@ -1480,6 +1494,12 @@ east_europe.0116 = { #I'll just quietly convert by myself. set_character_faith = scope:hof.faith + if = { + limit = { + scope:hof.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Costs you some piety, but easier to flip back from. add_piety = minor_piety_loss #Set up scope:accuser loc. @@ -1527,6 +1547,12 @@ east_europe.0116 = { #The realm must join me! set_character_faith_with_conversion = scope:hof.faith + if = { + limit = { + scope:hof.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #A pious act, from the POV of your new faith. add_piety = medium_piety_gain #Set up scope:accuser loc. @@ -2584,7 +2610,7 @@ east_europe.0125 = { #Default to yes. 100 = { trigger_event = { - id = east_europe.113 + id = east_europe.0113 days = { 7 14 } } diff --git a/events/decisions_events/iberia_north_africa_events.txt b/events/decisions_events/iberia_north_africa_events.txt index eedd45e4..5ded5411 100644 --- a/events/decisions_events/iberia_north_africa_events.txt +++ b/events/decisions_events/iberia_north_africa_events.txt @@ -1459,6 +1459,12 @@ iberia_north_africa.0122 = { } set_character_faith_with_conversion = scope:religious_leader.faith + if = { + limit = { + scope:religious_leader.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } show_as_tooltip = { scope:religious_leader = { favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes diff --git a/events/decisions_events/mpo_greatest_of_khans_events.txt b/events/decisions_events/mpo_greatest_of_khans_events.txt index 5cde29eb..727f5244 100644 --- a/events/decisions_events/mpo_greatest_of_khans_events.txt +++ b/events/decisions_events/mpo_greatest_of_khans_events.txt @@ -1043,7 +1043,7 @@ mpo_greatest_of_khans.0001 = { add_dynasty_prestige = fought_gok_alone_value } } - mpo_add_golden_lineage_effect = { CHARACTER = root } + mpo_add_golden_lineage_effect = yes } option = { @@ -1143,7 +1143,7 @@ mpo_greatest_of_khans.0002 = { custom_tooltip = gok_threatening_powers_tt custom_tooltip = mongol_invasion.1002.genghis_khan_tt custom_tooltip = gok_time_limit_end_decision_other_players_tt - mpo_add_golden_lineage_effect = { CHARACTER = scope:genghis_khan } + mpo_add_golden_lineage_effect = yes } if = { limit = { @@ -2493,7 +2493,7 @@ mpo_greatest_of_khans.1001 = { custom_tooltip = genghis_khan_mongol_troops_tt custom_tooltip = gok_threatening_powers_tt custom_tooltip = mongol_invasion.1002.genghis_khan_tt - mpo_add_golden_lineage_effect = { CHARACTER = scope:temujin } + mpo_add_golden_lineage_effect = yes } if = { diff --git a/events/decisions_events/roman_restoration_events.txt b/events/decisions_events/roman_restoration_events.txt index d6a3bc14..4372e531 100644 --- a/events/decisions_events/roman_restoration_events.txt +++ b/events/decisions_events/roman_restoration_events.txt @@ -1218,6 +1218,12 @@ roman_restoration.0101 = { } } set_character_faith = scope:mending_faith + if = { + limit = { + scope:mending_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } every_held_title = { title_tier = county set_county_faith = scope:mending_faith diff --git a/events/dlc/ach/ach_coronation_events.txt b/events/dlc/ach/ach_coronation_events.txt index 4aaa5aae..9dd7c393 100644 --- a/events/dlc/ach/ach_coronation_events.txt +++ b/events/dlc/ach/ach_coronation_events.txt @@ -4128,10 +4128,8 @@ scripted_trigger ach_coronation_0016_eligible_artifact = { NOR = { artifact_slot_type = helmet artifact_slot_type = regalia - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host } artifact_durability > 10 } @@ -4342,6 +4340,7 @@ ach_coronation.0016 = { } } ordered_character_artifact = { # Try and give away the worst one first + limit = { artifact_can_be_gift_to_trigger = { RECIPIENT = scope:host } } order_by = { value = 1 if = { @@ -5371,6 +5370,7 @@ scripted_trigger ach_coronation_0018_eligible_family_member_trigger = { scripted_trigger ach_coronation_0018_grantable_title_trigger = { tier = tier_county this != scope:host.capital_county + is_landless_type_title = no } scripted_effect ach_coronation_0018_choose_title_effect = { @@ -6356,6 +6356,13 @@ ach_coronation.0020 = { trigger = { involved_activity = { + activity_host = { + any_held_title = { + tier = tier_county + this != prev.capital_county + is_landless_type_title = no + } + } any_attending_character = { ach_coronation_0018_eligible_family_member_trigger = yes } @@ -6708,11 +6715,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 3 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > minor - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > minor } } } @@ -6738,11 +6743,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 10 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > minor - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > minor } } } @@ -6755,11 +6758,9 @@ ach_coronation.0022 = { # Ongoing plague any_sub_realm_county = { count >= 3 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity > major - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity > major } } } @@ -6788,11 +6789,9 @@ ach_coronation.0022 = { limit = { any_sub_realm_county = { count >= 4 - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity = apocalyptic - } + any_county_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic } } } @@ -6913,7 +6912,6 @@ ach_coronation.0022 = { } } } - custom_tooltip = available_because_intent_tt flavor = ach_coronation.0022.a.coronation_disrupt_loyalists.flavor reason = activity_intent skill = diplomacy @@ -7022,7 +7020,7 @@ ach_coronation.0022 = { option = { # It's not our goodly Host's fault! name = ach_coronation.0022.a.offer_support trigger = { has_activity_intent = coronation_offer_support } - custom_tooltip = available_because_intent_tt + reason = activity_intent flavor = ach_coronation.0022.a.offer_support.flavor add_piety = medium_piety_loss diff --git a/events/dlc/ach/ach_maintenance_events.txt b/events/dlc/ach/ach_maintenance_events.txt deleted file mode 100644 index c2167e80..00000000 --- a/events/dlc/ach/ach_maintenance_events.txt +++ /dev/null @@ -1,720 +0,0 @@ -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/events/dlc/bp3/bp3_journey_events.txt b/events/dlc/bp3/bp3_journey_events.txt index cbd89ed1..56b66d2a 100644 --- a/events/dlc/bp3/bp3_journey_events.txt +++ b/events/dlc/bp3/bp3_journey_events.txt @@ -5791,7 +5791,6 @@ bp3_journey.2200 = { is_available_healthy_ai_adult = yes bodyguard_validity_trigger = { EMPLOYER = root } } - is_valid_to_hire_court_position_type = master_of_spoils_camp_officer } random_pool_character = { province = scope:location diff --git a/events/dlc/bp3/bp3_mapmaking.txt b/events/dlc/bp3/bp3_mapmaking.txt deleted file mode 100644 index a956cfc0..00000000 --- a/events/dlc/bp3/bp3_mapmaking.txt +++ /dev/null @@ -1,2793 +0,0 @@ -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/events/dlc/bp3/bp3_roaming_events.txt b/events/dlc/bp3/bp3_roaming_events.txt deleted file mode 100644 index cd6b49a5..00000000 --- a/events/dlc/bp3/bp3_roaming_events.txt +++ /dev/null @@ -1,2828 +0,0 @@ -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/events/dlc/bp3/bp3_survey_events.txt b/events/dlc/bp3/bp3_survey_events.txt deleted file mode 100644 index 234a96cf..00000000 --- a/events/dlc/bp3/bp3_survey_events.txt +++ /dev/null @@ -1,4489 +0,0 @@ -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/events/dlc/ce1/epidemic_events.txt b/events/dlc/ce1/epidemic_events.txt index bc933f51..4e81bc37 100644 --- a/events/dlc/ce1/epidemic_events.txt +++ b/events/dlc/ce1/epidemic_events.txt @@ -90,6 +90,16 @@ epidemic_events.0100 = { title = epidemic_events.0100.t desc = epidemic_events.0100.desc theme = plague + override_background = { + trigger = { + NOT = { + capital_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + reference = tavern + } left_portrait = { character = root animation = fear @@ -110,6 +120,16 @@ epidemic_events.0101 = { title = epidemic_events.0101.t desc = epidemic_events.0101.desc theme = plague + override_background = { + trigger = { + NOT = { + capital_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + reference = courtyard + } left_portrait = { character = root animation = personality_content @@ -1833,7 +1853,7 @@ epidemic_events.1060 = { 20 = { trigger = { trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -2514,7 +2534,7 @@ epidemic_events.1063 = { AND = { is_witch_trigger = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -2522,7 +2542,7 @@ epidemic_events.1063 = { AND = { is_incestuous_trigger = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = root } @@ -6719,7 +6739,7 @@ epidemic_events.5007 = { trigger = { is_available = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } @@ -6760,7 +6780,7 @@ epidemic_events.5007 = { is_available_healthy_ai_adult = yes is_ai = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch FAITH = this.faith GENDER_CHARACTER = this } diff --git a/events/dlc/ce1/epidemic_events_2.txt b/events/dlc/ce1/epidemic_events_2.txt deleted file mode 100644 index 76c36da6..00000000 --- a/events/dlc/ce1/epidemic_events_2.txt +++ /dev/null @@ -1,951 +0,0 @@ -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/events/dlc/ce1/legend_events.txt b/events/dlc/ce1/legend_events.txt deleted file mode 100644 index 591f6c04..00000000 --- a/events/dlc/ce1/legend_events.txt +++ /dev/null @@ -1,790 +0,0 @@ -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/events/dlc/ce1/legend_spread_events_nick.txt b/events/dlc/ce1/legend_spread_events_nick.txt index 5f5c4358..e43c0029 100644 --- a/events/dlc/ce1/legend_spread_events_nick.txt +++ b/events/dlc/ce1/legend_spread_events_nick.txt @@ -4460,7 +4460,7 @@ legend_spread_events.5230 = { } # Just to ensure people are actually freaked out by this trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root } } @@ -6307,10 +6307,8 @@ legend_spread_events.5320 = { random_character_artifact = { limit = { + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:vassal } NOR = { - #Ensure it's not trash - has_variable = unwanted_artifact - #And doesn't have a claim on it any_artifact_claimant = { is_alive = no diff --git a/events/dlc/ce1/legend_spread_events_veronica.txt b/events/dlc/ce1/legend_spread_events_veronica.txt deleted file mode 100644 index 169f2d18..00000000 --- a/events/dlc/ce1/legend_spread_events_veronica.txt +++ /dev/null @@ -1,3067 +0,0 @@ -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/events/dlc/ce1/legitimacy_events.txt b/events/dlc/ce1/legitimacy_events.txt deleted file mode 100644 index 8b438237..00000000 --- a/events/dlc/ce1/legitimacy_events.txt +++ /dev/null @@ -1,32 +0,0 @@ -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/events/dlc/ce1/physician_epidemic_events.txt b/events/dlc/ce1/physician_epidemic_events.txt deleted file mode 100644 index 8e95c668..00000000 --- a/events/dlc/ce1/physician_epidemic_events.txt +++ /dev/null @@ -1,1479 +0,0 @@ -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/events/dlc/ep1/ep1_character_interaction_events.txt b/events/dlc/ep1/ep1_character_interaction_events.txt deleted file mode 100644 index 0d3f377f..00000000 --- a/events/dlc/ep1/ep1_character_interaction_events.txt +++ /dev/null @@ -1,719 +0,0 @@ -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/events/dlc/ep1/ep1_court_position_events.txt b/events/dlc/ep1/ep1_court_position_events.txt deleted file mode 100644 index 2908de75..00000000 --- a/events/dlc/ep1/ep1_court_position_events.txt +++ /dev/null @@ -1,552 +0,0 @@ -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/events/dlc/ep1/ep1_flavor_events.txt b/events/dlc/ep1/ep1_flavor_events.txt deleted file mode 100644 index bd237da1..00000000 --- a/events/dlc/ep1/ep1_flavor_events.txt +++ /dev/null @@ -1,6004 +0,0 @@ -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/events/dlc/ep1/ep1_fund_inspiration_events.txt b/events/dlc/ep1/ep1_fund_inspiration_events.txt index a1290099..2d65ccfb 100644 --- a/events/dlc/ep1/ep1_fund_inspiration_events.txt +++ b/events/dlc/ep1/ep1_fund_inspiration_events.txt @@ -1033,6 +1033,16 @@ scripted_trigger fund_inspiration_0031_title_based_option_trigger = { global_var:flag_created_siam_kingdom = root NOT = { exists = scope:book_topic_creation } } + AND = { + exists = global_var:flag_created_brunei_kingdom + global_var:flag_created_brunei_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_brunei_empire + global_var:flag_created_brunei_empire = root + NOT = { exists = scope:book_topic_creation } + } AND = { exists = global_var:flag_formed_rum_sultanate global_var:flag_formed_rum_sultanate = root @@ -2382,7 +2392,7 @@ fund_inspiration.0031 = { if = { limit = { NOT = { is_witch_trigger = yes } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } if = { limit = { @@ -2489,19 +2499,19 @@ fund_inspiration.0031 = { add = -70 exists = scope:lifestyle_option_witch NOT = { has_trait = witch } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } modifier = { # If it's hidden secrets it's rare that they write about it add = -70 exists = scope:lifestyle_option_deviant NOT = { has_trait = deviant } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = root } } modifier = { # If it's hidden secrets it's rare that they write about it add = -70 exists = scope:lifestyle_option_cannibal NOT = { has_trait = cannibal } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = root } } modifier = { #However, the might if they're arrogant add = 50 @@ -3586,11 +3596,7 @@ fund_inspiration.0043 = { } NOR = { any_artifact = { - trigger_if = { - limit = { exists = var:banner_dynasty } - var:banner_dynasty = root.dynasty - } - trigger_else = { always = no } + var:banner_dynasty ?= root.dynasty OR = { artifact_owner = root artifact_owner = { in_diplomatic_range = root } @@ -6811,15 +6817,15 @@ fund_inspiration.1031 = { OR = { AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_witch } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = root } } AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_cannibal } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = root } } AND = { scope:newly_created_artifact = { has_artifact_feature = book_subject_deviant } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = root } } } } @@ -15002,7 +15008,7 @@ scripted_trigger fund_inspiration_3001_witch_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:witch trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = root FAITH = root.faith } @@ -15011,7 +15017,7 @@ scripted_trigger fund_inspiration_3001_cannibal_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:cannibal trait_is_criminal_in_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root FAITH = root.faith } @@ -15020,7 +15026,7 @@ scripted_trigger fund_inspiration_3001_deviant_topic_trigger = { exists = scope:inspiration_owner.var:book_subject scope:inspiration_owner.var:book_subject = flag:deviant trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = root FAITH = root.faith } @@ -18427,8 +18433,8 @@ scripted_trigger homosexual_poet_trigger = { has_sexuality = bisexual } OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_shunned_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } } } @@ -18748,7 +18754,7 @@ fund_inspiration.6301 = { } triggered_desc = { trigger = { - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } } desc = fund_inspiration.6301.crime_desc } @@ -19898,7 +19904,7 @@ fund_inspiration.6513 = { if = { limit = { sex_same_as = scope:adventurer_lover - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:inspiration_owner } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:sodomite GENDER_CHARACTER = scope:inspiration_owner } } if = { limit = { @@ -19919,7 +19925,7 @@ fund_inspiration.6513 = { if = { limit = { sex_same_as = scope:inspiration_owner - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:adventurer_lover } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:sodomite GENDER_CHARACTER = scope:adventurer_lover } } if = { limit = { diff --git a/events/dlc/ep2/ep2_accolade_events.txt b/events/dlc/ep2/ep2_accolade_events.txt deleted file mode 100644 index 34c15bf2..00000000 --- a/events/dlc/ep2/ep2_accolade_events.txt +++ /dev/null @@ -1,1200 +0,0 @@ -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_esteemed_hospitality - } - } - 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/events/dlc/ep2/ep2_tournament_events.txt b/events/dlc/ep2/ep2_tournament_events.txt index b56f1652..f132f9dc 100644 --- a/events/dlc/ep2/ep2_tournament_events.txt +++ b/events/dlc/ep2/ep2_tournament_events.txt @@ -99,7 +99,7 @@ ep2_tournament_events.0001 = { # Go for their leg option = { name = ep2_tournament_events.0001.b - + duel = { skills = { intrigue prowess } target = scope:versus_contestant @@ -230,7 +230,7 @@ ep2_tournament_events.0002 = { } } custom_tooltip = ep2_tournament_events.0002.a.tt - + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } add_prestige = minor_prestige_gain @@ -276,11 +276,11 @@ ep2_tournament_events.0002 = { 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 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } stress_impact = { craven = medium_stress_impact_loss @@ -376,7 +376,7 @@ ep2_tournament_events.0003 = { contest_versus_player_vs_ai_trigger = yes trigger_if = { limit = { this = scope:versus_matchee } - scope:versus_matcher = { contest_versus_wants_to_resign_trigger = yes } + scope:versus_matcher = { contest_versus_wants_to_resign_trigger = yes } } trigger_else = { scope:versus_matchee = { contest_versus_wants_to_resign_trigger = yes } @@ -644,7 +644,7 @@ ep2_tournament_events.0004 = { # Blame your opponent option = { name = ep2_tournament_events.0004.a - + trigger = { has_trait = deceitful } @@ -859,14 +859,14 @@ ep2_tournament_events.0005 = { trigger = { scope:versus_contestant = { is_eunuch_trigger = no } } - animation = pain - } + animation = pain + } triggered_animation = { # Unfettered by any weak spots. BUILT DIFFERENT. trigger = { scope:versus_contestant = { is_eunuch_trigger = yes } } - animation = anger - } + animation = anger + } } trigger = { @@ -908,9 +908,9 @@ ep2_tournament_events.0005 = { } 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 = { @@ -954,7 +954,7 @@ ep2_tournament_events.0005 = { trigger = { scope:versus_contestant = { is_eunuch_trigger = no } } - + accolade_minimal_glory_gain_with_checks_effect = yes reverse_add_opinion = { @@ -1052,7 +1052,7 @@ ep2_tournament_events.0006 = { 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 = { @@ -1072,7 +1072,7 @@ ep2_tournament_events.0006 = { modifier = tournament_ended_rightly_modifier years = 15 } - } + } add_opinion = { target = root @@ -1081,7 +1081,7 @@ ep2_tournament_events.0006 = { } } - scope:activity = { + scope:activity = { add_activity_log_entry = { key = tournament_ended_rightly_log tags = { good } @@ -1136,7 +1136,7 @@ ep2_tournament_events.0006 = { 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 = { @@ -1302,7 +1302,7 @@ ep2_tournament_events.0007 = { # Refuse option = { name = ep2_tournament_events.0007.c - + scope:versus_contestant = { add_opinion = { target = root @@ -1360,7 +1360,7 @@ ep2_tournament_events.0010 = { # Attempt a risky counter option = { name = ep2_tournament_events.0010.a - + duel = { skills = { prowess intrigue } target = scope:versus_contestant @@ -1603,7 +1603,7 @@ ep2_tournament_events.0010 = { 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 } @@ -1672,7 +1672,7 @@ ep2_tournament_events.0011 = { # Pop it to your hand with the greatest of ease option = { name = ep2_tournament_events.0011.a - + trigger = { OR = { AND = { @@ -1691,7 +1691,7 @@ ep2_tournament_events.0011 = { 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 } @@ -1745,7 +1745,7 @@ ep2_tournament_events.0011 = { duel = { skills = { prowess intrigue } target = scope:versus_contestant - + 50 = { #It succeeds compare_modifier = { value = scope:duel_value @@ -1938,7 +1938,7 @@ ep2_tournament_events.0011 = { add_opinion = { target = root opinion = 5 - modifier = impressed_opinion + modifier = impressed_opinion } } } @@ -1977,10 +1977,10 @@ ep2_tournament_events.0011 = { # 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, +# "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 @@ -2004,7 +2004,7 @@ ep2_tournament_events.0012 = { trigger = { contest_versus_player_vs_ai_trigger = yes - has_character_flag = cloak_duelist_flag #Ensure you are wearing your DUELING CLOAK + has_character_flag = cloak_duelist_flag #Ensure you are wearing your DUELING CLOAK } immediate = { @@ -2016,7 +2016,7 @@ ep2_tournament_events.0012 = { # Proudly fight in the cloak option = { name = ep2_tournament_events.0012.a - + trigger = { has_trait = arrogant } @@ -2035,9 +2035,9 @@ ep2_tournament_events.0012 = { 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 = { @@ -2216,7 +2216,7 @@ ep2_tournament_events.0020 = { # Loudly reveal their secret option = { name = ep2_tournament_events.0020.a - + trigger = { scope:secret = { exists = this @@ -2235,7 +2235,7 @@ ep2_tournament_events.0020 = { scope:versus_contestant = { activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } } - + accolade_minor_glory_loss_with_checks_effect = yes reverse_add_opinion = { @@ -2278,7 +2278,7 @@ ep2_tournament_events.0020 = { # I know your seeeecreeeet! option = { name = ep2_tournament_events.0020.b - + trigger = { scope:secret = { exists = this @@ -2290,7 +2290,7 @@ ep2_tournament_events.0020 = { scope:versus_contestant = { activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } } - + accolade_minimal_glory_loss_with_checks_effect = yes reverse_add_opinion = { @@ -2382,7 +2382,7 @@ ep2_tournament_events.0020 = { # Decide against such underhanded tactics option = { name = ep2_tournament_events.0020.d - + accolade_minimal_glory_gain_with_checks_effect = yes stress_impact = { @@ -2468,7 +2468,7 @@ ep2_tournament_events.0021 = { # CoD lobby trash talk, 2009 option = { name = ep2_tournament_events.0021.a - + trigger = { OR = { has_trait = sadistic @@ -2520,7 +2520,7 @@ ep2_tournament_events.0021 = { scope:versus_contestant = { activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } } - + accolade_minimal_glory_gain_with_checks_effect = yes reverse_add_opinion = { @@ -2815,7 +2815,7 @@ ep2_tournament_events.1001 = { has_trait = arrogant } } - } + } } } @@ -2995,7 +2995,7 @@ ep2_tournament_events.1002 = { ai_chance = { base = 100 - } + } } } @@ -3077,7 +3077,7 @@ ep2_tournament_events.1003 = { } modifier = { #add a good physique too, for the same reasons add = 2 - + has_trait = physique_good } @@ -3224,7 +3224,7 @@ ep2_tournament_events.1004 = { faith = root.location.faith culture = root.location.culture save_scope_as = comely_stray - + } scope:comely_stray = { hidden_effect = { @@ -3256,7 +3256,7 @@ ep2_tournament_events.1004 = { } flavor = ep2_tournament_events.1004.a.tt - + accolade_minor_glory_gain_with_checks_effect = yes had_sex_with_effect = { @@ -3323,7 +3323,7 @@ ep2_tournament_events.1004 = { has_trait = seducer } } - + accolade_minimal_glory_gain_with_checks_effect = yes scope:comely_stray = { #Goodness, so dashing! @@ -3384,7 +3384,7 @@ ep2_tournament_events.1004 = { 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 } @@ -3536,7 +3536,7 @@ ep2_tournament_events.1005 = { character = root animation = poison } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -3547,25 +3547,84 @@ ep2_tournament_events.1005 = { } } - # Die + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_death_log + tags = { bad } + score = 10 + character = root + root = { + death = { + death_reason = death_tournament_melee_throat + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield option = { play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" - name = ep2_tournament_events.1005.a + name = ep2_tournament_events.1005.b remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign scope:activity = { add_activity_log_entry = { - key = tournament_melee_death_log + key = tournament_melee_wounded_log tags = { bad } score = 10 character = root + root = { + add_trait = disfigured + } + remove_from_guest_subset = { + name = qualified + target = root + } + add_to_guest_subset = { + name = spectator + target = root + } } } - - death = { - death_reason = death_tournament_melee_throat - } - ai_chance = { base = 100 } @@ -3624,7 +3683,7 @@ ep2_tournament_events.1006 = { character = scope:surrendering_knight animation = sword_yield_start } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -3713,7 +3772,7 @@ ep2_tournament_events.1006 = { value = tournament_hastiludes_xp_gain_minor_value } } - + scope:surrendering_knight = { accolade_medium_glory_loss_with_checks_effect = yes } @@ -3820,35 +3879,11 @@ ep2_tournament_events.1006 = { 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 - } - } - } + exists = scope:artifact } - 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:artifact = { + set_owner = root } scope:activity = { @@ -3880,7 +3915,7 @@ ep2_tournament_events.1006 = { count = 0 } gold < 4 - } + } } scope:surrendering_knight = { @@ -3952,7 +3987,7 @@ ep2_tournament_events.1007 = { lower_left_portrait = { character = scope:teammate_3 } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -3993,16 +4028,16 @@ ep2_tournament_events.1007 = { } random_guest_subset_current_phase = { name = team_alpha - limit = { - contest_event_general_contestant_valid_trigger = yes + 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 + limit = { + contest_event_general_contestant_valid_trigger = yes NOR = { this = scope:teammate_1 this = scope:teammate_2 @@ -4350,7 +4385,7 @@ ep2_tournament_events.1011 = { any_guest_subset_current_phase = { name = team_alpha this = root - } + } } random_guest_subset_current_phase = { name = team_beta @@ -4837,7 +4872,7 @@ ep2_tournament_events.1011 = { stress_impact = { brave = major_stress_impact_gain ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain + arrogant = medium_stress_impact_gain craven = medium_stress_impact_loss content = miniscule_stress_impact_loss } @@ -4919,7 +4954,7 @@ ep2_tournament_events.1011 = { } activity_tournament_change_contestant_score_effect = { SCORE = increase_major } - + accolade_medium_glory_gain_with_checks_effect = yes } } @@ -4934,7 +4969,7 @@ ep2_tournament_events.1011 = { 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 } @@ -5043,7 +5078,7 @@ ep2_tournament_events.1011 = { stress_impact = { brave = major_stress_impact_gain ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain + arrogant = medium_stress_impact_gain craven = medium_stress_impact_loss content = miniscule_stress_impact_loss } @@ -5078,7 +5113,7 @@ ep2_tournament_events.1012 = { character = scope:caught_opponent animation = shock } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -5261,7 +5296,7 @@ ep2_tournament_events.1012 = { right_icon = scope:caught_opponent activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } - + accolade_minor_glory_gain_with_checks_effect = yes if = { @@ -5333,7 +5368,7 @@ ep2_tournament_events.1012 = { 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 } @@ -5578,7 +5613,7 @@ ep2_tournament_events.1013 = { any_guest_subset_current_phase = { name = team_alpha this = root - } + } } random_guest_subset_current_phase = { name = team_beta @@ -5872,7 +5907,7 @@ ep2_tournament_events.1015 = { character = root animation = shock } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -5884,7 +5919,7 @@ ep2_tournament_events.1015 = { } any_guest_subset_current_phase = { name = team_alpha - contest_event_general_contestant_valid_trigger = yes + 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 @@ -5900,7 +5935,7 @@ ep2_tournament_events.1015 = { } any_guest_subset_current_phase = { name = team_beta - contest_event_general_contestant_valid_trigger = yes + 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 @@ -5922,7 +5957,7 @@ ep2_tournament_events.1015 = { any_guest_subset_current_phase = { name = team_alpha this = root - } + } } random_guest_subset_current_phase = { name = team_alpha @@ -6164,7 +6199,7 @@ ep2_tournament_events.1016 = { character = scope:mysterious_knight animation = marshal } - cooldown = { years = 5 } + cooldown = { years = 1 } immediate = { hidden_effect = { @@ -6382,7 +6417,7 @@ ep2_tournament_events.1016 = { limit = { scope:mysterious_knight.liege = root } - scope:mysterious_knight = { + scope:mysterious_knight = { if = { limit = { exists = var:progress_to_victory } remove_variable = progress_to_victory @@ -6444,7 +6479,7 @@ ep2_tournament_events.1017 = { lower_left_portrait = { character = scope:knight_3 } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { scope:activity = { @@ -6468,7 +6503,7 @@ ep2_tournament_events.1017 = { any_guest_subset_current_phase = { name = team_beta contest_event_general_contestant_valid_trigger = yes - this != root + this != root } } } @@ -6493,16 +6528,16 @@ ep2_tournament_events.1017 = { } random_guest_subset_current_phase = { name = team_beta - limit = { - contest_event_general_contestant_valid_trigger = yes + 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 + limit = { + contest_event_general_contestant_valid_trigger = yes NOR = { this = scope:knight_1 this = scope:knight_2 @@ -6695,7 +6730,7 @@ ep2_tournament_events.1017 = { send_interface_toast = { title = ep2_tournament_events.1017.b.failure left_icon = root - + add_stress = minor_stress_gain } } @@ -6745,7 +6780,7 @@ ep2_tournament_events.1018 = { character = scope:family animation = admiration } - cooldown = { years = 5 } + cooldown = { years = 1 } trigger = { exists = house @@ -6832,7 +6867,7 @@ ep2_tournament_events.1018 = { if = { limit = { house = { - NOT = { + NOT = { has_house_modifier = tournament_house_unity_modifier } } @@ -6842,7 +6877,7 @@ ep2_tournament_events.1018 = { modifier = tournament_house_unity_modifier years = 15 desc = tournament_house_unity_modifier_desc - } + } } } else = { @@ -6891,7 +6926,7 @@ ep2_tournament_events.1018 = { scope:family = { add_trait = loyal } - } + } if = { limit = { @@ -6979,8 +7014,8 @@ ep2_tournament_events.1501 = { scope:activity = { random_guest_subset_current_phase = { name = qualified - limit = { - is_alive = yes + limit = { + is_alive = yes is_ai = yes # To ensure we don't reveal player secrets } save_scope_as = competitor @@ -7540,7 +7575,7 @@ ep2_tournament_events.1503 = { duel = { skills = { diplomacy intrigue } value = medium_skill_rating - # Find a + # Find a 1 = { desc = ep2_tournament_events.1503.b.success show_chance = yes @@ -7763,7 +7798,7 @@ ep2_tournament_events.2001 = { has_trait = arrogant } } - } + } } } @@ -7788,7 +7823,7 @@ ep2_tournament_events.2002 = { NOT = { #Make sure player has two hands with which to fight has_trait = maimed } - contest_versus_player_vs_ai_trigger = yes + contest_versus_player_vs_ai_trigger = yes } immediate = { @@ -8385,7 +8420,7 @@ ep2_tournament_events.2005 = { has_trait = chaste } } - + had_sex_with_effect = { CHARACTER = scope:versus_contestant PREGNANCY_CHANCE = 50 @@ -8603,22 +8638,77 @@ ep2_tournament_events.2006 = { tournament_pivotal_flavor_variable_effect = { CONTEST = wrestling ID = 2006 } } - # Die + # Chance to die option = { - name = ep2_tournament_events.2006.a + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.a + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + root = { + death = { + death_reason = death_tournament_piledriver + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b - hidden_effect = { - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } - } - death = { - death_reason = death_tournament_piledriver - } + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign scope:activity = { add_activity_log_entry = { - key = tournament_wrestling_death_log + key = tournament_melee_wounded_log tags = { bad } score = 10 character = root + root = { + add_trait = disfigured + } + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + } } } ai_chance = { @@ -8673,8 +8763,8 @@ ep2_tournament_events.2007 = { scope:activity = { random_guest_subset_current_phase = { name = spectator - limit = { - is_alive = yes + limit = { + is_alive = yes is_adult = yes NOR = { this = scope:versus_matchee @@ -9059,7 +9149,7 @@ ep2_tournament_events.2501 = { } 30 = { #It works reasonably well custom_tooltip = ep2_tournament_events.2501.a.tt.success - + modifier = { add = 10 prowess > high_skill_rating @@ -9074,13 +9164,13 @@ ep2_tournament_events.2501 = { } } 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 @@ -9142,7 +9232,7 @@ ep2_tournament_events.2502 = { add = 10 has_trait = lifestyle_herbalist } - + send_interface_toast = { title = ep2_tournament_events.2502.a.tt.success left_icon = root @@ -9192,7 +9282,7 @@ ep2_tournament_events.2502 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = craven @@ -9231,7 +9321,7 @@ ep2_tournament_events.2502 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -9239,7 +9329,7 @@ ep2_tournament_events.2502 = { has_trait = ambitious } } - } + } } } @@ -9341,7 +9431,7 @@ ep2_tournament_events.2503 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -9605,7 +9695,7 @@ ep2_tournament_events.2504 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -9640,7 +9730,7 @@ ep2_tournament_events.2504 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -9677,27 +9767,77 @@ ep2_tournament_events.2506 = { contest_versus_player_vs_ai_scope_effect = yes } - # Urk! + # Chance to die option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" name = ep2_tournament_events.2506.a - - hidden_effect = { - tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_wrestling_death_log + tags = { bad } + score = 10 + character = root + death = { + death_reason = death_tournament_roundhouse + } + } + } + } } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign scope:activity = { add_activity_log_entry = { - key = tournament_wrestling_death_log + key = tournament_melee_wounded_log tags = { bad } score = 10 character = root + root = { + add_trait = disfigured + } } } - - death = { - death_reason = death_tournament_roundhouse + hidden_effect = { + tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } } - ai_chance = { base = 100 } @@ -9916,7 +10056,7 @@ ep2_tournament_events.2507 = { ai_chance = { base = 100 - } + } } } @@ -9975,8 +10115,8 @@ ep2_tournament_events.3501 = { scope:activity = { random_guest_subset_current_phase = { name = contestant - limit = { - tournament_events_3501_knight_trigger = yes + limit = { + tournament_events_3501_knight_trigger = yes is_alive = yes } save_scope_as = knight1 @@ -10006,7 +10146,7 @@ ep2_tournament_events.3501 = { modifier = flattered_opinion opinion = 50 } - + accolade_medium_glory_gain_with_checks_effect = yes scope:knight2 = { @@ -10051,7 +10191,7 @@ ep2_tournament_events.3501 = { modifier = flattered_opinion opinion = 50 } - + accolade_medium_glory_gain_with_checks_effect = yes scope:knight1 = { @@ -10152,12 +10292,12 @@ ep2_tournament_events.3501 = { # 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 = { @@ -10246,12 +10386,12 @@ ep2_tournament_events.3502 = { trigger = { this = scope:host } - + if = { - limit = { activity_is_competing_trigger = yes} + limit = { activity_is_competing_trigger = yes} activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } } - + add_prestige = medium_prestige_loss progress_towards_rival_effect = { @@ -10270,7 +10410,7 @@ ep2_tournament_events.3502 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = forgiving @@ -10291,11 +10431,11 @@ ep2_tournament_events.3502 = { OPINION = default_rival_opinion } - reverse_add_opinion = { - target = scope:host - modifier = angry_opinion - opinion = -30 - } + reverse_add_opinion = { + target = scope:host + modifier = angry_opinion + opinion = -30 + } stress_impact = { forgiving = medium_stress_impact_gain @@ -10303,7 +10443,7 @@ ep2_tournament_events.3502 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = forgiving @@ -10322,11 +10462,11 @@ ep2_tournament_events.3502 = { limit = { this != scope:host } - reverse_add_opinion = { - target = scope:host - modifier = grateful_opinion - opinion = 30 - } + reverse_add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 30 + } } stress_impact = { @@ -10336,7 +10476,7 @@ ep2_tournament_events.3502 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = greedy @@ -10347,11 +10487,11 @@ ep2_tournament_events.3502 = { option = { # Pull out name = ep2_tournament_events.3502.d - reverse_add_opinion = { - target = scope:competitor - modifier = compliment_opinion - opinion = 20 - } + reverse_add_opinion = { + target = scope:competitor + modifier = compliment_opinion + opinion = 20 + } stress_impact = { arrogant = minor_stress_impact_gain @@ -10360,7 +10500,7 @@ ep2_tournament_events.3502 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -10409,7 +10549,7 @@ ep2_tournament_events.3503 = { scope:activity = { random_guest_subset_current_phase = { name = contestant - limit = { + limit = { contest_event_general_contestant_valid_trigger = yes is_landed = no #Make sure they're not a noble is_lowborn = yes #...and again @@ -10531,7 +10671,7 @@ ep2_tournament_events.3503 = { } } } - } + } ai_chance = { base = 100 @@ -10616,7 +10756,7 @@ ep2_tournament_events.3503 = { 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 } @@ -10647,7 +10787,7 @@ ep2_tournament_events.3503 = { } option = { # Laugh at them name = ep2_tournament_events.3503.d - custom_tooltip = available_because_intent_tt + reason = activity_intent trigger = { has_activity_intent = reduce_stress_intent } progress_towards_rival_effect = { @@ -10691,35 +10831,84 @@ ep2_tournament_events.3504 = { } } - option = { # Ouch! + # Chance to die + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" name = ep2_tournament_events.3504.a - - 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 + duel = { + skill = prowess + value = root.contest_aptitude_fetch_value + 30 = { + desc = ep2_tournament_events.1005.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + scope:activity = { + add_activity_log_entry = { + key = tournament_accident_wounded_log + tags = { bad } + score = 5 + character = root + root = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + } + 10 = { + desc = ep2_tournament_events.1005.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 } - scope:activity = { add_activity_log_entry = { key = tournament_quintain_death_log tags = { bad } score = 10 character = root + root = { + death = { + death_reason = death_tournament_quintain_hit + } + } } } } } + ai_chance = { + base = 100 + } + } + # Yield + option = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ConstructionKits/ep2_event_grand_tournament_ck_metal_clash" + name = ep2_tournament_events.1005.b + remove_variable = contest_aptitude + custom_tooltip = ep2_tournament_events.1005.resign + scope:activity = { + add_activity_log_entry = { + key = tournament_melee_wounded_log + tags = { bad } + score = 10 + character = root + root = { + add_trait = disfigured + } + remove_from_guest_subset = { + name = qualified + target = root + } + add_to_guest_subset = { + name = spectator + target = root + } + } + } ai_chance = { base = 100 } @@ -10750,7 +10939,7 @@ ep2_tournament_events.4001 = { trigger = { #DLC check. #has_ep2_dlc_trigger = yes - + #Standard checks. contest_versus_player_vs_ai_trigger = yes } @@ -10775,7 +10964,7 @@ ep2_tournament_events.4001 = { trigger = { OR = { has_trait = physique_good - has_trait = strong + has_trait = strong } } @@ -10850,7 +11039,7 @@ ep2_tournament_events.4001 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -10924,11 +11113,11 @@ ep2_tournament_events.4002 = { } } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 40 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 40 + } add_prestige = medium_prestige_gain @@ -10957,11 +11146,11 @@ ep2_tournament_events.4002 = { option = { # Help them up name = ep2_tournament_events.4002.b - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 15 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 15 + } add_prestige = minor_prestige_gain @@ -10976,7 +11165,7 @@ ep2_tournament_events.4002 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11045,11 +11234,11 @@ ep2_tournament_events.4003 = { flavor = ep2_tournament_events.4003.a.tt - reverse_add_opinion = { - target = scope:versus_contestant - modifier = annoyed_opinion - opinion = -40 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = annoyed_opinion + opinion = -40 + } activity_tournament_change_contestant_score_effect = { SCORE = increase_major } @@ -11065,7 +11254,7 @@ ep2_tournament_events.4003 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11126,7 +11315,7 @@ ep2_tournament_events.4003 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11152,7 +11341,7 @@ ep2_tournament_events.4003 = { multiplier = 3.5 min = -49 } - + send_interface_toast = { title = ep2_tournament_events.4003.c.tt.win left_icon = root @@ -11200,7 +11389,7 @@ ep2_tournament_events.4003 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11245,11 +11434,11 @@ ep2_tournament_events.4004 = { option = { # Accept name = ep2_tournament_events.4004.a - reverse_add_opinion = { - target = scope:versus_contestant - modifier = respect_opinion - opinion = 30 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = respect_opinion + opinion = 30 + } duel = { skill = prowess @@ -11311,7 +11500,7 @@ ep2_tournament_events.4004 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11428,7 +11617,7 @@ ep2_tournament_events.4005 = { 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 = { @@ -11501,7 +11690,7 @@ ep2_tournament_events.4005 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11558,7 +11747,7 @@ ep2_tournament_events.4005 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11631,7 +11820,7 @@ ep2_tournament_events.4006 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11662,7 +11851,7 @@ ep2_tournament_events.4006 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11740,11 +11929,11 @@ ep2_tournament_events.4007 = { has_trait = callous } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_agreed_opinion - opinion = 30 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = tournament_agreed_opinion + opinion = 30 + } reverse_add_opinion = { target = root @@ -11759,7 +11948,7 @@ ep2_tournament_events.4007 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = gregarious @@ -11774,11 +11963,11 @@ ep2_tournament_events.4007 = { activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = angry_opinion - opinion = -30 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = angry_opinion + opinion = -30 + } scope:groom = { reverse_add_opinion = { @@ -11823,7 +12012,7 @@ ep2_tournament_events.4007 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -11884,7 +12073,7 @@ ep2_tournament_events.4008 = { name = ep2_tournament_events.4008.a random_list = { 45 = { #You win - + modifier = { #Skill buff add = 15 prowess > high_skill_rating @@ -11948,7 +12137,7 @@ ep2_tournament_events.4008 = { } } } - 15 = { #You get injured by the crowd throwing stuff at you + 15 = { #You get injured by the crowd throwing stuff at you modifier = { add = 10 has_trait = sadistic @@ -12013,14 +12202,14 @@ ep2_tournament_events.4008 = { } 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 } @@ -12032,7 +12221,7 @@ ep2_tournament_events.4008 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = brave @@ -12078,7 +12267,7 @@ ep2_tournament_events.4009 = { has_trait = arrogant } } - + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } progress_towards_rival_effect = { @@ -12103,7 +12292,7 @@ ep2_tournament_events.4009 = { has_trait = just has_trait = gregarious } - } + } } } # Lend them a lance @@ -12124,11 +12313,11 @@ ep2_tournament_events.4009 = { } } - reverse_add_opinion = { - target = scope:versus_contestant - modifier = grateful_opinion - opinion = 30 - } + reverse_add_opinion = { + target = scope:versus_contestant + modifier = grateful_opinion + opinion = 30 + } stress_impact = { compassionate = minor_stress_impact_loss @@ -12140,10 +12329,10 @@ ep2_tournament_events.4009 = { ai_chance = { base = 100 - + modifier = { factor = 0 - OR = { + OR = { has_trait = callous has_trait = arbitrary } @@ -12168,7 +12357,7 @@ ep2_tournament_events.4009 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -12241,7 +12430,7 @@ ep2_tournament_events.5501 = { has_trait = shrewd } } - + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } if = { @@ -12265,7 +12454,7 @@ ep2_tournament_events.5501 = { modifier = { factor = 0 - } + } } } @@ -12275,7 +12464,7 @@ ep2_tournament_events.5501 = { random_list = { 9 = { #It goes well - + modifier = { #Skill buff add = 15 diplomacy > high_skill_rating @@ -12602,7 +12791,7 @@ ep2_tournament_events.5502 = { ai_chance = { base = 100 - + modifier = { factor = 0 OR = { @@ -12629,10 +12818,11 @@ ep2_tournament_events.5502 = { ai_chance = { base = 100 - + modifier = { factor = 0 has_trait = honest + } } } @@ -13066,7 +13256,7 @@ ep2_tournament_events.5504 = { modifier = { factor = 0 has_trait = brave - } + } } } } @@ -13079,7 +13269,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.desc first_valid = { triggered_desc = { - trigger = { + trigger = { scope:enemy = { AND = { is_female = no @@ -13093,7 +13283,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.start.malevirgin } triggered_desc = { - trigger = { + trigger = { scope:enemy = { AND = { is_female = yes @@ -13107,7 +13297,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.start.femalevirgin } triggered_desc = { - trigger = { + trigger = { scope:enemy = { age > 60 } @@ -13115,7 +13305,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.start.old } triggered_desc = { - trigger = { + trigger = { scope:enemy = { current_weight > 50 } @@ -13123,7 +13313,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.start.fat } triggered_desc = { - trigger = { + trigger = { scope:enemy = { has_trait = compassionate } @@ -13134,7 +13324,7 @@ ep2_tournament_events.5505 = { desc = ep2_tournament_events.5505.start.soft } triggered_desc = { - trigger = { + trigger = { has_trait = compassionate } desc = ep2_tournament_events.5505.start.compassionate @@ -13195,7 +13385,7 @@ ep2_tournament_events.5505 = { } } } - + add_internal_flag = special activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } @@ -13247,7 +13437,7 @@ ep2_tournament_events.5505 = { has_trait = chaste has_trait = celibate } - } + } } } @@ -13261,7 +13451,7 @@ ep2_tournament_events.5505 = { } add_internal_flag = special - + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } if = { @@ -13307,7 +13497,7 @@ ep2_tournament_events.5505 = { has_trait = compassionate has_trait = gregarious } - } + } } } @@ -13324,7 +13514,7 @@ ep2_tournament_events.5505 = { } add_internal_flag = special - + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } if = { @@ -13370,7 +13560,7 @@ ep2_tournament_events.5505 = { has_trait = compassionate has_trait = gregarious } - } + } } } @@ -13385,7 +13575,7 @@ ep2_tournament_events.5505 = { } add_internal_flag = special - + activity_tournament_change_contestant_score_effect = { SCORE = decrease_minor } reverse_add_opinion = { @@ -13411,7 +13601,7 @@ ep2_tournament_events.5505 = { } add_internal_flag = special - + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } progress_towards_rival_effect = { @@ -13468,7 +13658,7 @@ ep2_tournament_events.5505 = { has_trait = compassionate has_trait = gregarious } - } + } } } @@ -13479,7 +13669,7 @@ ep2_tournament_events.5505 = { trigger = { has_trait = compassionate } - + add_internal_flag = special activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } @@ -13517,7 +13707,7 @@ ep2_tournament_events.5505 = { has_trait = sadistic has_trait = arrogant } - } + } } } @@ -13558,14 +13748,14 @@ ep2_tournament_events.5505 = { 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 = { @@ -13584,7 +13774,7 @@ ep2_tournament_events.5505 = { has_trait = sadistic has_trait = arrogant } - } + } } } } @@ -13969,7 +14159,7 @@ ep2_tournament_events.6501 = { option = { name = ep2_tournament_events.6501.b duel = { - skill = prowess + skill = prowess value = high_skill_rating #You succeed! 50 = { @@ -14157,7 +14347,7 @@ ep2_tournament_events.6502 = { has_trait = just has_trait = gregarious } - } + } } } @@ -14165,7 +14355,7 @@ ep2_tournament_events.6502 = { option = { name = ep2_tournament_events.6502.b - trigger = { + trigger = { court_physician_available_trigger = yes } @@ -14277,10 +14467,10 @@ ep2_tournament_events.6502 = { ai_chance = { base = 100 - + modifier = { factor = 0 - OR = { + OR = { has_trait = callous has_trait = arbitrary } @@ -14383,7 +14573,7 @@ ep2_tournament_events.6503 = { scope:activity = { any_guest_subset_current_phase = { count >= 2 - name = qualified + name = qualified contest_event_general_contestant_valid_trigger = yes } } diff --git a/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt b/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt deleted file mode 100644 index 7712d777..00000000 --- a/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt +++ /dev/null @@ -1,1845 +0,0 @@ -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/events/dlc/ep2/wedding_events/ep2_wedding_events.txt b/events/dlc/ep2/wedding_events/ep2_wedding_events.txt deleted file mode 100644 index a43c5821..00000000 --- a/events/dlc/ep2/wedding_events/ep2_wedding_events.txt +++ /dev/null @@ -1,23494 +0,0 @@ -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/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt b/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt index b1300e26..ce79de40 100644 --- a/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt +++ b/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt @@ -1081,7 +1081,7 @@ ep2_wedding_ewan.0001 = { name = ep2_wedding_ewan.0001.c flavor = ep2_wedding_ewan.0001.c.tt trigger = { has_activity_intent = murder_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:intent_target = { # They're unsettled by your staring. @@ -1899,7 +1899,7 @@ ep2_wedding_ewan.0011 = { name = ep2_wedding_ewan.0011.c # Check for target directly, rather than just the intent, because there isn't a pre-defined intent target and we may have failed to acquire someone suitable. trigger = { exists = scope:intent_target } - custom_tooltip = available_because_intent_tt + reason = activity_intent # You try to trip a server onto someone. duel = { @@ -2744,7 +2744,7 @@ ep2_wedding_ewan.0021 = { option = { name = ep2_wedding_ewan.0021.c trigger = { has_activity_intent = woo_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Sprinkle a bit of opinion in there. reverse_add_opinion = { @@ -3246,7 +3246,7 @@ ep2_wedding_ewan.0031 = { option = { name = ep2_wedding_ewan.0031.g trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Decent middling prestige. add_prestige = medium_prestige_gain @@ -3463,7 +3463,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.b trigger = { has_activity_intent = reduce_stress_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # If you're the host, gain prestige. if = { @@ -3499,7 +3499,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.c trigger = { has_activity_intent = murder_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent scope:intent_target = { # They're a bit freaked out. @@ -3531,7 +3531,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.d trigger = { has_activity_intent = woo_attendee_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # You try to keep it juuuuust about down-low. duel = { @@ -3624,7 +3624,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.e trigger = { has_activity_intent = diplomatic_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Try to give a big, impressive speech. duel = { @@ -3694,7 +3694,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.f trigger = { has_activity_intent = matchmaking_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Gain opinion with scope:activity_intent. reverse_add_opinion = { @@ -3729,7 +3729,7 @@ ep2_wedding_ewan.0041 = { option = { name = ep2_wedding_ewan.0041.g trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # We take your highest of diplomacy or intrigue and let you duel against it. if = { @@ -3840,7 +3840,7 @@ scripted_trigger ep2_wedding_ewan_0051_legal_rake_trigger = { save_temporary_scope_as = char_temp NOT = { trait_is_criminal_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer FAITH = scope:char_temp.faith GENDER_CHARACTER = scope:char_temp } @@ -5707,7 +5707,7 @@ ep2_wedding_ewan.0061 = { option = { name = ep2_wedding_ewan.0061.d trigger = { has_activity_intent = banquet_mischief_intent } - custom_tooltip = available_because_intent_tt + reason = activity_intent # Same as the .e rolls, but we remove the minor result and just roll between success & crit success. duel = { diff --git a/events/dlc/ep3/ep3_contract_events.txt b/events/dlc/ep3/ep3_contract_events.txt deleted file mode 100644 index 3639690c..00000000 --- a/events/dlc/ep3/ep3_contract_events.txt +++ /dev/null @@ -1,10151 +0,0 @@ -################################################### -## 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/events/dlc/ep3/ep3_decisions_events.txt b/events/dlc/ep3/ep3_decisions_events.txt index e62bc50e..9dd4f653 100644 --- a/events/dlc/ep3/ep3_decisions_events.txt +++ b/events/dlc/ep3/ep3_decisions_events.txt @@ -2650,7 +2650,7 @@ ep3_decisions_event.2090 = { remove_variable = confirmation_grace } # Refund any costs - add_prestige = standard_activity_cost + add_prestige = standard_activity_base_cost } trigger_event = ep3_decisions_event.2080 } @@ -4429,6 +4429,12 @@ ep3_decisions_event.4022 = { participants = { missionary = scope:evangelizer sender = scope:sender } } set_character_faith_with_conversion = scope:evangelizer.faith + if = { + limit = { + scope:evangelizer.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } custom_tooltip = ep3_decisions_event.4022.a.tt custom_tooltip = negotiated_alliance_delay_tt show_as_tooltip = { @@ -5171,6 +5177,23 @@ ep3_decisions_event.4060 = { } add_character_modifier = { modifier = first_admin_emperor } } + # NF tooltip + if = { + limit = { exists = scope:new_title } # some gov types don't need to create a new title + get_title = scope:new_title + } + # Adopting vassal tooltip + every_powerful_vassal = { + limit = { has_same_government = root } + switch = { + trigger = has_government + japan_administrative_government = { change_government = japan_administrative_government } + celestial_government = { change_government = celestial_government } + meritocratic_government = { change_government = meritocratic_government } + steppe_admin_government = { change_government = steppe_admin_government } + fallback = { change_government = administrative_government } + } + } } hidden_effect = { ordered_vassal = { @@ -6138,6 +6161,17 @@ ep3_decisions_event.4090 = { desc = appointment_timeout_desc_retired_governor } } + else_if = { + limit = { + government_is_japanese_trigger = yes + } + add_gold = major_gold_value + change_influence = major_influence_value + add_character_modifier = { + modifier = renounced_governorship_japan + years = 15 + } + } else = { add_gold = massive_gold_value add_character_modifier = { @@ -6766,14 +6800,14 @@ ep3_decisions_event.5020 = { ordered_in_list = { list = available_heresies order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_1 } ordered_in_list = { list = available_heresies limit = { this != scope:heresy_1 } order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_2 } ordered_in_list = { @@ -6783,7 +6817,7 @@ ep3_decisions_event.5020 = { this != scope:heresy_2 } order_by = num_county_followers - position = 1 + position = 0 save_scope_as = heresy_3 } } @@ -6791,6 +6825,12 @@ ep3_decisions_event.5020 = { option = { name = ep3_decisions_event.5020.a set_character_faith_with_conversion = scope:heresy_1 + if = { + limit = { + scope:heresy_1 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6830,6 +6870,12 @@ ep3_decisions_event.5020 = { exists = scope:heresy_2 } set_character_faith_with_conversion = scope:heresy_2 + if = { + limit = { + scope:heresy_2 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6869,6 +6915,12 @@ ep3_decisions_event.5020 = { exists = scope:heresy_3 } set_character_faith_with_conversion = scope:heresy_3 + if = { + limit = { + scope:heresy_3 = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_heresiarch_trait_effect = yes # Otherwise the conversion event will remove the trait add_character_flag = converted_by_heresy_decision @@ -6995,6 +7047,12 @@ ep3_decisions_event.5021 = { root = { primary_title = { set_state_faith = scope:heresy } set_character_faith_with_conversion = scope:heresy + if = { + limit = { + scope:heresy = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_opinion = { target = scope:heretic modifier = forced_state_heresy_opinion @@ -7376,9 +7434,22 @@ ep3_decisions_event.6001 = { } } scope:liege = { save_scope_as = new_liege } + location.duchy.holder ?= { + if = { + limit = { + this != scope:new_liege + can_set_relation_rival_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = seized_my_realm_crime + } + } + } set_variable = separatist_uprising_decision_var set_variable = became_landed_through_separatist_uprising_var location.duchy = { + save_scope_as = target add_to_list = transfer_titles # All De Jure Counties held by the liege will be moved over every_de_jure_county = { @@ -7475,11 +7546,12 @@ ep3_decisions_event.6001 = { resolve_title_and_vassal_change = scope:heir_change } } - ep3_become_landed_transfer_no_ennobled_modifier_effect = { + ep3_become_landed_transfer_effect = { TITLE_RECEIVER = root TITLE_LIST = transfer_titles TYPE = granted REASON = flag:culture_champion + ENNOBLED_ADVENTURER = flag:no } hidden_effect = { scope:old_heir ?= { @@ -7536,7 +7608,14 @@ ep3_decisions_event.6001 = { option = { # Let me think about it name = ep3_decisions_event.6001.d - + hidden_effect = { + send_interface_toast = { + title = champion_culture_costs_refunded + left_icon = root + add_prestige_no_experience = 2000 + add_short_term_gold = 500 + } + } ai_chance = { base = 0 } diff --git a/events/dlc/ep3/ep3_emperor_yearly_2.txt b/events/dlc/ep3/ep3_emperor_yearly_2.txt index 00fd45e2..06b1071d 100644 --- a/events/dlc/ep3/ep3_emperor_yearly_2.txt +++ b/events/dlc/ep3/ep3_emperor_yearly_2.txt @@ -2,8 +2,8 @@ ############################## # EP3 Admin (Emperor) Events # -# by Claudia Baldassi # -# 2000 - 2999 # +# by Claudia Baldassi # +# 2000 - 2999 # ############################## # Byzantine-only: you have reconquered an important city of the long-lost Empire @@ -161,13 +161,13 @@ ep3_emperor_yearly.2000 = { limit = { scope:county = title:c_tourraine } - NOT = { exists = var:ep3_reconquered_tourraine } + NOT = { exists = global_var:ep3_reconquered_tourraine } } trigger_else_if = { limit = { scope:county = title:c_chandax } - NOT = { exists = var:ep3_reconquered_chandax } + NOT = { exists = global_var:ep3_reconquered_chandax } } trigger_else_if = { limit = { @@ -176,91 +176,91 @@ ep3_emperor_yearly.2000 = { scope:county = title:c_northumberland } } - NOT = { exists = var:ep3_reconquered_hadrian } + NOT = { exists = global_var:ep3_reconquered_hadrian } } trigger_else_if = { limit = { scope:county = title:c_trier } - NOT = { exists = var:ep3_reconquered_trier } + NOT = { exists = global_var:ep3_reconquered_trier } } trigger_else_if = { limit = { scope:county = title:c_lombardia } - NOT = { exists = var:ep3_reconquered_lombardia } + NOT = { exists = global_var:ep3_reconquered_lombardia } } trigger_else_if = { limit = { scope:county = title:c_murcia } - NOT = { exists = var:ep3_reconquered_murcia } + NOT = { exists = global_var:ep3_reconquered_murcia } } trigger_else_if = { limit = { scope:county = title:c_tangiers } - NOT = { exists = var:ep3_reconquered_tangiers } + NOT = { exists = global_var:ep3_reconquered_tangiers } } trigger_else_if = { limit = { scope:county = title:c_tunis } - NOT = { exists = var:ep3_reconquered_tunis } + NOT = { exists = global_var:ep3_reconquered_tunis } } trigger_else_if = { limit = { scope:county = title:c_ravenna } - NOT = { exists = var:ep3_reconquered_ravenna } + NOT = { exists = global_var:ep3_reconquered_ravenna } } trigger_else_if = { limit = { scope:county = title:c_roma } - NOT = { exists = var:ep3_reconquered_roma } + NOT = { exists = global_var:ep3_reconquered_roma } } trigger_else_if = { limit = { scope:county = title:c_siracusa } - NOT = { exists = var:ep3_reconquered_siracusa } + NOT = { exists = global_var:ep3_reconquered_siracusa } } trigger_else_if = { limit = { scope:county = title:c_bari } - NOT = { exists = var:ep3_reconquered_bari } + NOT = { exists = global_var:ep3_reconquered_bari } } trigger_else_if = { limit = { scope:county = title:c_edessa } - NOT = { exists = var:ep3_reconquered_edessa } + NOT = { exists = global_var:ep3_reconquered_edessa } } trigger_else_if = { limit = { scope:county = title:c_abbadan } - NOT = { exists = var:ep3_reconquered_abbadan } + NOT = { exists = global_var:ep3_reconquered_abbadan } } trigger_else_if = { limit = { scope:county = title:c_alexandria } - NOT = { exists = var:ep3_reconquered_alexandria } + NOT = { exists = global_var:ep3_reconquered_alexandria } } trigger_else_if = { limit = { scope:county = title:c_jerusalem } - NOT = { exists = var:ep3_reconquered_jerusalem } + NOT = { exists = global_var:ep3_reconquered_jerusalem } } trigger_else_if = { limit = { scope:county = title:c_antiocheia } - NOT = { exists = var:ep3_reconquered_antiocheia } + NOT = { exists = global_var:ep3_reconquered_antiocheia } } trigger_else = { always = no @@ -268,6 +268,60 @@ ep3_emperor_yearly.2000 = { } immediate = { + switch = { + trigger = scope:county + title:c_antiocheia = { + set_global_variable = ep3_reconquered_antiocheia + } + title:c_jerusalem = { + set_global_variable = ep3_reconquered_jerusalem + } + title:c_alexandria = { + set_global_variable = ep3_reconquered_alexandria + } + title:c_abbadan = { + set_global_variable = ep3_reconquered_abbadan + } + title:c_edessa = { + set_global_variable = ep3_reconquered_edessa + } + title:c_bari = { + set_global_variable = ep3_reconquered_bari + } + title:c_siracusa = { + set_global_variable = ep3_reconquered_siracusa + } + title:c_roma = { + set_global_variable = ep3_reconquered_roma + } + title:c_ravenna = { + set_global_variable = ep3_reconquered_ravenna + } + title:c_tunis = { + set_global_variable = ep3_reconquered_tunis + } + title:c_tangiers = { + set_global_variable = ep3_reconquered_tangiers + } + title:c_murcia = { + set_global_variable = ep3_reconquered_murcia + } + title:c_lombardia = { + set_global_variable = ep3_reconquered_lombardia + } + title:c_trier = { + set_global_variable = ep3_reconquered_trier + } + title:c_northumberland = { + set_global_variable = ep3_reconquered_hadrian + } + title:c_chandax = { + set_global_variable = ep3_reconquered_chandax + } + title:c_tourraine = { + set_global_variable = ep3_reconquered_tourraine + } + } change_influence = massive_influence_gain add_prestige = major_prestige_gain } @@ -408,112 +462,6 @@ ep3_emperor_yearly.2000 = { } after = { - if = { - limit = { - scope:county = title:c_antiocheia - } - set_global_variable = ep3_reconquered_antiocheia - } - else_if = { - limit = { - scope:county = title:c_jerusalem - } - set_global_variable = ep3_reconquered_jerusalem - } - else_if = { - limit = { - scope:county = title:c_alexandria - } - set_global_variable = ep3_reconquered_alexandria - } - else_if = { - limit = { - scope:county = title:c_abbadan - } - set_global_variable = ep3_reconquered_abbadan - } - else_if = { - limit = { - scope:county = title:c_edessa - } - set_global_variable = ep3_reconquered_edessa - } - else_if = { - limit = { - scope:county = title:c_bari - } - set_global_variable = ep3_reconquered_bari - } - else_if = { - limit = { - scope:county = title:c_siracusa - } - set_global_variable = ep3_reconquered_siracusa - } - else_if = { - limit = { - scope:county = title:c_roma - } - set_global_variable = ep3_reconquered_roma - } - else_if = { - limit = { - scope:county = title:c_ravenna - } - set_global_variable = ep3_reconquered_ravenna - } - else_if = { - limit = { - scope:county = title:c_tunis - } - set_global_variable = ep3_reconquered_tunis - } - else_if = { - limit = { - scope:county = title:c_tangiers - } - set_global_variable = ep3_reconquered_tangiers - } - else_if = { - limit = { - scope:county = title:c_murcia - } - set_global_variable = ep3_reconquered_murcia - } - else_if = { - limit = { - scope:county = title:c_lombardia - } - set_global_variable = ep3_reconquered_lombardia - } - else_if = { - limit = { - scope:county = title:c_trier - } - set_global_variable = ep3_reconquered_trier - } - else_if = { - limit = { - OR = { - scope:county = title:c_cumberland - scope:county = title:c_northumberland - } - } - set_global_variable = ep3_reconquered_hadrian - } - else_if = { - limit = { - scope:county = title:c_chandax - } - set_global_variable = ep3_reconquered_chandax - } - else_if = { - limit = { - scope:county = title:c_tourraine - } - set_global_variable = ep3_reconquered_tourraine - } - if = { limit = { NOT = { @@ -764,7 +712,7 @@ ep3_emperor_yearly.2020 = { random_character_trait = { limit = { save_temporary_scope_as = temp_trait - scoped_trait_is_criminal_in_faith_trigger = { TRAIT = scope:temp_trait FAITH = root.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = scope:temp_trait FAITH = root.faith GENDER_CHARACTER = root } } save_scope_as = target_criminal_trait } @@ -1518,7 +1466,7 @@ ep3_emperor_yearly.2050 = { house = root.house this != root } - position = 1 + position = 0 save_scope_as = last_emperor } } @@ -4364,7 +4312,10 @@ ep3_emperor_yearly.2170 = { years = 50 } } - change_influence = major_influence_gain + if = { + limit = { government_has_flag = government_has_influence } + change_influence = major_influence_gain + } stress_impact = { greedy = major_stress_impact_gain paranoid = medium_stress_impact_gain @@ -6214,6 +6165,12 @@ ep3_emperor_yearly.2300 = { faith != liege.primary_title.state_faith } set_character_faith = liege.primary_title.state_faith + if = { + limit = { + liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } stress_impact = { zealous = major_stress_impact_gain disloyal = major_stress_impact_gain @@ -6364,6 +6321,12 @@ ep3_emperor_yearly.2310 = { faith != top_liege.primary_title.state_faith } set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } change_influence = medium_influence_gain stress_impact = { zealous = major_stress_impact_gain @@ -6757,6 +6720,12 @@ ep3_emperor_yearly.2340 = { option = { name = ep3_emperor_yearly.2340.a set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege.primary_title.state_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } if = { limit = { top_liege = this @@ -6958,7 +6927,7 @@ ep3_emperor_yearly.2410 = { } send_interface_message = { title = 2410_noble_family_tt - type = msg_new_powerful_family + type = msg_new_noble_family left_icon = scope:noble_family_head right_icon = scope:new_title desc = 2410_noble_family_tt_desc @@ -7015,6 +6984,7 @@ ep3_emperor_yearly.2420 = { title = 2420_noble_family_tt type = msg_new_powerful_family left_icon = scope:noble_family_head + right_icon = scope:noble_family_head.house desc = 2420_noble_family_tt_desc } } diff --git a/events/dlc/ep3/ep3_emperor_yearly_8.txt b/events/dlc/ep3/ep3_emperor_yearly_8.txt deleted file mode 100644 index 7d2ab642..00000000 --- a/events/dlc/ep3/ep3_emperor_yearly_8.txt +++ /dev/null @@ -1,2206 +0,0 @@ -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/events/dlc/ep3/ep3_governor_yearly_3.txt b/events/dlc/ep3/ep3_governor_yearly_3.txt index 0d2b5207..4197f08d 100644 --- a/events/dlc/ep3/ep3_governor_yearly_3.txt +++ b/events/dlc/ep3/ep3_governor_yearly_3.txt @@ -2236,8 +2236,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_incestuous_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = kinslayer @@ -2250,8 +2250,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { has_trait = adulterer } } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = fornicator @@ -2263,24 +2263,24 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = deviant NOT = { root = { is_deviant_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = witch NOT = { root = { is_witch_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = sodomite @@ -2292,16 +2292,16 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { has_trait = cannibal NOT = { root = { is_cannibal_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = scope:emperor_temp.faith GENDER_CHARACTER = scope:emperor_temp } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor_temp } } AND = { root.culture = { @@ -2346,8 +2346,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_incestuous_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:incestuous FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2380,8 +2380,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { has_trait = adulterer } } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2401,8 +2401,8 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:fornicator FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2417,8 +2417,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_deviant_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:deviant FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2433,8 +2433,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_witch_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2454,8 +2454,8 @@ ep3_governor_yearly.3020 = { } } } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:sodomite FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -2470,8 +2470,8 @@ ep3_governor_yearly.3020 = { NOT = { root = { is_cannibal_trigger = yes } } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = scope:emperor.faith GENDER_CHARACTER = scope:emperor } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:cannibal FAITH = root.faith GENDER_CHARACTER = scope:emperor } } random_character_trait = { limit = { @@ -5386,7 +5386,7 @@ ep3_governor_yearly.3060 = { trigger = { scope:emperor = { capital_county = title:c_byzantion - OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:christianity_religion NOT = { has_character_flag = ep3_new_emperor_afield } @@ -5399,7 +5399,7 @@ ep3_governor_yearly.3060 = { NOT = { scope:emperor = { capital_county = title:c_byzantion - OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:christianity_religion } } scope:emperor = { @@ -5455,7 +5455,7 @@ ep3_governor_yearly.3060 = { left_portrait = { character = scope:emperor triggered_animation = { - trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + trigger = { religion = religion:christianity_religion } animation = acknowledging # anim uses crucifix scepter } animation = war_over_win @@ -5466,21 +5466,12 @@ ep3_governor_yearly.3060 = { camera = camera_event_right_forward } lower_right_portrait = scope:previous_holder - trigger = { - exists = scope:emperor - scope:emperor = { - is_alive = yes - } - top_liege ?= { - this = scope:emperor - } - } immediate = { play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_emperor" tgp_save_realm_ceremonial_liege_effect = yes if = { limit = { - scope:ceremonial_liege = scope:emperor + scope:ceremonial_liege ?= scope:emperor } clear_saved_scope = ceremonial_liege } @@ -5494,7 +5485,7 @@ ep3_governor_yearly.3060 = { is_in_army = yes } #Is not at sea - location = { + location.county = { exists = holder } } @@ -6896,7 +6887,6 @@ ep3_governor_yearly.3070 = { limit = { ep3_governor_yearly_3070_close_governor_trigger = yes save_temporary_scope_as = temp_vassal - ep3_governor_yearly_3070_close_governor_trigger = yes "scope:liege.capital_province.squared_distance(scope:temp_vassal.capital_province)" < 25000 } save_scope_as = close_governor @@ -6959,10 +6949,16 @@ ep3_governor_yearly.3070 = { trigger = { is_landed = no } - change_influence = medium_influence_gain - domicile = { - move_domicile = scope:liege.capital_province + custom_tooltip = { + text = domicile_move_to_province.tt } + change_influence = medium_influence_gain + hidden_effect = { + domicile = { + move_domicile = scope:liege.capital_province + } + } + house = { every_house_member = { custom = custom.every_house_member diff --git a/events/dlc/ep3/ep3_interactions_events.txt b/events/dlc/ep3/ep3_interactions_events.txt index 24476a30..47081a96 100644 --- a/events/dlc/ep3/ep3_interactions_events.txt +++ b/events/dlc/ep3/ep3_interactions_events.txt @@ -767,6 +767,7 @@ ep3_interactions_events.0031 = { # By Jason Cantalini has_graphical_mena_culture_group_trigger = yes has_graphical_african_culture_group_trigger = yes has_building_gfx = indian_building_gfx + has_building_gfx = tibetan_building_gfx } } NOT = { government_has_flag = government_is_tribal } @@ -782,6 +783,7 @@ ep3_interactions_events.0031 = { # By Jason Cantalini has_graphical_mena_culture_group_trigger = yes has_graphical_african_culture_group_trigger = yes has_building_gfx = indian_building_gfx + has_building_gfx = tibetan_building_gfx } } government_has_flag = government_is_tribal @@ -1549,6 +1551,13 @@ ep3_interactions_events.0111 = { scope:actor.primary_title ?= this scope:actor.capital_county.de_jure_liege ?= this } + any_de_jure_county = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } is_noble_family_title = no is_landless_type_title = no } @@ -1562,16 +1571,26 @@ ep3_interactions_events.0111 = { scope:actor.primary_title ?= this scope:actor.capital_county.de_jure_liege ?= this } + any_de_jure_county = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } is_noble_family_title = no is_landless_type_title = no } add_to_list = purchased_titles - if = { - limit = { tier = tier_duchy } - every_de_jure_county = { - limit = { ep3_purchase_land_valid_county_trigger = yes } - add_to_list = purchased_titles + every_de_jure_county = { + limit = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } } + add_to_list = purchased_titles } } } @@ -1594,7 +1613,13 @@ ep3_interactions_events.0111 = { if = { limit = { tier = tier_duchy } every_de_jure_county = { - limit = { ep3_purchase_land_valid_county_trigger = yes } + limit = { + holder.top_liege = scope:actor + NOR = { + scope:actor.capital_county ?= this + scope:actor.primary_title ?= this + } + } add_to_list = purchased_titles } } @@ -1608,6 +1633,7 @@ ep3_interactions_events.0111 = { is_landless_type_title = no } save_scope_as = new_primary_title + save_scope_as = target } scope:actor = { @@ -1617,6 +1643,7 @@ ep3_interactions_events.0111 = { random_character_artifact = { limit = { scope:recipient = { can_equip_artifact = prev } + artifact_can_be_gift_to_trigger = { RECIPIENT = scope:recipient } } save_scope_as = actor_artifact } @@ -1671,6 +1698,7 @@ ep3_interactions_events.0111 = { TITLE_LIST = purchased_titles TYPE = granted REASON = flag:purchased + ENNOBLED_ADVENTURER = flag:yes } } scope:actor = { @@ -2025,6 +2053,34 @@ ep3_interactions_events.0111 = { } } + #Refuse all for 5 years + option = { + name = ep3_interactions_events.0111.refuse_5_years + scope:actor = { + send_interface_toast = { + left_icon = scope:actor + right_icon = scope:recipient + title = ep3_interactions_events.0111.refuse + scope:actor = { + add_opinion = { + target = scope:recipient + modifier = rejected_hiring_as_mercenaries + } + } + } + } + custom_tooltip = ep3_interactions_events.0111.refuse_5_years.tt + + add_character_flag = { + flag = ai_hire_blocker + years = 5 + } + + ai_chance = { + base = 0 + } + } + #Refuse option = { name = ep3_interactions_events.0111.f @@ -2110,6 +2166,7 @@ ep3_interactions_events.0112 = { TITLE_LIST = purchased_titles TYPE = granted REASON = flag:purchased + ENNOBLED_ADVENTURER = flag:yes } # Extra purchase land specific scope:actor = { @@ -2179,7 +2236,10 @@ ep3_interactions_events.0112 = { add_defender = scope:recipient } scope:recipient = { - add_character_flag = joined_as_mercenary + set_variable = { + name = joined_as_mercenary + value = scope:actor + } } ai_chance = { @@ -2373,7 +2433,10 @@ ep3_interactions_events.0112 = { add_defender = scope:recipient } scope:recipient = { - add_character_flag = joined_as_mercenary + set_variable = { + name = joined_as_mercenary + value = scope:actor + } } ai_chance = { base = 1000 @@ -2436,11 +2499,11 @@ ep3_interactions_events.0121 = { limit = { is_alive = yes } - save_temporary_scope_as = laamp_temp + save_scope_as = laamp_temp scope:employer = { pay_treasury_or_gold = { target = prev - value = ep3_hire_laamp_mercs_payment_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } if = { @@ -2475,16 +2538,16 @@ ep3_interactions_events.0121 = { limit = { is_alive = yes } - save_temporary_scope_as = laamp_temp + save_temporary_scope_as = laamp_temp_b save_scope_value_as = { name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" + value = "scope:war.war_contribution(scope:laamp_temp_b)" } scope:employer = { pay_treasury_or_gold = { target = prev value = { - add = ep3_hire_laamp_mercs_payment_value + add = scope:laamp_temp_b.ep3_hire_laamp_mercs_payment_value divide = 2 } } @@ -2625,7 +2688,7 @@ ep3_interactions_events.0122 = { scope:employer = { pay_treasury_or_gold = { target = prev - value = ep3_hire_laamp_mercs_payment_value + value = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value } } } @@ -2636,7 +2699,7 @@ ep3_interactions_events.0122 = { pay_treasury_or_gold = { target = prev value = { - add = ep3_hire_laamp_mercs_payment_value + add = scope:laamp_temp.ep3_hire_laamp_mercs_payment_value divide = 2 } } @@ -2899,10 +2962,10 @@ ep3_interactions_events.0500 = { show_as_unavailable = { always = yes } custom_description_no_bullet = { text = evict_adventurer_consequences_tt - object = scope:recipient - subject = scope:actor + object = scope:actor + subject = scope:recipient } - custom_tooltip = evict_adventurer_casus_belli_tt + scope:actor = { custom_tooltip = evict_adventurer_casus_belli_tt } show_as_tooltip = { reverse_add_opinion = { target = scope:actor @@ -2918,17 +2981,20 @@ ep3_interactions_events.0500 = { } custom_description_no_bullet = { text = evict_adventurer_consequences_tt - object = scope:recipient - subject = scope:actor + object = scope:actor + subject = scope:recipient } - custom_tooltip = evict_adventurer_forced_tt - custom_tooltip = evict_adventurer_forced_tt.part_2 + scope:actor = { custom_tooltip = evict_adventurer_casus_belli_tt } show_as_tooltip = { reverse_add_opinion = { target = scope:actor modifier = eviction_ignored_opinion } } + scope:actor = { + custom_tooltip = evict_adventurer_forced_tt + custom_tooltip = evict_adventurer_forced_tt.part_2 + } } after = { trigger_event = ep3_interactions_events.0502 } @@ -3006,7 +3072,7 @@ ep3_interactions_events.0501 = { interaction = imprison_interaction actor = scope:expeller recipient = scope:adventurer - execute_threshold = decline + send_threshold = decline } } } @@ -4284,9 +4350,7 @@ ep3_interactions_events.0610 = { ordered_succession_appointment_investors = { candidate = root limit = { - NOT = { - house ?= root.house - } + NOT = { house ?= root.house } is_alive = yes is_imprisoned = no NOR = { @@ -4299,34 +4363,18 @@ ep3_interactions_events.0610 = { } if = { limit = { - NOT = { - exists = scope:new_landed_admin - } + NOT = { exists = scope:new_landed_admin } } save_scope_as = new_landed_admin } if = { - limit = { - scope:recipient = { - top_liege != this - - } - } - scope:recipient.top_liege = { - save_scope_as = emperor - } + limit = { scope:recipient.top_liege != this } + scope:recipient.top_liege = { save_scope_as = emperor } } else = { - scope:recipient = { - save_scope_as = emperor - } - } - show_as_tooltip = { - get_title = primary_title - domicile = { - add_domicile_building = estate_main_01 - } + scope:recipient = { save_scope_as = emperor } } + show_as_tooltip = { get_title = primary_title } } #I'm a new kinda landless now diff --git a/events/dlc/ep3/ep3_laamp_decision_events.txt b/events/dlc/ep3/ep3_laamp_decision_events.txt deleted file mode 100644 index 418527b8..00000000 --- a/events/dlc/ep3/ep3_laamp_decision_events.txt +++ /dev/null @@ -1,22296 +0,0 @@ -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/events/dlc/ep3/ep3_laamp_events.txt b/events/dlc/ep3/ep3_laamp_events.txt deleted file mode 100644 index ab7471ba..00000000 --- a/events/dlc/ep3/ep3_laamp_events.txt +++ /dev/null @@ -1,9172 +0,0 @@ -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 - } -} - -ep3_laamps.1030 = { - type = character_event - window = fullscreen_event - title = ep3_laamps.1030.t - desc = { - desc = ep3_laamps.1030.desc - first_valid = { - triggered_desc = { - trigger = { exists = scope:laamp_heir } - desc = ep3_laamps.1030.heir - } - triggered_desc = { - trigger = { exists = scope:laamp_liege } - desc = ep3_laamps.1030.liege - } - desc = ep3_laamps.1030.new - } - } - theme = realm - left_portrait = { - character = root - animation = marshal - } - lower_right_portrait = scope:laamp_inheritor - override_background = { reference = ep3_fullscreen_adventurer_positive } - cooldown = { days = 5 } - - trigger = { exists = scope:laamp_inheritor } - - immediate = { - # Save scopes for loc - primary_title = { save_scope_as = old_primary_title } - capital_province = { save_scope_as = old_capital_province } - if = { - limit = { top_liege != this } - liege = { save_scope_as = old_liege } - } - # Transfer landed titles - every_held_title = { - title_tier > barony - limit = { - OR = { - is_landless_type_title = no - is_nomad_title = yes - } - } - add_to_list = target_titles - } - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = no - } - hidden_effect = { - every_in_list = { - list = target_titles - change_title_holder_include_vassals = { - holder = scope:laamp_inheritor - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - # Create Adventurer - create_landless_minority_title_effect = { - REASON = flag:voluntary - FLAVOR_CHAR = scope:laamp_inheritor - } - scope:laamp_inheritor = { - # Tooltip for player - custom_tooltip = become_landless_adventurer_decision_title_scope_tt - # Create a loving family so inheritance isn't so borked - if = { - limit = { has_character_flag = new_laamp_inheritor } - trigger_event = game_rule.1001 - remove_character_flag = new_laamp_inheritor - } - } - scope:old_liege ?= { trigger_event = ep3_laamps.1032 } - adventurer_prestige_reset_effect = yes - hidden_effect = { - every_held_title = { - limit = { - is_noble_family_title = yes - } - root = { destroy_title = prev } - } - } - } - - option = { - name = ep3_laamps.1030.a - create_landless_minority_title_tooltip_effect = yes - add_prestige = medium_prestige_gain - add_character_modifier = { - modifier = ep3_voluntary_laamp_character_modifier - years = 5 - } - } -} - -# Liege event -ep3_laamps.1032 = { - type = letter_event - opening = ep3_laamps.1032.opening - desc = ep3_laamps.1032.desc - sender = scope:minority_leader - - trigger = { is_ai = no } - - immediate = { - scope:minority_leader = { create_landless_minority_title_tooltip_effect = yes } - } - - option = { - name = ep3_laamps.1032.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/events/dlc/ep3/ep3_laamp_events_8.txt b/events/dlc/ep3/ep3_laamp_events_8.txt deleted file mode 100644 index b6b34ad5..00000000 --- a/events/dlc/ep3/ep3_laamp_events_8.txt +++ /dev/null @@ -1,3979 +0,0 @@ -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/events/dlc/ep3/ep3_laamp_flavor_oltner.txt b/events/dlc/ep3/ep3_laamp_flavor_oltner.txt deleted file mode 100644 index 0d20460c..00000000 --- a/events/dlc/ep3/ep3_laamp_flavor_oltner.txt +++ /dev/null @@ -1,328 +0,0 @@ -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/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt b/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt deleted file mode 100644 index 78bafad7..00000000 --- a/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt +++ /dev/null @@ -1,23648 +0,0 @@ -@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/events/dlc/ep3/ep3_roman_restoration_events.txt b/events/dlc/ep3/ep3_roman_restoration_events.txt deleted file mode 100644 index 7043a44d..00000000 --- a/events/dlc/ep3/ep3_roman_restoration_events.txt +++ /dev/null @@ -1,521 +0,0 @@ -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/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt b/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt index 26ce7e17..1a322ca1 100644 --- a/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt @@ -3405,6 +3405,7 @@ ep3_story_cycle_admin_eunuch.2060 = { court_position_generator_effect = { VAR = target EMPLOYER = root + ONLY_EMPTY = no } } } @@ -3520,6 +3521,7 @@ ep3_story_cycle_admin_eunuch.2061 = { court_position_generator_effect = { VAR = target EMPLOYER = root + ONLY_EMPTY = no } } } diff --git a/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt b/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt index 8cc4a3b4..f122f160 100644 --- a/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt @@ -526,6 +526,7 @@ grand_ambitions.0003 = { immediate = { # Create Adventurer save_scope_as = adventurer + clear_saved_scope = lost_primary_title hidden_effect = { # Plus for our memory variable. scope:story.var:target_title = { save_scope_as = lost_primary_title } diff --git a/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt b/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt deleted file mode 100644 index f7c7f057..00000000 --- a/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt +++ /dev/null @@ -1,4688 +0,0 @@ -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/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt b/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt index 4c88e764..e7bb3e32 100644 --- a/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt +++ b/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt @@ -47,6 +47,10 @@ ep3_story_cycle_violet_poet.0001 = { modifier = double_moon_modifier save_scope_as = double_moon_book } + random_owned_story = { + type = story_cycle_violet_poet + set_variable = { name = artifact value = scope:double_moon_book } + } hidden_effect = { scope:double_moon_book = { set_artifact_rarity = illustrious diff --git a/events/dlc/ep3/ep3_wedding_events.txt b/events/dlc/ep3/ep3_wedding_events.txt deleted file mode 100644 index ebcbadf4..00000000 --- a/events/dlc/ep3/ep3_wedding_events.txt +++ /dev/null @@ -1,2616 +0,0 @@ -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/events/dlc/fp1/fp1_jomsvikings_events.txt b/events/dlc/fp1/fp1_jomsvikings_events.txt deleted file mode 100644 index 82740096..00000000 --- a/events/dlc/fp1/fp1_jomsvikings_events.txt +++ /dev/null @@ -1,2222 +0,0 @@ -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/events/dlc/fp1/fp1_major_decision_events.txt b/events/dlc/fp1/fp1_major_decision_events.txt deleted file mode 100644 index dd4873eb..00000000 --- a/events/dlc/fp1/fp1_major_decision_events.txt +++ /dev/null @@ -1,1423 +0,0 @@ -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/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt b/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt deleted file mode 100644 index 7c2ab436..00000000 --- a/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt +++ /dev/null @@ -1,1113 +0,0 @@ -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/events/dlc/fp1/fp1_shieldmaiden_events.txt b/events/dlc/fp1/fp1_shieldmaiden_events.txt deleted file mode 100644 index 6855c032..00000000 --- a/events/dlc/fp1/fp1_shieldmaiden_events.txt +++ /dev/null @@ -1,1426 +0,0 @@ -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/events/dlc/fp1/fp1_trade_events.txt b/events/dlc/fp1/fp1_trade_events.txt deleted file mode 100644 index e0917b00..00000000 --- a/events/dlc/fp1/fp1_trade_events.txt +++ /dev/null @@ -1,2494 +0,0 @@ -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/events/dlc/fp1/fp1_yearly_events.txt b/events/dlc/fp1/fp1_yearly_events.txt index b727bbcd..da217373 100644 --- a/events/dlc/fp1/fp1_yearly_events.txt +++ b/events/dlc/fp1/fp1_yearly_events.txt @@ -416,7 +416,7 @@ fp1_yearly.0001 = { scripted_trigger offensive_courtier_candidate_trigger = { #Filter out the basic miscs. is_available_ai_adult = yes - #Have some commited some genuine malfeasance, or just be irritating to at least some people. + #Have committed some genuine malfeasance, or just be irritating to at least some people. OR = { #Having committed murder by poison is a solid way to become a nithing; this might be a secret, but we assume local rumours about a shady buyer of poisons abound... has_character_flag = murdered_by_poison @@ -2124,6 +2124,12 @@ fp1_yearly.0041 = { add_courtier = scope:explorer #Sort conversion. set_character_faith_with_conversion = scope:explorer.faith + if = { + limit = { + scope:explorer.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Get scope:sponsoring_liege as a friend, if possible. if = { limit = { @@ -14221,6 +14227,12 @@ fp1_yearly.1012 = { #Perform the conversion. set_character_faith_with_conversion = scope:ms_faith + if = { + limit = { + scope:ms_faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } #Recoup lost piety, and get paid a little extra. custom_tooltip = fp1_yearly.1012.a.recoup_lost_piety.tt @@ -14992,8 +15004,9 @@ fp1_yearly.1061 = { # Germanic faith. religion = religion:germanic_religion # Shouldn't ever happen, but just in case, exempt sky burials so that the character is never buried twice. - NOT = { + NOR = { faith = { has_doctrine_parameter = sky_burials_active } + has_dead_character_variable = body_has_been_disposed } # And we shouldn't really be erecting glorious mounds to long lives that were actually cut short too early. age >= 30 @@ -15196,6 +15209,10 @@ fp1_yearly.1062 = { is_available_even_at_war_adult = yes # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. faith = scope:ship_funeral_candidate.faith + # Check that they haven't been buried already (e.g. via funeral activity) + scope:ship_funeral_candidate = { + NOT = { has_dead_character_variable = body_has_been_disposed } + } } # A small stone ship. @@ -16072,6 +16089,11 @@ fp1_yearly.1063 = { is_available_even_at_war_adult = yes # Must still be the same faith as scope:ship_funeral_candidate, for ease of loc and such. faith = scope:ship_funeral_candidate.faith + + # Check that they haven't been buried already (e.g. via funeral activity) + scope:ship_funeral_candidate = { + NOT = { has_dead_character_variable = body_has_been_disposed } + } } on_trigger_fail = { @@ -16325,6 +16347,14 @@ fp1_yearly.1063 = { } after = { + scope:ship_funeral_candidate = { + set_dead_character_variable = { + name = body_has_been_disposed + value = yes + years = 5 + } + } + # Clear up remaining values on the character. fp1_funeral_longship_clear_variables_effect = yes } diff --git a/events/dlc/fp1/fp1_yearly_events_oltner.txt b/events/dlc/fp1/fp1_yearly_events_oltner.txt deleted file mode 100644 index c7356814..00000000 --- a/events/dlc/fp1/fp1_yearly_events_oltner.txt +++ /dev/null @@ -1,2687 +0,0 @@ -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/events/dlc/fp2/fp2_el_cid_events.txt b/events/dlc/fp2/fp2_el_cid_events.txt deleted file mode 100644 index 0804a832..00000000 --- a/events/dlc/fp2/fp2_el_cid_events.txt +++ /dev/null @@ -1,552 +0,0 @@ -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/events/dlc/fp2/fp2_lyonese_monk_events.txt b/events/dlc/fp2/fp2_lyonese_monk_events.txt deleted file mode 100644 index 38d68f62..00000000 --- a/events/dlc/fp2/fp2_lyonese_monk_events.txt +++ /dev/null @@ -1,4800 +0,0 @@ -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/events/dlc/fp2/fp2_other_decision_events.txt b/events/dlc/fp2/fp2_other_decision_events.txt deleted file mode 100644 index 616e994f..00000000 --- a/events/dlc/fp2/fp2_other_decision_events.txt +++ /dev/null @@ -1,2572 +0,0 @@ -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/events/dlc/fp2/fp2_struggle_events.txt b/events/dlc/fp2/fp2_struggle_events.txt index 91186266..f82623f6 100644 --- a/events/dlc/fp2/fp2_struggle_events.txt +++ b/events/dlc/fp2/fp2_struggle_events.txt @@ -554,7 +554,7 @@ fp2_struggle.0900 = { # Hostility immediate = { # Add all involved rulers to a list, for ping event play_music_cue = "mx_Struggle_ending_hostility" - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes give_nickname = nick_the_conquistador dynasty = { add_dynasty_prestige = 10000 } } @@ -838,7 +838,7 @@ fp2_struggle.0901 = { # Compromise value = yes } # Add all involved rulers to a list, for ping event - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes } # Ok @@ -993,7 +993,7 @@ fp2_struggle.0902 = { # Conciliation value = yes } # Add all involved rulers to a list, for ping event - fp2_stuggle_ending_involved_list_effect = yes + fp2_struggle_ending_involved_list_effect = yes # Add all involved cultures with counties to a list, for marriage and holy war checks fp2_struggle_ending_culture_list_effect = yes @@ -1763,7 +1763,7 @@ fp2_struggle.1001 = { fp2_struggle.1001_weird_option_traits = no trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith - TRAIT = adulterer + TRAIT = trait:adulterer GENDER_CHARACTER = dummy_female } } @@ -2054,6 +2054,7 @@ scripted_trigger neighboring_ruler_proper_culture_trigger = { culture = culture:baranis culture = culture:butr culture = culture:levantine + culture = culture:sephardi } } @@ -4093,7 +4094,10 @@ fp2_struggle.1020 = { every_close_or_extended_family_member = { custom = all_family_members if = { - limit = { is_ai = yes } + limit = { + is_ai = yes + this != root + } add_opinion = { target = root opinion = -20 @@ -6178,8 +6182,8 @@ fp2_struggle.2003 = { add_prestige = medium_prestige_loss - scope:fp2_2003_county_town = { - add_county_modifier = { + scope:fp2_2003_county_town.title_province = { + add_province_modifier = { modifier = recently_looted_modifier years = 5 } @@ -6312,9 +6316,11 @@ fp2_struggle.2003 = { modifier = fp2_local_garrison_slaughtered_modifier years = 5 } - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -6331,9 +6337,11 @@ fp2_struggle.2003 = { years = 5 } hidden_effect = { - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -6468,9 +6476,11 @@ fp2_struggle.2003 = { title = fp2_struggle.2003.e.notif.a scope:fp2_2003_county_town = { - add_county_modifier = { - modifier = recently_looted_modifier - years = 5 + title_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } } } } @@ -7360,13 +7370,13 @@ fp2_struggle.2006 = { if = { limit = { trait_is_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis FAITH = scope:fp2_2006_vassal_in_crisis.faith } NOT = { trait_is_criminal_in_faith_trigger = { - TRAIT = witch + TRAIT = trait:witch GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis FAITH = scope:fp2_2006_foreign_faith } @@ -10128,12 +10138,14 @@ fp2_struggle.2014 = { any_character_artifact = { NOT = { has_variable = historical_unique_artifact } artifact_high_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } } random_character_artifact = { limit = { NOT = { has_variable = historical_unique_artifact } artifact_high_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } set_owner = root # If it breaks, use set_artifact_owner } @@ -10198,12 +10210,14 @@ fp2_struggle.2014 = { any_character_artifact = { NOT = { has_variable = historical_unique_artifact } artifact_low_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } } random_character_artifact = { limit = { NOT = { has_variable = historical_unique_artifact } artifact_low_rarity_trigger = yes + artifact_can_be_gift_to_trigger = { RECIPIENT = root } } set_owner = root } diff --git a/events/dlc/fp2/fp2_yearly_events.txt b/events/dlc/fp2/fp2_yearly_events.txt index ea1eee4d..39b63ff9 100644 --- a/events/dlc/fp2/fp2_yearly_events.txt +++ b/events/dlc/fp2/fp2_yearly_events.txt @@ -5,7 +5,7 @@ ## 1001 - 1001 Chess Two by Daniel Moore ## 1002 - 1002 Compromising Position by Daniel Moore ## 1003 - 1003 Tilting at Giants by Daniel Moore -## 1004 - 1004 The Hawk of Quarysh by Daniel Moore +## 1004 - 1004 The Hawk of Quraysh by Daniel Moore ## 1005 - 1005 Lost Viking by Daniel Moore ## 1006 - 1007 Viking Cheese by Daniel Moore ## 1008 - 1008 Consuming the Cheese by Daniel Moore @@ -364,7 +364,7 @@ fp2_yearly.1003 = { } ################################### -# The Hawk of Quarysh +# The Hawk of Quraysh # By Daniel Moore ################################### fp2_yearly.1004 = { @@ -429,7 +429,7 @@ fp2_yearly.1004 = { option = { #How he inspired soldiers name = fp2_yearly.1004.a add_character_modifier = { - modifier = fp2_hawk_of_quarysh_martial_modifier + modifier = fp2_hawk_of_quraysh_martial_modifier years = 10 } @@ -445,7 +445,7 @@ fp2_yearly.1004 = { option = { #How diplomatic he was name = fp2_yearly.1004.b add_character_modifier = { - modifier = fp2_hawk_of_quarysh_diplomacy_modifier + modifier = fp2_hawk_of_quraysh_diplomacy_modifier years = 10 } @@ -5915,6 +5915,709 @@ fp2_yearly.8006 = { # Conversos and Jewish events # By James Beaumont ################################### +scripted_trigger valid_grantable_county_barony = { + title_province = { + geographical_region = world_europe_west_iberia + } + title_province = { has_building_or_higher = common_tradeport_01 } + is_holy_site = no + county.holder = { + any_held_title = { # Make sure it isn't revoking their last title + title_tier = county + count >= 2 + } + } +} + +fp2_yearly.9000 = { + type = character_event + title = fp2_james.0001.t + desc = fp2_james.0001.desc + theme = secret + override_background = { + reference = docks + } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_james_0001_jewish_trader + animation = personality_bold + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + highest_held_title_tier >= tier_county + any_sub_realm_barony = { + valid_grantable_county_barony = yes + } + } + + immediate = { + random_sub_realm_barony = { + limit = { + valid_grantable_county_barony = yes + } + save_scope_as = fp2_james_0001_thriving_community + } + create_character = { + template = spanish_jewish_merchant_character + location = root.capital_province + save_scope_as = fp2_james_0001_jewish_trader + } + } + + option = { + name = fp2_james.0001.a + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_jewish_community_denied_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0001.b + trigger = { + NOT = { # Prevent all of Iberia from converting + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0001_thriving_community.county = { + change_title_holder = { + holder = scope:fp2_james_0001_jewish_trader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_0001_jewish_trader + modifier = received_title_county + } + } + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + set_county_culture = scope:fp2_james_0001_jewish_trader.culture + set_county_faith = scope:fp2_james_0001_jewish_trader.faith + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0001.c + scope:fp2_james_0001_thriving_community.county = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + scope:fp2_james_0001_jewish_trader.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_greed = 1.5 + ai_zeal = -0.5 + } + } + } +} + +scripted_effect fp2_polish_should_heritage_israelite_get_upset_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { culture = { has_cultural_pillar = heritage_israelite } } + } + scope:fp2_james_0002_conversos_character.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_loss_conversos_tolerance + } + } + } +} + +# Suspect Conversos of secretly praciticing Judaism +fp2_yearly.9001 = { + type = character_event + title = fp2_james.0002.t + desc = fp2_james.0002.desc + theme = secret + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_0002_conversos_character + animation = personality_cynical + } + + trigger = { + root.religion = religion:christianity_religion + is_landed = yes + NOT = { faith = faith:conversos } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + } + + immediate = { + every_sub_realm_county = { + limit = { + faith = faith:conversos + holder = { + liege = { # Don't convert player-Conversos territory + OR = { + is_ai = yes + NOT = { faith = faith:conversos } + } + } + } + } + add_to_list = fp2_james_0002_conversos_county + } + # Try to find a Conversos vassal if one exists + if = { + limit = { + any_vassal = { + faith = faith:conversos + is_available_ai = yes + } + } + random_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise find a pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + faith = faith:conversos + } + } + random_pool_character = { + province = root.capital_province + limit = { + faith = faith:conversos + } + save_scope_as = fp2_james_0002_conversos_character + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_conversos_character + location = root.capital_province + save_scope_as = fp2_james_0002_conversos_character + } + } + scope:fp2_james_0002_conversos_character = { + random_list = { + 50 = { + add_character_flag = is_secretly_jewish_flag + } + 50 = { + } + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0002_jewish_faith + } + } + } + + option = { + name = fp2_james.0002.a + custom_tooltip = fp2_james.0002.a.tt + hidden_effect = { + if = { + limit = { + scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } + } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.jewish_communities_thrive + every_in_list = { + list = fp2_james_0002_conversos_county + set_county_faith = scope:fp2_james_0002_jewish_faith + } + scope:fp2_james_0002_conversos_character = { + set_character_faith = scope:fp2_james_0002_jewish_faith + every_vassal = { + limit = { + faith = faith:conversos + is_available_ai = yes + } + set_character_faith = scope:fp2_james_0002_jewish_faith + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_james.0002.a.nothing_happened_toast + } + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } + + option = { + name = fp2_james.0002.b + duel = { + skill = intrigue + target = scope:fp2_james_0002_conversos_character + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = fp2_james.0002.b.succesful_interrogation + + if = { + limit = { scope:fp2_james_0002_conversos_character = { has_character_flag = is_secretly_jewish_flag } } + + send_interface_message = { # Begrudgingly added "unecessary" polish + type = event_prison_good + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + rightfully_imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + else = { + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = fp2_james.0002.b.failed_interrogation + send_interface_message = { + type = event_intrigue_bad + title = fp2_james.0002.a.offended_conversos + right_icon = scope:fp2_james_0002_conversos_character + + every_sub_realm_county = { + custom = fp2_james_0002.b.failed_interrogation.tt + limit = { + faith = { + religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + } + add_county_modifier = { + modifier = fp2_conversos_persecution_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:fp2_james_0002_conversos_character + modifier = hate_opinion + opinion = -30 + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + } + } + } + + stress_impact = { compassionate = medium_stress_impact_gain } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { # Imprison the suspect without trial + name = fp2_james.0002.c + + send_interface_message = { + type = event_prison_neutral + title = fp2_james.0002.t + right_icon = scope:fp2_james_0002_conversos_character + + imprison_character_effect = { + TARGET = scope:fp2_james_0002_conversos_character + IMPRISONER = root + } + fp2_polish_should_heritage_israelite_get_upset_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = just + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + has_trait = zealous + } + } + } +} + +# Jewish people come fleeing persecution from a nearby realm +fp2_yearly.9002 = { + type = character_event + title = fp2_james.0003.t + desc = fp2_james.0003.desc + theme = secret + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_003_jewish_refugee_leader + animation = beg + } + + trigger = { + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + any_neighboring_and_across_water_top_liege_realm = { # There is someone to do persecuting + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + highest_held_title_tier >= tier_county + any_held_county = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_character_struggle = { + is_struggle_type = iberian_struggle + is_struggle_phase = struggle_iberia_phase_hostility + } + } + modifier = { + factor = 0.1 + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + + immediate = { + # Grab the neighbour for loc purposes + random_neighboring_and_across_water_top_liege_realm = { + limit = { + holder = { + is_ai = yes + NOT = { root.religion = religion:judaism_religion } + NOT = { faith = faith:conversos } + } + } + holder = { save_scope_as = fp2_james_003_intolerant_ruler } + } + # find a pool character + if = { + limit = { + any_pool_character = { + province = root.capital_province + religion = religion:judaism_religion + } + } + random_pool_character = { + province = root.capital_province + limit = { + religion = religion:judaism_religion + } + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Otherwise create one + else = { + create_character = { + template = spanish_jewish_merchant_character # May as well reuse the template + location = root.capital_province + save_scope_as = fp2_james_003_jewish_refugee_leader + } + } + # Get a religion for them to potentially be secretly praciticing + religion:judaism_religion = { + random_faith = { + limit = { is_mainstream_jewish_faith = yes } + save_scope_as = fp2_james_0003_jewish_faith + } + } + random_held_county = { + limit = { + is_landless_type_title = no + title_province = { + geographical_region = world_europe_west_iberia + } + NOT = { # Don't give away the capital + this = this.holder.top_liege.capital_county + } + holder = { + any_held_title = { + title_tier = county + count >= 2 + } + } + } + weight = { + modifier = { # Low-dev counties should be more highly considered + add = 50 + development_level <= medium_development_level + } + } + save_scope_as = fp2_james_0003_province_to_convert + } + } + + option = { # Offer the community protection in your realm + name = fp2_james.0003.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0003_province_to_convert.county = { + change_title_holder = { + holder = scope:fp2_james_003_jewish_refugee_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_003_jewish_refugee_leader + modifier = received_title_county + } + } + scope:fp2_james_0003_province_to_convert.county = { + change_development_level = 1 + if = { + limit = { + root = { + is_ai = no + } + NOT = { + any_county_in_region = { + region = world_europe_west_iberia + culture = culture:sephardi + } + } + } + set_county_culture = scope:fp2_james_003_jewish_refugee_leader.culture + set_county_faith = scope:fp2_james_003_jewish_refugee_leader.faith + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + else = { + add_county_modifier = { + modifier = fp2_thriving_jewish_community_modifier + years = 10 + } + } + } + scope:fp2_james_003_jewish_refugee_leader.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_conversos_tolerance + } + } + + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + compassionate = medium_stress_impact_loss + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = fp2_james.0003.b + scope:fp2_james_003_jewish_refugee_leader = { silent_disappearance_effect = yes } + + stress_impact = { + paranoid = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -0.5 + ai_zeal = 1.5 + } + } + } +} + ################################### # Toledan Nights # By James Beaumont diff --git a/events/dlc/fp3/fp3_heritage_events.txt b/events/dlc/fp3/fp3_heritage_events.txt index 274172ca..a4594640 100644 --- a/events/dlc/fp3/fp3_heritage_events.txt +++ b/events/dlc/fp3/fp3_heritage_events.txt @@ -426,7 +426,7 @@ fp3_yearly.8020 = { #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_religion = religion:christianity_religion } has_game_rule = default_gender_equality #this triggers an error. Suspected code issue. @@ -2380,7 +2380,7 @@ fp3_yearly.8032 = { trigger = { OR = { has_religion = religion:islam_religion - OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + has_religion = religion:christianity_religion } } @@ -2415,7 +2415,7 @@ fp3_yearly.8032 = { has_trait = zealous } AND = { - OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + has_religion = religion:christianity_religion has_trait = zealous } } diff --git a/events/dlc/fp3/fp3_misc_decision_events.txt b/events/dlc/fp3/fp3_misc_decision_events.txt deleted file mode 100644 index a375899d..00000000 --- a/events/dlc/fp3/fp3_misc_decision_events.txt +++ /dev/null @@ -1,2906 +0,0 @@ -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/events/dlc/fp3/fp3_religious_decision_events.txt b/events/dlc/fp3/fp3_religious_decision_events.txt deleted file mode 100644 index c560a0f5..00000000 --- a/events/dlc/fp3/fp3_religious_decision_events.txt +++ /dev/null @@ -1,1362 +0,0 @@ -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/events/dlc/fp3/fp3_scholarship_events.txt b/events/dlc/fp3/fp3_scholarship_events.txt deleted file mode 100644 index b68cafdd..00000000 --- a/events/dlc/fp3/fp3_scholarship_events.txt +++ /dev/null @@ -1,1918 +0,0 @@ -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/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt b/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt deleted file mode 100644 index 858b4511..00000000 --- a/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt +++ /dev/null @@ -1,153 +0,0 @@ -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/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt b/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt deleted file mode 100644 index 335509e4..00000000 --- a/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt +++ /dev/null @@ -1,726 +0,0 @@ -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/events/dlc/fp3/fp3_struggle_events.txt b/events/dlc/fp3/fp3_struggle_events.txt deleted file mode 100644 index 3a9cd0f8..00000000 --- a/events/dlc/fp3/fp3_struggle_events.txt +++ /dev/null @@ -1,1339 +0,0 @@ -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/events/dlc/fp3/fp3_tax_collector_events_ola.txt b/events/dlc/fp3/fp3_tax_collector_events_ola.txt deleted file mode 100644 index 779a8541..00000000 --- a/events/dlc/fp3/fp3_tax_collector_events_ola.txt +++ /dev/null @@ -1,1416 +0,0 @@ -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/events/dlc/fp3/fp3_tax_collector_flavor_events.txt b/events/dlc/fp3/fp3_tax_collector_flavor_events.txt deleted file mode 100644 index 92e8990d..00000000 --- a/events/dlc/fp3/fp3_tax_collector_flavor_events.txt +++ /dev/null @@ -1,1060 +0,0 @@ -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/events/dlc/fp3/fp3_yearly_events_eren.txt b/events/dlc/fp3/fp3_yearly_events_eren.txt deleted file mode 100644 index 592aec0a..00000000 --- a/events/dlc/fp3/fp3_yearly_events_eren.txt +++ /dev/null @@ -1,3131 +0,0 @@ -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/events/dlc/fp3/fp3_yearly_events_hugo.txt b/events/dlc/fp3/fp3_yearly_events_hugo.txt deleted file mode 100644 index 6ae8aa81..00000000 --- a/events/dlc/fp3/fp3_yearly_events_hugo.txt +++ /dev/null @@ -1,286 +0,0 @@ -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/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt b/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt deleted file mode 100644 index 68643afb..00000000 --- a/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt +++ /dev/null @@ -1,4027 +0,0 @@ -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/events/dlc/fp3/fp3_yearly_frontier_chains.txt b/events/dlc/fp3/fp3_yearly_frontier_chains.txt deleted file mode 100644 index a902d3cd..00000000 --- a/events/dlc/fp3/fp3_yearly_frontier_chains.txt +++ /dev/null @@ -1,824 +0,0 @@ -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/events/dlc/mpo/court_astrologer_events.txt b/events/dlc/mpo/court_astrologer_events.txt deleted file mode 100644 index 9b2b2d15..00000000 --- a/events/dlc/mpo/court_astrologer_events.txt +++ /dev/null @@ -1,307 +0,0 @@ -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/events/dlc/mpo/mpo_decisions_events.txt b/events/dlc/mpo/mpo_decisions_events.txt deleted file mode 100644 index c03840ee..00000000 --- a/events/dlc/mpo/mpo_decisions_events.txt +++ /dev/null @@ -1,9095 +0,0 @@ -################################################### -## MPO Decision Events -## -## 0001 Offer Confederation -## 0200 Study Commander Trait -## 0300 Fertility Dance -## 0400 Pax Mongolica -## 0500 Desperate Stance -## 0060 Invite Shepherds -## 0120 Adopt the Nomadic Ways - -namespace = mpo_decisions_events - -scripted_trigger mpo_decisions_events_0001_threat_trigger = { - save_temporary_scope_as = confederate - trigger_if = { - limit = { - max_military_strength > 0 - } - confederation_worthy_foe_strength_ratio_value_root <= 0.5 - } - NOT = { is_allied_to = root } - OR = { - highest_held_title_tier >= tier_kingdom - faith = { - faith_hostility_level = { - target = root.faith - value >= faith_evil_level - } - } - has_trait = conqueror - has_trait = greatest_of_khans - is_gurkhan = yes - } -} - -#Confederation planning event -mpo_decisions_events.0001 = { - type = character_event - title = mpo_decisions_events.0001.t - desc = mpo_decisions_events.0001.desc - theme = vassal - override_background = { reference = wilderness } - left_portrait = { - character = root - animation = inspect_weapon - } - right_portrait = { - character = scope:warrior - animation = throne_room_two_handed_passive_shield - camera = camera_event_right_pointing_left - } - lower_right_portrait = scope:threat - - immediate = { - random_knight = { - limit = { - is_imprisoned = no - is_incapable = no - is_playable_character = no - } - save_scope_as = warrior - add_character_flag = need_military_outfit - } - if = { - limit = { - NOT = { - exists = scope:warrior - } - } - random_courtier = { - limit = { - is_available_allow_travelling = yes - is_adult = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - age <= 55 - } - save_scope_as = warrior - add_character_flag = need_military_outfit - } - } - if = { - limit = { - any_land_neighboring_realm_with_tributaries_owner = { - mpo_decisions_events_0001_threat_trigger = yes - } - } - ordered_land_neighboring_realm_with_tributaries_owner = { - order_by = current_military_strength - limit = { - mpo_decisions_events_0001_threat_trigger = yes - } - save_scope_as = threat - } - } - else_if = { - limit = { - NOT = { - exists = scope:threat - } - } - ordered_land_neighboring_realm_with_tributaries_owner = { - order_by = current_military_strength - limit = { - is_tributary = yes - suzerain ?= { - mpo_decisions_events_0001_threat_trigger = yes - } - } - suzerain = { - save_scope_as = threat - } - } - } - else_if = { - limit = { - NOT = { - exists = scope:threat - } - } - ordered_land_neighboring_realm_with_tributaries_owner = { - order_by = current_military_strength - limit = { - is_tributary = yes - top_suzerain ?= { - mpo_decisions_events_0001_threat_trigger = yes - } - } - top_suzerain = { - save_scope_as = threat - } - } - } - else = { - capital_county = { - kingdom = { - random_de_jure_county = { - limit = { - holder.top_liege = { - mpo_decisions_events_0001_threat_trigger = yes - } - } - holder.top_liege = { - save_scope_as = threat - } - } - } - } - } - if = { - limit = { - NOT = { - exists = scope:threat - } - } - ordered_land_neighboring_realm_with_tributaries_owner = { - order_by = current_military_strength - limit = { - NOT = { is_allied_to = root } - } - save_scope_as = threat - } - } - if = { - limit = { - any_realm_county = { - is_landless_type_title = no - kingdom = { - any_de_jure_county = { - holder.top_liege = scope:threat - } - } - } - } - random_realm_county = { - limit = { - is_landless_type_title = no - kingdom = { - any_de_jure_county = { - holder.top_liege = scope:threat - } - } - } - kingdom = { save_scope_as = home_kingdom } - } - - } - else = { - capital_county.kingdom = { - save_scope_as = home_kingdom - } - } - } - - option = { - name = mpo_decisions_events.0001.a - custom_tooltip = enables_offer_confederation_tt - custom_tooltip = offer_confederation_members_tt - custom_tooltip = offer_confederation_5_year_warning_tt - - add_character_flag = { - flag = forming_confederation - years = 5 - } - } - #opt out - option = { - trigger = { - is_ai = no - } - name = mpo_decisions_events.0001.b - remove_decision_cooldown = call_for_confederation_decision - } - after = { - scope:warrior ?= { - remove_character_flag = need_military_outfit - } - } -} - -#Leave confederation event for leaver -mpo_decisions_events.0002 = { - type = character_event - title = mpo_decisions_events.0002.t - desc = { - desc = mpo_decisions_events.0002.desc - first_valid = { - triggered_desc = { - trigger = { - exists = scope:confederation - scope:confederation = { - any_confederation_member = { - count >= 2 - NOT = { - this = root - } - } - } - } - desc = mpo_decisions_events.0002.desc_confederation_survives - } - desc = mpo_decisions_events.0002.desc_confederation_done - } - } - theme = vassal - left_portrait = { - character = root - animation = dismissal - } - right_portrait = { - character = scope:other_confederate - animation = disappointed - camera = camera_event_right_forward - } - - immediate = { - ordered_in_list = { - order_by = max_military_strength - list = confederation_members - save_scope_as = other_confederate - } - scope:confederation = { - #Your confederation will survive, it has more members - if = { - limit = { - any_confederation_member = { - count >= 2 - NOT = { - this = root - } - } - } - remove_confederation_member = root - } - #Your confederation is toast - else = { - disband_confederation = yes - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - show_as_tooltip = { - remove_character_modifier = mpo_confederation_member_modifier - } - } - every_in_list = { - list = confederation_members - custom = custom.every_confederation_member - add_opinion = { - modifier = turncoat_opinion - target = root - opinion = -20 - } - } - } - - #Bye - option = { - name = mpo_decisions_events.0002.a - every_in_list = { - list = confederation_members - trigger_event = mpo_decisions_events.0003 - } - } -} - -#Leave confederation event for other members -mpo_decisions_events.0003 = { - type = character_event - title = mpo_decisions_events.0003.t - desc = { - desc = mpo_decisions_events.0003.desc - first_valid = { - triggered_desc = { - trigger = { - is_confederation_member = yes - } - desc = mpo_decisions_events.0003.desc_confederation_survives - } - desc = mpo_decisions_events.0003.desc_confederation_done - } - } - theme = vassal - left_portrait = { - character = root - animation = war_defender - } - right_portrait = { - character = scope:leaver - animation = menacing - } - - immediate = { - if = { - limit = { - is_confederation_member = yes - } - custom_tooltip = leaver_left_confederation_tt - } - else = { - custom_tooltip = leaver_destroyed_confederation_tt - } - } - - #See ya later, I guess. Douchebag - option = { - name = mpo_decisions_events.0003.a - } -} - -#Confederation elevated - vassal -mpo_decisions_events.0004 = { - type = character_event - title = mpo_decisions_events.0004.t - desc = mpo_decisions_events.0004.desc - theme = vassal - override_background = { reference = courtyard } - left_portrait = { - character = root - animation = obsequious_bow - camera = camera_event_horse_left_forward - } - right_portrait = { - character = scope:new_king_ruler - animation = jockey_wave - camera = camera_event_horse_right - } - - immediate = { - - } - - option = { - name = mpo_decisions_events.0004.a - add_character_modifier = { - modifier = confederate_vassal_modifier - } - } - - option = { - name = mpo_decisions_events.0004.b - trigger = { - is_ai = no - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } -} - -#Confederation elevated - king -mpo_decisions_events.0005 = { - type = character_event - title = mpo_decisions_events.0005.t - desc = mpo_decisions_events.0005.desc - theme = crown - override_background = { reference = courtyard } - right_portrait = { - character = scope:new_king_ruler - animation = jockey_wave - camera = camera_event_horse_left - } - - immediate = { - - } - - option = { - name = mpo_decisions_events.0005.a - add_character_modifier = { - modifier = confederate_king_modifier - years = 15 - } - every_sub_realm_county = { - custom = custom.every_realm_county - add_county_modifier = { - modifier = confederate_lands_modifier - years = 30 - } - } - } -} - -scripted_effect mpo_decisions_events_0020_bonuses_tooltips_effect = { - if = { - limit = { - is_vassal_of = root - is_ai = yes - NOT = { is_obedient_to = root } - } - custom_tooltip = friend_heir_target_vassal_tt - custom_tooltip = friend_heir_target_vassal_obedient_tt - } - if = { - limit = { - is_allied_to = root - } - custom_tooltip = friend_heir_target_ally_tt - } - custom_tooltip = friend_heir_success_factors_tt - - #Positive option unlocks - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value = 1 - } - } - custom_tooltip = heir_friend_1_common_trait_tt - } - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value = 2 - } - } - custom_tooltip = heir_friend_2_common_trait_tt - } - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value = 3 - } - } - custom_tooltip = heir_friend_3_common_trait_tt - } - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value = 4 - } - } - custom_tooltip = heir_friend_4_common_trait_tt - } - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value = 5 - } - } - custom_tooltip = heir_friend_5_common_trait_tt - } - if = { - limit = { - number_of_traits_in_common = { - target = scope:heir - value >= 6 - } - } - custom_tooltip = heir_friend_6_or_more_common_trait_tt - } - if = { - limit = { - OR = { - AND = { - has_trait = lifestyle_hunter - scope:heir = { has_trait = lifestyle_hunter } - } - AND = { - has_trait = lifestyle_reveler - scope:heir = { has_trait = lifestyle_reveler } - } - AND = { - has_trait = lifestyle_traveler - scope:heir = { has_trait = lifestyle_traveler } - } - AND = { - has_trait = lifestyle_blademaster - scope:heir = { has_trait = lifestyle_blademaster } - } - AND = { - has_trait = lifestyle_herbalist - scope:heir = { has_trait = lifestyle_herbalist } - } - AND = { - has_trait = lifestyle_mystic - scope:heir = { has_trait = lifestyle_mystic } - } - AND = { - has_trait = lifestyle_physician - scope:heir = { has_trait = lifestyle_physician } - } - AND = { - has_trait = lifestyle_poet - scope:heir = { has_trait = lifestyle_poet } - } - AND = { - has_trait = lifestyle_gardener - scope:heir = { has_trait = lifestyle_gardener } - } - AND = { - has_trait = drunkard - scope:heir = { has_trait = drunkard } - } - AND = { - has_trait = hashishiyah - scope:heir = { has_trait = hashishiyah } - } - } - } - custom_tooltip = heir_friend_lifestyle_tt - } - if = { - limit = { - OR = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - } - } - } - custom_tooltip = heir_friend_sports_tt - } - if = { - limit = { - has_relation_blood_brother = root - } - custom_tooltip = heir_friend_blood_brother_tt - } - if = { - limit = { - OR = { - has_relation_friend = root - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_lover = root - } - } - custom_tooltip = heir_friend_positive_relation_tt - } - if = { - limit = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - custom_tooltip = heir_friend_house_tt - } - if = { - limit = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - custom_tooltip = heir_friend_culture_tt - } - - #Positive bonuses - if = { - limit = { - is_allied_to = root - } - custom_tooltip = heir_friend_roots_ally_tt - } - if = { - limit = { - opinion = { - target = scope:heir - value >= 25 - } - } - custom_tooltip = heir_friend_likes_heir_tt - } - if = { - limit = { - age_compared_to_player_heir < 10 - age_compared_to_player_heir > -10 - } - custom_tooltip = heir_friend_similar_age_tt - } - - #Negative maluses - if = { - limit = { - opinion = { - target = scope:heir - value <= 0 - } - opinion = { - target = scope:heir - value > -40 - } - } - custom_tooltip = heir_friend_dislikes_heir_tt - } - if = { - limit = { - opinion = { - target = scope:heir - value <= -40 - } - } - custom_tooltip = heir_friend_hates_heir_tt - } - if = { - limit = { - save_temporary_scope_as = temp_target - NOR = { - knows_language_of_culture = scope:heir.culture - scope:heir = { - knows_language_of_culture = scope:temp_target.culture - } - } - } - custom_tooltip = heir_friend_cant_communicate_tt - } - if = { - limit = { - OR = { - age_compared_to_player_heir >= 20 - age_compared_to_player_heir <= -20 - } - } - custom_tooltip = heir_friend_different_age_tt - } - if = { - limit = { - highest_held_title_tier = tier_kingdom - } - custom_tooltip = heir_friend_high_tier_tt - } - if = { - limit = { - highest_held_title_tier >= tier_empire - } - custom_tooltip = heir_friend_very_high_tier_tt - } -} - -#Introduce Heir (friend matchmaking) -#By Jason Cantalini -mpo_decisions_events.0020 = { - type = character_event - title = mpo_decisions_events.0020.t - desc = { - desc = mpo_decisions_events.0020.desc - first_valid = { - triggered_desc = { - trigger = { - any_in_list = { - list = saved_targets - count >= 2 - } - } - desc = mpo_decisions_events.0020.desc_multiple - } - desc = mpo_decisions_events.0020.desc_one - } - } - theme = nomads - override_background = { - trigger = { - government_has_flag = government_is_nomadic - } - reference = mpo_camp_steppe - } - override_background = { - trigger = { - NOT = { - government_has_flag = government_is_nomadic - } - } - reference = wilderness - } - left_portrait = { - character = root - animation = standing_horse - camera = camera_event_standing_with_horse_left - } - right_portrait = { - character = scope:heir - animation = horse_conversing_left - camera = camera_event_horse_right_facing_left - } - lower_right_portrait = scope:target_1 - lower_center_portrait = scope:target_2 - lower_left_portrait = scope:target_3 - - immediate = { - save_scope_as = root_scope - player_heir = { - save_scope_as = heir - #Yes, I know how stupid this looks - save_scope_as = loc_heir - } - #Save targets - #Allies will always precede powerful vassals, who precede regular vassals - - #Good relations with root - every_ally = { - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - OR = { - has_relation_friend = root - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_blood_brother = root - } - } - add_to_list = saved_targets - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - OR = { - has_relation_friend = root - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_blood_brother = root - } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - OR = { - has_relation_friend = root - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_blood_brother = root - } - } - add_to_list = saved_targets - } - } - #Take care of blood brothers - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_relation = { - type = blood_brother - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - #friends - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_relation = { - type = friend - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - #soulmates - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_relation = { - type = soulmate - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - #Allied vassal - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - is_allied_to = root - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - is_allied_to = root - } - add_to_list = saved_targets - } - } - #Same house as root - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_ally = { - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - AND = { - exists = house - exists = root.house - house = { - this = root.house - } - } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - AND = { - exists = house - exists = root.house - house = { - this = root.house - } - } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - AND = { - exists = house - exists = root.house - house = { - this = root.house - } - } - } - add_to_list = saved_targets - } - } - #Same culture as root - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_ally = { - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - culture = root.culture - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - culture = root.culture - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 0 - } - culture = root.culture - } - add_to_list = saved_targets - } - } - #Root likes them - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_ally = { - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 50 - } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 50 - } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - reverse_opinion = { - target = root - value >= 50 - } - } - add_to_list = saved_targets - } - } - #Any vassal/ally - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_ally = { - limit = { - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_powerful_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - if = { - limit = { - list_size = { - name = saved_targets - value < 5 - } - } - every_vassal = { - limit = { - is_obedient_to = root - mpo_valid_heir_friend_trigger = { CHARACTER = root } - } - add_to_list = saved_targets - } - } - - #Now that we've put top candidates in list, save their scopes - random_in_list = { - list = saved_targets - save_scope_as = target_1 - } - if = { - limit = { - any_in_list = { - list = saved_targets - NOT = { - this = scope:target_1 - } - } - } - random_in_list = { - list = saved_targets - limit = { - NOT = { - this = scope:target_1 - } - } - save_scope_as = target_2 - } - } - if = { - limit = { - any_in_list = { - list = saved_targets - NOR = { - this = scope:target_1 - this = scope:target_2 - } - } - } - random_in_list = { - list = saved_targets - limit = { - NOR = { - this = scope:target_1 - this = scope:target_2 - } - } - save_scope_as = target_3 - } - } - if = { - limit = { - any_in_list = { - list = saved_targets - NOR = { - this = scope:target_1 - this = scope:target_2 - this = scope:target_3 - } - } - } - random_in_list = { - list = saved_targets - limit = { - NOR = { - this = scope:target_1 - this = scope:target_2 - this = scope:target_3 - } - } - save_scope_as = target_4 - } - } - if = { - limit = { - any_in_list = { - list = saved_targets - NOR = { - this = scope:target_1 - this = scope:target_2 - this = scope:target_3 - this = scope:target_4 - } - } - } - random_in_list = { - list = saved_targets - limit = { - NOR = { - this = scope:target_1 - this = scope:target_2 - this = scope:target_3 - this = scope:target_4 - } - } - save_scope_as = target_5 - } - } - } - #Friends with friend-bachelor #1! - option = { - name = mpo_decisions_events.0020.a - scope:target_1 = { - save_scope_as = friendship_target - mpo_decisions_events_0020_bonuses_tooltips_effect = yes - } - trigger_event = { - id = mpo_decisions_events.0021 - days = 3 - } - stress_impact = { - shy = medium_stress_impact_gain - callous = minor_stress_impact_gain - paranoid = medium_stress_impact_gain - } - ai_chance = { - base = 101 - modifier = { - OR = { - has_relation_friend = scope:target_1 - has_relation_best_friend = scope:target_1 - has_relation_soulmate = scope:target_1 - has_relation_lover = scope:target_1 - has_relation_blood_brother = scope:target_1 - } - add = 100 - } - modifier = { - scope:target_1 = { - opinion = { - target = scope:heir - value <= 0 - } - } - add = -100 - } - modifier = { - scope:target_1 = { - opinion = { - target = scope:heir - value < -40 - } - } - add = -200 - } - modifier = { - scope:target_1 = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - add = 50 - } - modifier = { - scope:target_1 = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - add = 50 - } - modifier = { - scope:target_1 = { - opinion = { - target = scope:heir - value >= 75 - } - } - add = 100 - } - } - } - #Friends with friend-bachelor #2! - option = { - trigger = { - exists = scope:target_2 - } - name = mpo_decisions_events.0020.b - scope:target_2 = { - save_scope_as = friendship_target - mpo_decisions_events_0020_bonuses_tooltips_effect = yes - } - trigger_event = { - id = mpo_decisions_events.0021 - days = 3 - } - stress_impact = { - shy = medium_stress_impact_gain - callous = minor_stress_impact_gain - paranoid = medium_stress_impact_gain - } - - ai_chance = { - base = 101 - modifier = { - OR = { - has_relation_friend = scope:target_2 - has_relation_best_friend = scope:target_2 - has_relation_soulmate = scope:target_2 - has_relation_lover = scope:target_2 - has_relation_blood_brother = scope:target_2 - } - add = 100 - } - modifier = { - scope:target_2 = { - opinion = { - target = scope:heir - value <= 0 - } - } - add = -100 - } - modifier = { - scope:target_2 = { - opinion = { - target = scope:heir - value < -40 - } - } - add = -200 - } - modifier = { - scope:target_2 = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - add = 50 - } - modifier = { - scope:target_2 = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - add = 50 - } - modifier = { - scope:target_2 = { - opinion = { - target = scope:heir - value >= 75 - } - } - add = 100 - } - } - } - #Friends with friend-bachelor #3! - option = { - trigger = { - exists = scope:target_3 - } - name = mpo_decisions_events.0020.c - scope:target_3 = { - save_scope_as = friendship_target - mpo_decisions_events_0020_bonuses_tooltips_effect = yes - } - trigger_event = { - id = mpo_decisions_events.0021 - days = 3 - } - stress_impact = { - shy = medium_stress_impact_gain - callous = minor_stress_impact_gain - paranoid = medium_stress_impact_gain - } - - ai_chance = { - base = 101 - modifier = { - OR = { - has_relation_friend = scope:target_3 - has_relation_best_friend = scope:target_3 - has_relation_soulmate = scope:target_3 - has_relation_lover = scope:target_3 - has_relation_blood_brother = scope:target_3 - } - add = 100 - } - modifier = { - scope:target_3 = { - opinion = { - target = scope:heir - value <= 0 - } - } - add = -100 - } - modifier = { - scope:target_3 = { - opinion = { - target = scope:heir - value < -40 - } - } - add = -200 - } - modifier = { - scope:target_3 = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - add = 50 - } - modifier = { - scope:target_3 = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - add = 50 - } - modifier = { - scope:target_3 = { - opinion = { - target = scope:heir - value >= 75 - } - } - add = 100 - } - } - } - #Friends with friend-bachelor #4! - option = { - trigger = { - exists = scope:target_4 - } - name = mpo_decisions_events.0020.d - scope:target_4 = { - save_scope_as = friendship_target - mpo_decisions_events_0020_bonuses_tooltips_effect = yes - } - trigger_event = { - id = mpo_decisions_events.0021 - days = 3 - } - stress_impact = { - shy = medium_stress_impact_gain - callous = minor_stress_impact_gain - paranoid = medium_stress_impact_gain - } - - ai_chance = { - base = 101 - modifier = { - OR = { - has_relation_friend = scope:target_4 - has_relation_best_friend = scope:target_4 - has_relation_soulmate = scope:target_4 - has_relation_lover = scope:target_4 - has_relation_blood_brother = scope:target_4 - } - add = 100 - } - modifier = { - scope:target_4 = { - opinion = { - target = scope:heir - value <= 0 - } - } - add = -100 - } - modifier = { - scope:target_4 = { - opinion = { - target = scope:heir - value < -40 - } - } - add = -200 - } - modifier = { - scope:target_4 = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - add = 50 - } - modifier = { - scope:target_4 = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - add = 50 - } - modifier = { - scope:target_4 = { - opinion = { - target = scope:heir - value >= 75 - } - } - add = 100 - } - } - } - #Friends with friend-bachelor #5! - option = { - trigger = { - exists = scope:target_5 - } - name = mpo_decisions_events.0020.e - scope:target_5 = { - save_scope_as = friendship_target - mpo_decisions_events_0020_bonuses_tooltips_effect = yes - } - trigger_event = { - id = mpo_decisions_events.0021 - days = 1 - } - stress_impact = { - shy = medium_stress_impact_gain - callous = minor_stress_impact_gain - paranoid = medium_stress_impact_gain - } - - ai_chance = { - base = 101 - modifier = { - OR = { - has_relation_friend = scope:target_5 - has_relation_best_friend = scope:target_5 - has_relation_soulmate = scope:target_5 - has_relation_lover = scope:target_5 - has_relation_blood_brother = scope:target_5 - } - add = 100 - } - modifier = { - scope:target_5 = { - opinion = { - target = scope:heir - value <= 0 - } - } - add = -100 - } - modifier = { - scope:target_5 = { - opinion = { - target = scope:heir - value < -40 - } - } - add = -200 - } - modifier = { - scope:target_5 = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - add = 50 - } - modifier = { - scope:target_5 = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - add = 50 - } - modifier = { - scope:target_5 = { - opinion = { - target = scope:heir - value >= 75 - } - } - add = 100 - } - } - } - #Yeah... not these bozos - option = { - name = mpo_decisions_events.0020.f - remove_decision_cooldown = mpo_decision_introduce_heir - add_prestige = mpo_introduce_heir_prestige_cost - add_piety = mpo_introduce_heir_piety_cost - } -} - -scripted_effect mpo_decisions_events_0021_positive_outcome_effect = { - scope:friendship_target = { - show_as_tooltip = { - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - if = { - limit = { - is_ai = yes - is_vassal_of = root - NOT = { is_obedient_to = root } - } - custom_tooltip = friend_heir_may_become_obedient - } - if = { - limit = { - is_allied_to = root - } - custom_tooltip = friend_heir_may_become_blood_brother - } - } - } -} - -scripted_effect mpo_decisions_events_0021_negative_outcome_effect = { - custom_tooltip = friendship_setup_fail_tt - add_character_flag = { - flag = heir_friend_failed - days = 40 - } -} - -#Friendship maneuvering event -mpo_decisions_events.0021 = { - type = character_event - title = mpo_decisions_events.0021.t - desc = { - desc = mpo_decisions_events.0021.desc_intro - first_valid = { - triggered_desc = { - trigger = { - scope:friendship_target = { - opinion = { - target = scope:heir - value >= 40 - } - } - } - desc = mpo_decisions_events.0021.desc_warm - } - desc = mpo_decisions_events.0021.desc_cold - } - desc = mpo_decisions_events.0021.desc - } - theme = nomads - override_background = { - reference = relaxing_room - } - left_portrait = { - character = scope:heir - triggered_animation = { - trigger = { - scope:friendship_target = { - opinion = { - target = scope:heir - value >= 40 - } - } - } - animation = personality_content - } - animation = boredom - } - right_portrait = { - character = scope:friendship_target - triggered_animation = { - trigger = { - scope:heir = { - reverse_opinion = { - target = scope:friendship_target - value >= 40 - } - } - } - animation = hunting_carcass_start - } - animation = war_defender - } - - trigger = { - is_alive = yes - scope:heir = { - is_alive = yes - } - scope:friendship_target = { - is_alive = yes - } - } - immediate = { - scope:heir = { - get_quirk_character_effect = yes - } - scope:friendship_target = { - save_scope_as = bg_override_char - random_list = { - 1 = { - trigger = { - has_trait = lifestyle_hunter - scope:heir = { - has_trait = lifestyle_hunter - } - } - trait:lifestyle_hunter = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_reveler - scope:heir = { has_trait = lifestyle_reveler } - } - trait:lifestyle_reveler = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_traveler - scope:heir = { has_trait = lifestyle_traveler } - } - trait:lifestyle_traveler = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_blademaster - scope:heir = { has_trait = lifestyle_blademaster } - } - trait:lifestyle_reveler = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_herbalist - scope:heir = { has_trait = lifestyle_herbalist } - } - trait:lifestyle_herbalist = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_mystic - scope:heir = { has_trait = lifestyle_mystic } - } - trait:lifestyle_mystic = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_physician - scope:heir = { has_trait = lifestyle_physician } - } - trait:lifestyle_physician = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_poet - scope:heir = { has_trait = lifestyle_poet } - } - trait:lifestyle_poet = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = lifestyle_gardener - scope:heir = { has_trait = lifestyle_gardener } - } - trait:lifestyle_gardener = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = drunkard - scope:heir = { has_trait = drunkard } - } - trait:drunkard = { - save_scope_as = lifestyle_trait - } - } - 1 = { - trigger = { - has_trait = hashishiyah - scope:heir = { has_trait = hashishiyah } - } - trait:hashishiyah = { - save_scope_as = lifestyle_trait - } - } - } - } - } - #Charm them with your high diplo - option = { - trigger = { - diplomacy >= very_high_skill_rating - } - name = mpo_decisions_events.0021.a - flavor = mpo_decisions_events.0021.a.flavor - add_character_flag = { - flag = heir_friend_personal_charm - days = 40 - } - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - - duel = { - skill = diplomacy - value = medium_skill_rating - #Successful - they're friends! - 45 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -44 - } - modifier = { - scope:friendship_target = { - opinion = { - target = root - value >= 75 - } - } - add = 20 - } - modifier = { - scope:friendship_target = { - opinion = { - target = root - value >= 90 - } - } - add = 20 - } - modifier = { - add = mpo_friendship_setup_positive_modifiers_value - } - - desc = mpo_decisions_events.0021.a.success - mpo_decisions_events_0021_positive_outcome_effect = yes - show_as_tooltip = { - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - } - # Fail - they're pretty meh about each other - 55 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - # Limit how low the off-chance can go. - min = -54 - } - modifier = { - add = mpo_friendship_setup_negative_modifiers_value - } - - desc = mpo_decisions_events.0021.a.fail - mpo_decisions_events_0021_negative_outcome_effect = yes - } - } - } - else = { - #Player response - custom_tooltip = mpo_heir_friend_if_accept_tt - show_as_tooltip = { - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - mpo_decisions_events_0021_positive_outcome_effect = yes - custom_tooltip = mpo_heir_friend_if_do_not_accept_tt - custom_tooltip = friendship_setup_fail_tt - } - stress_impact = { - shy = miniscule_stress_impact_gain - trusting = miniscule_stress_impact_gain - } - ai_chance = { - base = 200 - ai_value_modifier = { - ai_sociability = 1 - ai_energy = 0.5 - } - modifier = { - diplomacy > extremely_high_skill_rating - add = 100 - } - } - } - #Do their lifestyle traits together - option = { - trigger = { - exists = scope:lifestyle_trait - } - name = mpo_decisions_events.0021.b - flavor = mpo_decisions_events.0021.b.flavor - add_internal_flag = special - add_character_flag = { - flag = heir_friend_lifestyle_trait - days = 40 - } - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - duel = { - skill = diplomacy - value = average_skill_rating - #Successful - they're friends! - 65 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.1 - min = -64 - } - modifier = { - add = mpo_friendship_setup_positive_modifiers_value - } - - desc = mpo_decisions_events.0021.b.success - mpo_decisions_events_0021_positive_outcome_effect = yes - show_as_tooltip = { - mpo_heir_lifestyle_xp_gain_effect = yes - } - } - # Fail - they're pretty meh about each other - 35 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.1 - min = -34 - } - modifier = { - add = mpo_friendship_setup_negative_modifiers_value - } - - desc = mpo_decisions_events.0021.b.fail - mpo_decisions_events_0021_negative_outcome_effect = yes - } - } - } - else = { - #Player response - custom_tooltip = mpo_heir_friend_if_accept_tt - show_as_tooltip = { - mpo_heir_lifestyle_xp_gain_effect = yes - } - mpo_decisions_events_0021_positive_outcome_effect = yes - custom_tooltip = mpo_heir_friend_if_do_not_accept_tt - custom_tooltip = friendship_setup_fail_tt - } - ai_chance = { - base = 200 - } - } - - #Do their sports together - option = { - trigger = { - scope:friendship_target = { - OR = { - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - } - } - } - } - name = mpo_decisions_events.0021.c - flavor = mpo_decisions_events.0021.c.flavor - reason = tourney_participant - add_internal_flag = special - add_character_flag = { - flag = heir_friend_sports - days = 40 - } - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - duel = { - skill = diplomacy - value = average_skill_rating - #Successful - they're friends! - 65 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.1 - min = -64 - } - modifier = { - add = mpo_friendship_setup_positive_modifiers_value - } - - desc = mpo_decisions_events.0021.c.success - mpo_decisions_events_0021_positive_outcome_effect = yes - show_as_tooltip = { - mpo_heir_hastiluder_xp_gain_effect = yes - } - } - # Fail - they're pretty meh about each other - 35 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.1 - min = -34 - } - modifier = { - add = mpo_friendship_setup_negative_modifiers_value - } - - desc = mpo_decisions_events.0021.c.fail - mpo_decisions_events_0021_negative_outcome_effect = yes - } - } - } - else = { - #Player response - custom_tooltip = mpo_heir_friend_if_accept_tt - show_as_tooltip = { - mpo_heir_hastiluder_xp_gain_effect = yes - } - mpo_decisions_events_0021_positive_outcome_effect = yes - custom_tooltip = mpo_heir_friend_if_do_not_accept_tt - custom_tooltip = friendship_setup_fail_tt - } - ai_chance = { - base = 200 - ai_value_modifier = { - ai_energy = 0.5 - ai_boldness = 0.5 - } - } - } - #Bond over shared traits - option = { - trigger = { - scope:friendship_target = { - trigger_if = { - limit = { - has_trait = nomadic_philosophy - scope:heir = { - has_trait = nomadic_philosophy - } - } - number_of_traits_in_common = { - target = scope:heir - value >= 2 - } - } - trigger_else = { - number_of_traits_in_common = { - target = scope:heir - value >= 1 - } - } - } - } - name = mpo_decisions_events.0021.d - flavor = mpo_decisions_events.0021.d.flavor - add_internal_flag = special - add_character_flag = { - flag = heir_friend_shared_traits - days = 40 - } - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - duel = { - skill = diplomacy - value = average_skill_rating - #Successful - they're friends! - 45 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.1 - min = -44 - } - modifier = { - add = mpo_friendship_setup_positive_modifiers_value - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 3 - } - } - add = 40 - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 4 - } - } - add = 40 - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 5 - } - } - add = 40 - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 6 - } - } - add = 40 - } - - desc = mpo_decisions_events.0021.d.success - mpo_decisions_events_0021_positive_outcome_effect = yes - show_as_tooltip = { - scope:heir = { - add_stress = minor_stress_impact_loss - add_prestige = minor_prestige_gain - } - } - } - # Fail - they're pretty meh about each other - 55 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.1 - min = -54 - } - modifier = { - add = mpo_friendship_setup_negative_modifiers_value - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value <= 1 - } - } - add = -40 - } - - desc = mpo_decisions_events.0021.d.fail - mpo_decisions_events_0021_negative_outcome_effect = yes - } - } - } - else = { - #Player response - custom_tooltip = mpo_heir_friend_if_accept_tt - show_as_tooltip = { - scope:heir = { - add_stress = minor_stress_impact_loss - add_prestige = minor_prestige_gain - } - } - mpo_decisions_events_0021_positive_outcome_effect = yes - custom_tooltip = mpo_heir_friend_if_do_not_accept_tt - custom_tooltip = friendship_setup_fail_tt - } - ai_chance = { - base = 50 - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 2 - } - } - add = 50 - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 4 - } - } - add = 100 - } - modifier = { - scope:friendship_target = { - number_of_traits_in_common = { - target = scope:heir - value >= 6 - } - } - add = 100 - } - } - } - #Let's hang - extra bonus for blood brother/friends/family/culture - option = { - name = mpo_decisions_events.0021.e - flavor = mpo_decisions_events.0021.e.flavor - add_character_flag = { - flag = heir_friend_kinship - days = 40 - } - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - duel = { - skill = diplomacy - value = medium_skill_rating - #Successful - they're friends! - 35 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.75 - min = -34 - } - modifier = { - add = mpo_friendship_setup_positive_modifiers_value - } - modifier = { - has_relation_blood_brother = scope:friendship_target - add = 120 - } - modifier = { - OR = { - has_relation_best_friend = scope:friendship_target - has_relation_soulmate = scope:friendship_target - } - add = 80 - } - modifier = { - OR = { - has_relation_friend = scope:friendship_target - has_relation_lover = scope:friendship_target - } - add = 60 - } - modifier = { - AND = { - exists = house - exists = scope:friendship_target.house - house = scope:friendship_target.house - } - add = 60 - } - modifier = { - OR = { - culture = { - this = scope:friendship_target.culture - } - culture = { - cultural_acceptance = { - target = scope:friendship_target.culture - value >= 80 - } - } - } - add = 30 - } - - desc = mpo_decisions_events.0021.e.success - mpo_decisions_events_0021_positive_outcome_effect = yes - show_as_tooltip = { - scope:heir = { - add_piety = minor_piety_gain - } - } - } - # Fail - they're pretty meh about each other - 65 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.75 - min = -64 - } - modifier = { - add = mpo_friendship_setup_negative_modifiers_value - } - - desc = mpo_decisions_events.0021.e.fail - mpo_decisions_events_0021_negative_outcome_effect = yes - } - } - } - else = { - #Player response - custom_tooltip = mpo_heir_friend_if_accept_tt - mpo_decisions_events_0021_positive_outcome_effect = yes - custom_tooltip = mpo_heir_friend_if_do_not_accept_tt - custom_tooltip = friendship_setup_fail_tt - } - - ai_chance = { - base = 10 - modifier = { - diplomacy >= medium_skill_rating - diplomacy < very_high_skill_rating - add = 40 - } - modifier = { - has_relation_blood_brother = scope:friendship_target - add = 40 - } - modifier = { - OR = { - has_relation_best_friend = scope:friendship_target - has_relation_soulmate = scope:friendship_target - } - add = 20 - } - } - } - #Gift fallback - option = { - trigger = { - diplomacy < very_high_skill_rating - } - show_unlock_reason = no - name = mpo_decisions_events.0021.f - flavor = mpo_decisions_events.0021.f.flavor - - add_character_flag = { - flag = heir_friend_gift - days = 40 - } - show_as_tooltip = { - pay_short_term_gold = { - target = scope:friendship_target - gold = medium_gold_value - } - pay_short_term_gold = { - target = scope:heir - gold = minor_gold_value - } - } - mpo_decisions_events_0021_positive_outcome_effect = yes - stress_impact = { - greedy = miniscule_stress_impact_gain - } - ai_chance = { - base = 25 - ai_value_modifier = { - ai_greed = -1 - } - modifier = { - gold >= monumental_gold_value - add = 300 - } - modifier = { - short_term_gold < major_gold_value - factor = 0 - } - } - } - after = { - if = { - limit = { - scope:friendship_target = { - is_ai = yes - } - } - trigger_event = { - id = mpo_decisions_events.0023 - days = 1 - } - } - else = { - scope:friendship_target = { - trigger_event = { - id = mpo_decisions_events.0022 - days = 1 - } - } - } - } -} - -mpo_decisions_events.0022 = { - type = character_event - title = mpo_decisions_events.0022.t - desc = { - desc = mpo_decisions_events.0022.desc_intro - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_personal_charm - } - } - desc = mpo_decisions_events.0022.desc_personal_charm - } - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_lifestyle_trait - } - } - desc = mpo_decisions_events.0022.desc_lifestyle - } - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_sports - } - } - desc = mpo_decisions_events.0022.desc_sports - } - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_shared_traits - } - } - desc = mpo_decisions_events.0022.desc_shared_traits - } - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_kinship - } - } - desc = mpo_decisions_events.0022.desc_kinship - } - triggered_desc = { - trigger = { - scope:root_scope = { - has_character_flag = heir_friend_gift - } - } - desc = mpo_decisions_events.0022.desc_gift - } - desc = mpo_decisions_events.0022.desc_outro - } - theme = nomads - override_background = { - reference = throne_room - } - left_portrait = { - character = scope:root_scope - animation = interested - } - right_portrait = { - character = scope:heir - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_hunter - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - } - - } - animation = hunting_shortbow_aim_arrow_default - } - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_blademaster - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - } - - } - animation = sword_coup_degrace - } - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_traveler - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - } - - } - animation = laugh - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_physician - scope:lifestyle_trait = trait:lifestyle_herbalist - } - } - animation = physician - } - - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_reveler - scope:lifestyle_trait = trait:drunkard - } - } - animation = wedding_drunk - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - scope:lifestyle_trait = trait:hashishiyah - } - animation = manic - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - scope:lifestyle_trait = trait:lifestyle_gardener - } - animation = holding_staff - } - - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_personal_charm - NOT = { - has_character_flag = heir_friend_failed - } - } - } - animation = laugh - } - triggered_animation = { - trigger = { - root = { - NOR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_failed - } - } - } - animation = storyteller - } - } - lower_right_portrait = scope:root_scope - - immediate = { - if = { - limit = { - has_character_flag = heir_friend_gift - } - show_as_tooltip = { - scope:root_scope = { - pay_short_term_gold = { - target = scope:friendship_target - gold = medium_gold_value - } - } - } - } - } - #I want this blood brother - option = { - trigger = { - is_allied_to = scope:root_scope - NOT = { - has_relation_blood_brother = scope:friendship_target - } - } - name = mpo_decisions_events.0022.a - show_as_tooltip = { - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - set_relation_blood_brother = { - target = scope:heir - reason = blood_brother_introduced_heir - } - } - scope:root_scope = { - add_character_flag = { - flag = player_heir_friend_blood_brother - days = 40 - } - } - if = { - limit = { - scope:root_scope = { - highest_held_title_tier > root.highest_held_title_tier - } - } - add_prestige = medium_prestige_gain - } - else_if = { - limit = { - scope:root_scope = { - highest_held_title_tier = root.highest_held_title_tier - } - } - add_prestige = minor_prestige_gain - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:root_scope - opinion = 10 - } - stress_impact = { - paranoid = medium_stress_impact_gain - callous = minor_stress_impact_gain - arrogant = medium_stress_impact_gain - fickle = medium_stress_impact_gain - } - } - - #I will even be obedient! - option = { - trigger = { - is_ai = yes - is_vassal_of = scope:root_scope - NOR = { - is_obedient_to = scope:root_scope - has_trait = disloyal - } - } - name = mpo_decisions_events.0022.b - show_as_tooltip = { - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - } - scope:root_scope = { - add_character_flag = { - flag = player_heir_friend_obedient - days = 40 - } - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:root_scope - opinion = 40 - } - random = { - chance = 50 - add_trait = loyal - } - stress_impact = { - humble = minor_stress_impact_loss - trusting = minor_stress_impact_loss - content = minor_stress_impact_loss - paranoid = medium_stress_impact_gain - arrogant = major_stress_impact_gain - ambitious = major_stress_impact_gain - arbitrary = major_stress_impact_gain - } - } - - #We can be friends - option = { - name = mpo_decisions_events.0022.c - show_as_tooltip = { - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - } - if = { - limit = { - highest_held_title_tier > scope:root_scope.highest_held_title_tier - } - add_prestige = minor_prestige_loss - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:root_scope - opinion = 20 - } - stress_impact = { - paranoid = minor_stress_impact_gain - callous = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } - } - - #I don't want this friend - option = { - name = mpo_decisions_events.0022.d - scope:root_scope = { - add_character_flag = { - flag = heir_friend_failed - days = 40 - } - } - if = { - limit = { - scope:root_scope = { - has_character_flag = heir_friend_lifestyle_trait - } - } - mpo_target_lifestyle_xp_gain_effect = yes - } - else_if = { - limit = { - scope:root_scope = { - has_character_flag = heir_friend_sports - } - } - mpo_target_hastiluder_xp_gain_effect = yes - } - else_if = { - limit = { - scope:root_scope = { - has_character_flag = heir_friend_personal_charm - } - } - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - else = { - add_stress = medium_stress_impact_loss - } - stress_impact = { - trusting = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - } - } - after = { - scope:root_scope = { - trigger_event = mpo_decisions_events.0023 - } - } -} - -mpo_decisions_events.0023 = { - type = character_event - title = mpo_decisions_events.0023.t - desc = { - first_valid = { - triggered_desc = { - trigger = { - has_character_flag = heir_friend_failed - } - desc = mpo_decisions_events.0023.desc_fail - } - desc = mpo_decisions_events.0023.desc - } - triggered_desc = { - trigger = { - exists = scope:accidental_friend - } - desc = mpo_decisions_events.0023.desc_accidental_friend - } - } - theme = nomads - #TODO_CD_MPO how about a new positive music sting? - override_background = { - reference = relaxing_room - } - left_portrait = { - character = scope:heir - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_failed - } - } - animation = personality_content - } - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_hunter - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - } - - } - animation = hunting_shortbow_aim_arrow_default - } - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_blademaster - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - } - - } - animation = sword_coup_degrace - } - triggered_animation = { - trigger = { - root = { - OR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_sports - } - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_traveler - AND = { - scope:friendship_target = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - scope:heir = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - } - - } - animation = laugh - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_physician - scope:lifestyle_trait = trait:lifestyle_herbalist - } - } - animation = physician - } - - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - OR = { - scope:lifestyle_trait = trait:lifestyle_reveler - scope:lifestyle_trait = trait:drunkard - } - } - animation = wedding_drunk - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - scope:lifestyle_trait = trait:hashishiyah - } - animation = manic - } - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_lifestyle_trait - NOT = { - has_character_flag = heir_friend_failed - } - } - scope:lifestyle_trait = trait:lifestyle_gardener - } - animation = holding_staff - } - - triggered_animation = { - trigger = { - root = { - has_character_flag = heir_friend_personal_charm - NOT = { - has_character_flag = heir_friend_failed - } - } - } - animation = laugh - } - triggered_animation = { - trigger = { - root = { - NOR = { - has_character_flag = heir_friend_lifestyle_trait - has_character_flag = heir_friend_failed - } - } - } - animation = storyteller - } - } - right_portrait = { - character = scope:friendship_target - triggered_animation ={ - trigger = { - root = { - has_character_flag = heir_friend_failed - } - } - animation = interested - } - triggered_animation ={ - trigger = { - root = { - NOT = { has_character_flag = heir_friend_failed } - } - } - animation = happiness - } - } - lower_right_portrait = scope:accidental_friend - immediate = { - if = { - limit = { - has_character_flag = heir_friend_failed - } - #Random positive outcome - custom_tooltip = heir_friend_will_not_become_friends_tt - mpo_decisions_events_friend_fail_effect = yes - } - else = { - play_music_cue = mx_cue_positive_effect - scope:friendship_target = { - #Random chance of AI - random_list = { - 2 = { - trigger = { - is_ai = yes - is_vassal_of = root - } - modifier = { - opinion = { - target = root - value = 100 - } - factor = 2 - } - modifier = { - OR = { - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_blood_brother = root - } - factor = 2 - } - modifier = { - obedience_target = root - factor = 2 - } - add_opinion = { - modifier = obedience_opinion - target = root - } - } - 1 = { - trigger = { - is_ai = yes - is_allied_to = root - } - modifier = { - opinion = { - target = root - value = 100 - } - factor = 2 - } - modifier = { - OR = { - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_blood_brother = root - } - factor = 2 - } - set_relation_blood_brother = { - target = scope:heir - reason = blood_brother_introduced_heir - } - } - 2 = {} - } - if = { - limit = { - has_character_flag = player_heir_friend_blood_brother - } - set_relation_blood_brother = { - target = scope:heir - reason = blood_brother_introduced_heir - } - } - else_if = { - limit = { - has_character_flag = player_heir_friend_obedient - } - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - add_opinion = { - modifier = obedience_opinion - target = root - } - } - if = { - limit = { - NOT = { - has_relation_blood_brother = scope:heir - } - } - set_relation_friend = { - target = scope:heir - reason = friend_introduced_heir - } - } - } - switch = { - trigger = has_character_flag - - heir_friend_personal_charm = { - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - heir_friend_lifestyle_trait = { - mpo_heir_lifestyle_xp_gain_effect = yes - } - heir_friend_sports = { - mpo_heir_hastiluder_xp_gain_effect = yes - } - heir_friend_shared_traits = { - scope:heir = { - add_stress = minor_stress_impact_loss - add_prestige = minor_prestige_gain - } - } - heir_friend_kinship = { - scope:heir = { - add_piety = minor_piety_gain - } - } - heir_friend_gift = { - pay_short_term_gold = { - target = scope:friendship_target - gold = medium_gold_value - } - pay_short_term_gold = { - target = scope:heir - gold = minor_gold_value - } - } - } - } - } - option = { - name = { - trigger = { - NOT = { - has_character_flag = heir_friend_failed - } - } - text = mpo_decisions_events.0023.a - } - name = { - trigger = { - has_character_flag = heir_friend_failed - } - text = mpo_decisions_events.0023.a_fail - } - } - after = { - remove_character_flag = heir_friend_failed - remove_character_flag = heir_friend_personal_charm - remove_character_flag = heir_friend_sports - remove_character_flag = heir_friend_gift - remove_character_flag = heir_friend_kinship - remove_character_flag = heir_friend_shared_traits - remove_character_flag = heir_friend_lifestyle_trait - remove_character_flag = player_heir_friend_blood_brother - remove_character_flag = player_heir_friend_obedient - } -} - -mpo_decisions_events.0098 = { - hidden = yes - - immediate = { - send_interface_toast = { - title = abused_paiza_authority - left_icon = root - right_icon = situation:the_great_steppe.situation_top_herd - switch = { - trigger = var:paiza_abuse_stance - flag:indifferent = { custom_tooltip = mpo_paiza_abuse_counter_effect.indifferent } - flag:angry = { custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_angry } - flag:annoyed = { custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_annoyed } - } - } - } -} - -mpo_decisions_events.0099 = { - type = character_event - title = mpo_decisions_events.0099.t - desc = mpo_decisions_events.0099.desc - theme = vassal - - override_background = { reference = mpo_tent_interior_mongol } - left_portrait = { - character = root - animation = personality_rational - } - artifact = { - target = scope:created_paiza - position = lower_right_portrait - } - - immediate = { - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = root - } - } - - option = { - name = mpo_decisions_events.0099.a - custom_tooltip = mpo_establish_paiza_system_decision.grant_paiza_interaction_unlocked - custom_tooltip = mpo_establish_paiza_system_decision.request_paiza_interaction_unlocked - custom_tooltip = mpo_establish_paiza_system_decision.paiza_obedient - custom_tooltip = mpo_establish_paiza_system_decision.call_for_merchants_decision_unlocked - custom_tooltip = mpo_establish_paiza_system_decision.leverage_khan_authority_unlocked - custom_tooltip = mpo_establish_paiza_system_decision.paiza_abuse_authority_unlocked - } -} - -#scripted effect to make the merchant go - - - -scripted_effect send_merchant_on_merry_voyage_effect = { - set_variable = { - name = merchant_employer - value = prev - } - set_variable = { - name = merchant_origin - value = scope:merchant_origin - } - start_travel_plan = { - destination = scope:merchant_origin.title_province - return_trip = yes - on_arrival_event = mpo_decisions_events.0102 - on_arrival_destinations = last - } -} - -scripted_effect send_merchant_on_first_voyage_effect = { - set_variable = merchant_var - set_variable = { - name = merchant_employer - value = prev - } - set_variable = { - name = merchant_origin - value = scope:merchant_origin - } - start_travel_plan = { - destination = var:merchant_employer.location - on_arrival_event = mpo_decisions_events.2140 - on_arrival_destinations = first - return_trip = no - } - root = { - prev = { - save_scope_as = merchant - } - send_interface_toast = { - type = event_toast_effect_good - title = paiza_merchant_on_route_tt - left_icon = scope:merchant_origin - right_icon = scope:merchant - custom_tooltip = paiza_merchant_on_route_tt_desc - } - } -} - - - -mpo_decisions_events.2139 = { - hidden = yes - - immediate = { - mpo_find_suitable_merchant_effect = yes - scope:paiza_merchant = { - random_list = { - 1 = { - add_trait = avaricious - add_stewardship_skill = 6 - add_learning_skill = 4 - add_intrigue_skill = 2 - add_prowess_skill = 4 - add_diplomacy_skill = 2 - } - 1 = { - add_trait = diplomat - add_stewardship_skill = 4 - add_learning_skill = 5 - add_intrigue_skill = 8 - add_prowess_skill = 8 - add_diplomacy_skill = 6 - } - 1 = { - add_trait = scholar - add_stewardship_skill = 4 - add_learning_skill = 5 - add_intrigue_skill = 8 - add_prowess_skill = 8 - add_diplomacy_skill = 4 - } - } - add_trait = lifestyle_traveler - add_gold = { - value = root.tiny_gold_value - multiply = 21.37 - } - send_merchant_on_first_voyage_effect = yes - } - } -} - - -mpo_decisions_events.2140 = { - hidden = yes - - immediate = { - remove_variable = merchant_var # Used only to send the death notification message - save_scope_as = paiza_merchant - var:merchant_origin = { - save_scope_as = merchant_origin - } - #teleport in case merchant_employer has migrated or something - var:merchant_employer = { - if = { - limit = { - is_alive = yes - } - if = { - limit = { - NOT = { - root.location = location - } - } - root = { - set_location = { location = var:merchant_employer.location } - } - } - if = { - limit = { - has_character_flag = established_paiza_system - } - trigger_event = mpo_decisions_events.0100 - } - else = { - trigger_event = mpo_decisions_events.2141 - } - } - } - } -} - -mpo_decisions_events.2138 = { - type = character_event - theme = nomads - - title = mpo_decisions_events.2138.t - desc = mpo_decisions_events.2138.desc - - override_background = { reference = mpo_camp_steppe } - - left_portrait = { - character = root - animation = personality_honorable - } - - right_portrait = { - character = scope:paiza_merchant - animation = personality_greedy - } - - immediate = { - add_character_flag = { - flag = had_herd_trade - days = 7 - } - domicile ?= { - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_herd_gain_lvl_1 = { - root = { - set_variable = { - name = herd_trade_herd_value - value = { - value = domicile.herd - multiply = 0.1 - } - } - set_variable = { - name = herd_trade_gold_value - value = { - value = root.var:herd_trade_herd_value - divide = 10 - } - } - } - } - nomad_yurt_paiza_herd_gain_lvl_2 = { - root = { - set_variable = { - name = herd_trade_herd_value - value = { - value = domicile.herd - multiply = 0.15 - } - } - set_variable = { - name = herd_trade_gold_value - value = { - value = root.var:herd_trade_herd_value - divide = 8 - } - } - } - } - nomad_yurt_paiza_herd_gain_lvl_3 = { - root = { - set_variable = { - name = herd_trade_herd_value - value = { - value = domicile.herd - multiply = 0.2 - } - } - set_variable = { - name = herd_trade_gold_value - value = { - value = root.var:herd_trade_herd_value - divide = 6 - } - } - } - } - } - } - } - - option = { - name = mpo_decisions_events.2138.a - domicile ?= { - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_herd_gain_lvl_1 = { root = { custom_tooltip = domicile_building_parameter_nomad_merchant_herd_gold_exchange_lvl_1 } } - nomad_yurt_paiza_herd_gain_lvl_2 = { root = { custom_tooltip = domicile_building_parameter_nomad_merchant_herd_gold_exchange_lvl_2 } } - nomad_yurt_paiza_herd_gain_lvl_3 = { root = { custom_tooltip = domicile_building_parameter_nomad_merchant_herd_gold_exchange_lvl_3 } } - } - } - hidden_effect = { - scope:paiza_merchant = { - add_gold = root.var:herd_trade_gold_value - } - } - scope:paiza_merchant = { - pay_short_term_gold = { - target = root - gold = root.var:herd_trade_gold_value - } - } - domicile ?= { - change_herd = { - value = root.var:herd_trade_herd_value - multiply = -1 - } - } - } - - option = { - name = mpo_decisions_events.2138.c - custom_tooltip = mpo_decisions_events.2138.c.desc - } - - after = { - if = { - limit = { - has_character_flag = smol_herd_trade - } - trigger_event = mpo_decisions_events.2141 - remove_character_flag = smol_herd_trade - } - else = { - trigger_event = mpo_decisions_events.0100 - } - remove_variable = herd_trade_herd_value - remove_variable = herd_trade_gold_value - } - -} - -mpo_decisions_events.2141 = { #mpo_call_for_merchants_smol_decision initial event - type = character_event - theme = nomads - - title = mpo_decisions_events.2141.t - desc = mpo_decisions_events.2141.desc - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = personality_honorable - } - - right_portrait = { - character = scope:paiza_merchant - animation = throne_room_bow_3 - } - - trigger = { - is_available_adult = yes - scope:paiza_merchant.location = root.location - } - - on_trigger_fail = { - scope:paiza_merchant = { - set_location = { location = root.location } - } - trigger_event = { - id = mpo_decisions_events.2141 - months = { 2 4 } - } - } - - option = { #ask for an artifact material - name = mpo_decisions_events.2141.b - - pay_short_term_gold = { - target = scope:paiza_merchant - gold = 400 - } - - scope:paiza_merchant = { - set_variable = { - name = requested_merchant_goods - value = flag:artifact_material - } - set_variable = { - name = paiza_gold_invested - value = 400 - } - send_merchant_on_merry_voyage_effect = yes - } - - custom_tooltip = mpo_decisions_events.2141.upon_merchant_return - show_as_tooltip = { - add_character_modifier = { - modifier = mpo_artifact_material_modifier - } - mpo_yurts_paiza_bonuses_tooltip_effect = yes - } - ai_chance = { - base = 0 - } - } - - option = { #ask for better armor for ur maa - name = mpo_decisions_events.2141.c - - show_as_unavailable = { - gold <= 800 - } - - pay_short_term_gold = { - target = scope:paiza_merchant - gold = 800 - } - - scope:paiza_merchant = { - set_variable = { - name = requested_merchant_goods - value = flag:armaments - } - set_variable = { - name = paiza_gold_invested - value = 800 - } - send_merchant_on_merry_voyage_effect = yes - } - - custom_tooltip = mpo_decisions_events.2141.upon_merchant_return - show_as_tooltip = { - mpo_paiza_improve_maa_smol_effect = yes - mpo_yurts_paiza_bonuses_tooltip_effect = yes - } - - ai_chance = { #most safe option for ai - base = 100 - } - } - - option = { - name = mpo_decisions_events.2141.d - custom_tooltip = mpo_decisions_events.2141.d.unlocked - trigger = { - NOT = { - has_character_flag = had_herd_trade - } - domicile ?= { - has_domicile_building_or_higher = herd_trade_yurt_01 - } - } - add_character_flag = smol_herd_trade - trigger_event = mpo_decisions_events.2138 - - ai_chance = { - base = 200 - } - } - - option = { #actually, give me your gold and get lost - name = mpo_decisions_events.0100.e - scope:paiza_merchant = { - pay_short_term_gold = { - target = root - gold = scope:paiza_merchant.gold - } - death = { - killer = root - death_reason = death_execution - } - } - add_character_modifier = { - modifier = mpo_paiza_robbed_merchants - years = { 18 22 } - } - custom_tooltip = mpo_decisions_events.0100.e.warning - - ai_chance = { - base = 50 - } - } -} - -mpo_decisions_events.0100 = { #mpo_call_for_merchants_decision initial event - type = character_event - theme = nomads - - title = mpo_decisions_events.0100.t - desc = mpo_decisions_events.0100.desc - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = personality_honorable - } - - right_portrait = { - character = scope:paiza_merchant - animation = throne_room_bow_3 - } - - trigger = { - is_available_adult = yes - scope:paiza_merchant.location = root.location - } - - on_trigger_fail = { - scope:paiza_merchant = { - set_location = { location = root.location } - } - trigger_event = { - id = mpo_decisions_events.0100 - months = { 2 4 } - } - } - - option = { #give him paiza, ask for innovation progress - name = mpo_decisions_events.0100.a - - show_as_unavailable = { - NOT = { - domicile ?= { - has_domicile_building_or_higher = innovation_yurt_01 - } - } - gold <= 2400 - } - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = scope:paiza_merchant - } - pay_short_term_gold = { - target = scope:paiza_merchant - gold = 2400 - } - scope:paiza_merchant = { - set_variable = { - name = paiza_gold_invested - value = 2400 - } - set_variable = { - name = requested_merchant_goods - value = flag:innovation - } - send_merchant_on_merry_voyage_effect = yes - } - custom_tooltip = mpo_decisions_events.0100.upon_merchant_return - show_as_tooltip = { - domicile ?= { - mpo_paiza_innovation_reward_effect = yes - } - custom_tooltip = paiza_merchant_skill_gold_percent - mpo_yurts_paiza_bonuses_tooltip_effect = yes - } - - ai_chance = { - base = 0 - } - } - - option = { #give him paiza, ask for an artifact material - name = mpo_decisions_events.0100.b - - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = scope:paiza_merchant - } - - pay_short_term_gold = { - target = scope:paiza_merchant - gold = 800 - } - - scope:paiza_merchant = { - set_variable = { - name = requested_merchant_goods - value = flag:artifact_material - } - set_variable = { - name = paiza_gold_invested - value = 800 - } - send_merchant_on_merry_voyage_effect = yes - } - custom_tooltip = mpo_decisions_events.0100.upon_merchant_return - show_as_tooltip = { - add_character_modifier = { - modifier = mpo_artifact_material_modifier - } - custom_tooltip = paiza_merchant_skill_gold_percent - mpo_yurts_paiza_bonuses_tooltip_effect = yes - } - - ai_chance = { - base = 0 - } - } - - option = { #ask for better armor for ur maa - name = mpo_decisions_events.0100.c - - show_as_unavailable = { - gold <= 1600 - } - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = scope:paiza_merchant - } - pay_short_term_gold = { - target = scope:paiza_merchant - gold = 1600 - } - - scope:paiza_merchant = { - set_variable = { - name = requested_merchant_goods - value = flag:armaments - } - set_variable = { - name = paiza_gold_invested - value = 1600 - } - send_merchant_on_merry_voyage_effect = yes - } - custom_tooltip = mpo_decisions_events.0100.upon_merchant_return - show_as_tooltip = { - mpo_paiza_improve_maa_effect = yes - custom_tooltip = paiza_merchant_skill_gold_percent - mpo_yurts_paiza_bonuses_tooltip_effect = yes - } - - ai_chance = { #most safe option for ai - base = 100 - } - } - - option = { - name = mpo_decisions_events.0100.d - custom_tooltip = mpo_decisions_events.0100.d.unlocked - trigger = { - NOT = { - has_character_flag = had_herd_trade - } - domicile ?= { - has_domicile_building_or_higher = herd_trade_yurt_01 - } - } - trigger_event = mpo_decisions_events.2138 - - ai_chance = { - base = 200 - } - } - - option = { #actually, give me your gold and get lost - name = mpo_decisions_events.0100.e - scope:paiza_merchant = { - pay_short_term_gold = { - target = root - gold = scope:paiza_merchant.gold - } - death = { - killer = root - death_reason = death_execution - } - } - add_character_modifier = { - modifier = mpo_paiza_robbed_merchants - years = { 12 16 } - } - custom_tooltip = mpo_decisions_events.0100.e.warning - - ai_chance = { - base = 50 - } - } -} - -mpo_decisions_events.0101 = { #the merchant is back - type = character_event - theme = nomads - - title = mpo_decisions_events.0101.t - desc = mpo_decisions_events.0101.desc - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = ecstasy - } - - right_portrait = { - character = scope:paiza_merchant - animation = drink - } - - trigger = { - is_available_adult = yes - scope:paiza_merchant.location = root.location - } - - on_trigger_fail = { - scope:paiza_merchant = { - set_location = { location = root.location } - } - trigger_event = { - id = mpo_decisions_events.0101 - months = { 2 4 } - } - } - - immediate = { - mpo_paiza_deal_grade_effect = yes - mpo_yurts_paiza_bonuses_effect = yes - } - - - option = { #rejoice! - name = mpo_decisions_events.0101.a - - ai_chance = { - base = 10 - } - } - - option = { - name = mpo_decisions_events.0101.b - custom_tooltip = mpo_decisions_events.0101.b.desc - trigger_event = mpo_decisions_events.2137 - - ai_chance = { - base = 0 - } - } - - after = { - switch = { - trigger = scope:merchant_goods - flag:artifact_material = { - add_character_modifier = { - modifier = mpo_artifact_material_modifier - years = 4 - } - } - flag:innovation = { - domicile ?= { - mpo_paiza_innovation_reward_effect = yes - } - } - flag:armaments = { - if = { - limit = { - scope:paiza_merchant = { - has_character_flag = established_paiza_system - } - } - mpo_paiza_improve_maa_smol_effect = yes - } - else = { - mpo_paiza_improve_maa_effect = yes - } - } - } - - scope:paiza_merchant = { - hidden_effect = { - add_gold = root.var:trade_gold_value - } - pay_short_term_gold = { - target = root - gold = root.var:trade_gold_value - } - } - } -} - -mpo_decisions_events.2137 = { - type = character_event - theme = nomads - - title = mpo_decisions_events.0101.t - desc = { - desc = mpo_decisions_events.2137.desc_intro - first_valid = { - triggered_desc = { - trigger = { scope:first_story = flag:desc_1 } - desc = marco_polo_quote_desc_1 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_2 } - desc = marco_polo_quote_desc_2 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_3 } - desc = marco_polo_quote_desc_3 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_4 } - desc = marco_polo_quote_desc_4 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_5 } - desc = marco_polo_quote_desc_5 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_6 } - desc = marco_polo_quote_desc_6 - } - triggered_desc = { - trigger = { scope:first_story = flag:desc_7 } - desc = marco_polo_quote_desc_7 - } - } - desc = mpo_decisions_events.2137.desc_interludium - first_valid = { - triggered_desc = { - trigger = { scope:second_story = flag:desc_1 } - desc = marco_polo_quote_desc_1 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_2 } - desc = marco_polo_quote_desc_2 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_3 } - desc = marco_polo_quote_desc_3 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_4 } - desc = marco_polo_quote_desc_4 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_5 } - desc = marco_polo_quote_desc_5 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_6 } - desc = marco_polo_quote_desc_6 - } - triggered_desc = { - trigger = { scope:second_story = flag:desc_7 } - desc = marco_polo_quote_desc_7 - } - } - } - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = disbelief - } - - right_portrait = { - character = scope:paiza_merchant - animation = admiration - } - - immediate = { - random_list = { #since the event can happen twice, we are rolling for the first and second paragraph in such way to make sure player sees unique content - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_1 scope:first_story ?= flag:desc_1 } } - save_scope_value_as = { - name = first_story - value = flag:desc_1 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_2 scope:first_story ?= flag:desc_2 } } - save_scope_value_as = { - name = first_story - value = flag:desc_2 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_3 scope:first_story ?= flag:desc_3 } culture = culture:mongol } - save_scope_value_as = { - name = first_story - value = flag:desc_3 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_4 scope:first_story ?= flag:desc_4 } } - save_scope_value_as = { - name = first_story - value = flag:desc_4 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_5 scope:first_story ?= flag:desc_5 } } - save_scope_value_as = { - name = first_story - value = flag:desc_5 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_6 scope:first_story ?= flag:desc_6 } } - save_scope_value_as = { - name = first_story - value = flag:desc_6 - } - } - 1 = { - trigger = { NOT = { scope:first_story ?= flag:desc_7 scope:first_story ?= flag:desc_7 } } - save_scope_value_as = { - name = first_story - value = flag:desc_7 - } - } - } - random_list= { - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_1 scope:second_story ?= flag:desc_1 } } - save_scope_value_as = { - name = second_story - value = flag:desc_1 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_2 scope:second_story ?= flag:desc_2 } } - save_scope_value_as = { - name = second_story - value = flag:desc_2 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_3 scope:second_story ?= flag:desc_3 } culture = culture:mongol } - save_scope_value_as = { - name = second_story - value = flag:desc_3 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_4 scope:second_story ?= flag:desc_4 } } - save_scope_value_as = { - name = second_story - value = flag:desc_4 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_5 scope:second_story ?= flag:desc_5 } } - save_scope_value_as = { - name = second_story - value = flag:desc_5 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_6 scope:second_story ?= flag:desc_6 } } - save_scope_value_as = { - name = second_story - value = flag:desc_6 - } - } - 1 = { - trigger = { NOT = { scope:second_story ?= flag:desc_7 scope:second_story ?= flag:desc_7 } } - save_scope_value_as = { - name = second_story - value = flag:desc_7 - } - } - } - } - - option = { - name = mpo_decisions_events.2137.a - } - - option = { - name = mpo_decisions_events.2137.b - trigger_event = mpo_decisions_events.2137 - } - - option = { - name = mpo_decisions_events.2137.c - add_courtier = scope:paiza_merchant - } -} - -mpo_decisions_events.0102 = { - hidden = yes - - immediate = { - save_scope_as = paiza_merchant - var:merchant_origin = { - save_scope_as = merchant_origin - } - var:requested_merchant_goods = { - save_scope_as = merchant_goods - } - - var:merchant_employer = { - if = { - limit = { - is_alive = yes - } - if = { - limit = { - NOT = { - root.location = location - } - } - root = { - set_location = { location = var:merchant_employer.location } - } - } - trigger_event = mpo_decisions_events.0101 - } - } - } -} - - - -mpo_decisions_events.0110 = { #mpo_abuse_authority_paiza_decision initial event - type = character_event - theme = nomads - - title = mpo_decisions_events.0110.t - desc = mpo_decisions_events.0110.desc - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = personality_bold - } - - right_portrait = { - character = scope:local_boi - animation = beg - } - - lower_center_portrait = { - character = scope:paiza_patron - } - - artifact = { - target = scope:paiza_artifact - position = lower_right_portrait - } - - immediate = { - random_character_artifact = { - limit = { - root = { can_benefit_from_artifact = prev } - exists = var:paiza_patron - var:paiza_patron = { - is_alive = yes - is_gurkhan = yes - } - } - save_scope_as = paiza_artifact - var:paiza_patron ?= { - save_scope_as = paiza_patron - } - } - location.duchy = { - random_de_jure_county = { - limit = { - holder = { - is_ai = yes - } - } - weight = { - base = 1 - modifier = { - add = holder.primary_title.tier - } - } - holder = { - save_scope_as = local_boi - } - } - } - } - - option = { #yeah, go for it - name = mpo_decisions_events.0110.a - mpo_paiza_abuse_counter_effect = { - PAIZA_PATRON = scope:paiza_patron - PAIZA_ABUSER = root - } - mpo_abuse_authority_county_effect = yes - } - - option = { #try to be sneaky about it - name = mpo_decisions_events.0110.b - - duel = { - skill = intrigue - value = very_high_skill_rating - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - min = 5 - mpo_abuse_authority_county_effect = yes - send_interface_toast = { - type = event_toast_effect_good - title = mpo_decisions_events.0110.b.success - custom_tooltip = mpo_decisions_events.0110.b.success_desc - left_icon = root - right_icon = scope:paiza_patron - } - } - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - min = 10 - send_interface_toast = { - type = event_toast_effect_bad - title = mpo_decisions_events.0110.b.failure - left_icon = root - right_icon = scope:paiza_patron - mpo_paiza_abuse_counter_effect = { - PAIZA_PATRON = scope:paiza_patron - PAIZA_ABUSER = root - } - } - } - } - } - - option = { - name = mpo_decisions_events.0110.d - add_prestige = -200 - } -} - -mpo_decisions_events.0111 = { #mpo_abuse_authority_paiza_decision consequences - type = character_event - theme = nomads - - title = mpo_decisions_events.0111.t - desc = mpo_decisions_events.0111.desc - - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = fear - } - - right_portrait = { - character = scope:paiza_patron - animation = anger - } - - artifact = { - target = scope:paiza_artifact - position = lower_right_portrait - } - - immediate = { - liege = { save_scope_as = paiza_patron } - add_character_flag = no_more_paiza_abuse - - random_equipped_character_artifact = { - limit = { - root = { can_benefit_from_artifact = prev } - exists = var:paiza_patron - var:paiza_patron = { - is_alive = yes - is_gurkhan = yes - } - } - save_scope_as = paiza_artifact - var:paiza_patron ?= { - save_scope_as = paiza_patron - } - } - } - - option = { #whoooops - name = mpo_decisions_events.0111.a - #what do you mean my actions have consequences - custom_tooltip = mpo_decisions_events.0111.a.effects - scope:paiza_patron = { - add_opinion = { - target = root - modifier = abused_paiza_authority - } - } - } - - option = { #its a prank bro - trigger = { - scope:paiza_patron = { - is_ai = yes - } - } - name = mpo_decisions_events.0111.b - add_prestige_level = -1 - duel = { - skill = diplomacy - target = scope:paiza_patron - 30 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - min = 5 - custom_tooltip = mpo_decisions_events.0111.a.survived_khans_wrath - scope:paiza_patron = { - add_opinion = { - target = root - modifier = angry_opinion - opinion = -30 - } - } - } - 70 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - min = 10 - custom_tooltip = mpo_decisions_events.0111.a.severe_effects - scope:paiza_patron = { - add_opinion = { - target = root - modifier = gravely_abused_paiza_authority - } - } - every_close_family_member = { - limit = { - is_ai = yes - } - scope:paiza_patron = { - add_opinion = { - target = prev - modifier = abused_paiza_authority_family - } - } - } - } - } - } -} - -mpo_decisions_events.0112 = { #mpo_abuse_authority_paiza_decision consequences decision for a player - type = character_event - theme = nomads - - override_background = { reference = mpo_campfire_steppe } - - title = mpo_decisions_events.0112.t - desc = mpo_decisions_events.0112.desc - - left_portrait = { - character = scope:paiza_abuser_1 - animation = personality_coward - } - - right_portrait = { - character = scope:paiza_abuser - animation = fear - } - - artifact = { - target = scope:paiza_artifact - position = lower_right_portrait - } - - trigger = { - NOT = { - has_character_flag = refused_paiza_abuse_notifications - } - scope:paiza_abuser = { - any_dynasty_member = { - location = scope:paiza_abuser - is_ai = yes - is_adult = yes - } - } - } - - immediate = { - scope:paiza_abuser = { - random_dynasty_member = { - limit = { - location = scope:paiza_abuser - is_ai = yes - is_adult = yes - } - save_scope_as = paiza_abuser_1 - } - random_equipped_character_artifact = { - limit = { - root = { can_benefit_from_artifact = prev } - exists = var:paiza_patron - var:paiza_patron = { - is_alive = yes - is_gurkhan = yes - } - } - save_scope_as = paiza_artifact - var:paiza_patron ?= { - save_scope_as = paiza_patron - } - } - } - } - - option = { #take action - name = mpo_decisions_events.0112.a - custom_tooltip = mpo_decisions_events.0112.a.desc - reverse_add_opinion = { - target = scope:paiza_abuser - modifier = gravely_abused_paiza_authority - } - reverse_add_opinion = { - target = scope:paiza_abuser_1 - modifier = gravely_abused_paiza_authority - } - } - - option = { #not for now - name = mpo_decisions_events.0112.b - scope:paiza_abuser = { - send_interface_toast = { - type = event_toast_effect_good - title = mpo_paiza_abuse_counter_effect.indifferent - left_icon = root - } - } - scope:paiza_abuser_1 = { - send_interface_toast = { - type = event_toast_effect_good - title = mpo_paiza_abuse_counter_effect.indifferent - left_icon = root - } - } - } - - option = { #do not notify me ever again (ever for like, 10 years) - name = mpo_decisions_events.0112.c - - add_character_flag = { - flag = refused_paiza_abuse_notifications - years = 10 - } - } -} - -scripted_effect localize_study_commander_success_chance_change = { - if = { - limit = { - $VALUE$ >= 25 - } - custom_tooltip = study_commander_trait_current_success_chance_increase_monumental - } - else_if = { - limit = { - $VALUE$ >= 15 - } - custom_tooltip = study_commander_trait_current_success_chance_increase_great - } - else_if = { - limit = { - $VALUE$ >= 1 - } - custom_tooltip = study_commander_trait_current_success_chance_increase - } - else_if = { - limit = { - $VALUE$ = 0 - } - custom_tooltip = study_commander_trait_current_success_chance_none - } - else_if = { - limit = { - $VALUE$ >= -15 - } - custom_tooltip = study_commander_trait_current_success_chance_decrease - } - else = { - custom_tooltip = study_commander_trait_current_success_chance_decrease_great - } - if = { - limit = { - NOT = { has_variable = study_commander_trait_success_chance_var } - } - set_variable = { - name = study_commander_trait_success_chance_var - value = 0 - } - } - change_variable = { - name = study_commander_trait_success_chance_var - add = $VALUE$ - } -} -scripted_effect mentor_option_seed_effect = { - random_list = { - 1 = { save_scope_value_as = { name = mentor_option_seed value = 1 } } - 1 = { save_scope_value_as = { name = mentor_option_seed value = 2 } } - } -} -scripted_effect trait_weighting_effect = { - if = { - limit = { - can_weigh_trait_trigger = { - TRAIT = $WEIGHTED_TRAIT$ - } - } - if = { - limit = { - NOT = { has_variable = $WEIGHTED_TRAIT$_weight } - } - set_variable = { - name = $WEIGHTED_TRAIT$_weight - value = 0 - } - } - change_variable = { - name = $WEIGHTED_TRAIT$_weight - add = $WEIGHT$ - } - every_trait = { - limit = { - this = trait:$WEIGHTED_TRAIT$ - } - save_scope_as = weighted_trait - } - if = { - limit = { - $WEIGHT$ > 0 - } - custom_tooltip = study_commander_trait_weight_tooltip_pos - } - else = { - custom_tooltip = study_commander_trait_weight_tooltip_neg - } - } - else = { - add_prestige = 10 - } -} -scripted_effect trait_weighting_effect_mentor = { - if = { - limit = { - scope:commander_trait_mentor = { has_trait = $TRAIT$ } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = $TRAIT$ - WEIGHT = 10 - } - } -} -scripted_trigger can_weigh_trait_trigger = { - trigger_if = { - limit = { - NOT = { has_trait = $TRAIT$ } - } - # Exceptions - trigger_if = { - limit = { - flag:$TRAIT$ = flag:reckless - } - NOT = { has_trait = cautious_leader } - } - trigger_else_if = { - limit = { - flag:$TRAIT$ = flag:cautious_leader - - } - NOT = { has_trait = reckless } - } - trigger_else = { - always = yes - } - } - trigger_else = { - always = no - } -} - -# Study Commander Trait Events -mpo_decisions_events.0200 = { - type = character_event - title = mpo_decisions_events.0200.t - desc = { - desc = mpo_decisions_events.0200.desc - first_valid = { - triggered_desc = { - trigger = { - has_variable = commander_trait_mentor - var:commander_trait_mentor = scope:commander_trait_mentor - } - desc = mpo_decisions_events.0200.desc_my_mentor - } - triggered_desc = { - trigger = { - scope:commander_trait_mentor = { has_variable = commander_trait_mentor } - } - desc = mpo_decisions_events.0200.desc_mentor - } - } - } - theme = nomads - - left_portrait = { - character = root - animation = marshal - } - - right_portrait = { - character = scope:commander_trait_mentor - animation = inspect_weapon - } - - immediate = { - stress_impact = { - base = medium_stress_impact_gain - } - add_character_flag = is_learning_commander_trait - # Find a mentor - if = { - limit = { - OR = { - NOT = { has_variable = commander_trait_mentor } - AND = { - has_variable = commander_trait_mentor - var:commander_trait_mentor = { is_available_adult = no } - } - } - } - every_knight = { - limit = { - is_available_adult = yes - } - save_scope_as = possible_mentor - root = { - add_to_variable_list = { - name = possible_mentor_list - target = scope:possible_mentor - } - } - } - every_vassal_or_below = { - limit = { - is_available_adult = yes - } - save_scope_as = possible_mentor - root = { - add_to_variable_list = { - name = possible_mentor_list - target = scope:possible_mentor - } - } - } - every_councillor = { - limit = { - is_available_adult = yes - } - save_scope_as = possible_mentor - root = { - add_to_variable_list = { - name = possible_mentor_list - target = scope:possible_mentor - } - } - } - ordered_in_list = { - variable = possible_mentor_list - limit = { - martial > decent_skill_rating - } - order_by = { - add = martial - if = { - limit = { - number_of_commander_traits >= 1 - } - add = 5 - } - } - save_scope_as = commander_trait_mentor - } - if = { - limit = { - NOT = { exists = scope:commander_trait_mentor } - } - create_character = { - random_traits = yes - dynasty = none - location = root.location - culture = root.location.culture - faith = root.location.faith - gender_female_chance = root_soldier_female_chance - random_traits_list = { - count = 1 - education_martial_2 = {} - education_martial_3 = {} - education_martial_4 = {} - } - random_traits_list = { - count = 1 - brave = {} - just = {} - gallant = {} - honest = {} - gregarious = {} - generous = {} - diligent = {} - wrathful = {} - } - prowess = { - min_template_decent_skill - min_template_decent_skill - } - martial = { - min_template_high_skill - max_template_high_skill - } - intrigue = { - min_template_decent_skill - max_template_medium_skill - } - learning = { - min_template_decent_skill - max_template_medium_skill - } - save_scope_as = commander_trait_mentor - after_creation = { - give_random_commander_trait_effect = yes - } - } - } - } - else = { - var:commander_trait_mentor = { save_scope_as = commander_trait_mentor } - } - if = { - limit = { - debug_only = yes - } - custom_tooltip = study_commander_trait_current_success_chance_debug - } - else = { - custom_tooltip = study_commander_trait_current_success_chance - } - set_variable = { - name = study_commander_trait_success_chance_var - value = 0 - } - } - - option = { #Study under mentor - name = { - text = { - first_valid = { - triggered_desc = { - trigger = { - has_variable = commander_trait_mentor - var:commander_trait_mentor = scope:commander_trait_mentor - } - desc = mpo_decisions_events.0200.my_mentor - } - desc = mpo_decisions_events.0200.mentor - } - } - } - trigger = { - short_term_gold >= scope:commander_trait_mentor.study_commander_trait_mentor_hire_cost - } - show_as_unavailable = { always = yes } - flavor = mpo_decisions_events.0200.mentor_flavor - save_scope_value_as = { - name = training_method - value = flag:mentor - } - pay_short_term_gold = { - target = scope:commander_trait_mentor - gold = scope:commander_trait_mentor.study_commander_trait_mentor_hire_cost - } - localize_study_commander_success_chance_change = { - VALUE = 25 - } - set_variable = { - name = commander_trait_mentor - value = scope:commander_trait_mentor - } - scope:commander_trait_mentor = { - add_character_flag = commander_trait_mentor - } - if = { - limit = { - scope:commander_trait_mentor = { number_of_commander_traits >= 1 } - } - custom_tooltip = mpo_decisions_events.0200.mentor_traits - trait_weighting_effect_mentor = { TRAIT = logistician } - trait_weighting_effect_mentor = { TRAIT = military_engineer } - trait_weighting_effect_mentor = { TRAIT = aggressive_attacker } - trait_weighting_effect_mentor = { TRAIT = unyielding_defender } - trait_weighting_effect_mentor = { TRAIT = forder } - trait_weighting_effect_mentor = { TRAIT = flexible_leader } - trait_weighting_effect_mentor = { TRAIT = desert_warrior } - trait_weighting_effect_mentor = { TRAIT = jungle_stalker } - trait_weighting_effect_mentor = { TRAIT = reaver } - trait_weighting_effect_mentor = { TRAIT = reckless } - trait_weighting_effect_mentor = { TRAIT = holy_warrior } - trait_weighting_effect_mentor = { TRAIT = open_terrain_expert } - trait_weighting_effect_mentor = { TRAIT = rough_terrain_expert } - trait_weighting_effect_mentor = { TRAIT = forest_fighter } - trait_weighting_effect_mentor = { TRAIT = cautious_leader } - trait_weighting_effect_mentor = { TRAIT = organizer } - trait_weighting_effect_mentor = { TRAIT = winter_soldier } - } - stress_impact = { - greedy = medium_stress_impact_gain - arrogant = minor_stress_impact_gain - } - ai_chance = { - base = 100 - ai_value_modifier = { - ai_greed = 0.1 - ai_energy = 1 - } - modifier = { - scope:commander_trait_mentor.martial >= root.martial - factor = 1.25 - } - modifier = { - has_trait = arrogant - factor = 0 - } - } - } - - option = { #Study on your own - name = mpo_decisions_events.0200.a - flavor = mpo_decisions_events.0200.alone - save_scope_value_as = { - name = training_method - value = flag:none - } - localize_study_commander_success_chance_change = { - VALUE = 0 - } - ai_chance = { - base = 100 - ai_value_modifier = { - ai_energy = 0.5 - } - modifier = { - has_trait = craven - factor = 0.5 - } - } - } - - option = { #Study on your own - Martial - name = mpo_decisions_events.0200.martial - flavor = mpo_decisions_events.0200.martial_flavor - trigger = { - martial >= high_skill_rating - } - save_scope_value_as = { - name = training_method - value = flag:martial - } - if = { - limit = { - highest_skill = martial - } - localize_study_commander_success_chance_change = { - VALUE = 15 - } - } - else = { - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - ai_chance = { - base = 75 - ai_value_modifier = { - ai_energy = 0.5 - } - modifier = { - highest_skill = martial - factor = 1.5 - } - } - } - - option = { #Study on your own - Learning - name = mpo_decisions_events.0200.learning - flavor = mpo_decisions_events.0200.learning_flavor - trigger = { - learning >= high_skill_rating - } - show_as_unavailable = { learning >= low_skill_rating } - save_scope_value_as = { - name = training_method - value = flag:learning - } - if = { - limit = { - highest_skill = learning - } - localize_study_commander_success_chance_change = { - VALUE = 15 - } - } - else = { - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - ai_chance = { - base = 75 - ai_value_modifier = { - ai_energy = 0.5 - } - modifier = { - highest_skill = learning - factor = 1.5 - } - } - } - - option = { #Study on your own - Intrigue - name = mpo_decisions_events.0200.intrigue - flavor = mpo_decisions_events.0200.intrigue_flavor - trigger = { - intrigue >= high_skill_rating - } - show_as_unavailable = { intrigue >= low_skill_rating } - save_scope_value_as = { - name = training_method - value = flag:intrigue - } - if = { - limit = { - highest_skill = intrigue - } - localize_study_commander_success_chance_change = { - VALUE = 15 - } - } - else = { - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - ai_chance = { - base = 75 - ai_value_modifier = { - ai_energy = 0.5 - } - modifier = { - highest_skill = intrigue - factor = 1.5 - } - } - } - - after = { - if = { - limit = { - OR = { - has_trait = vengeful - has_trait = wrathful - has_trait = paranoid - has_trait = arbitrary - has_trait = zealous - has_trait = temperate - has_trait = gluttonous - has_trait = greedy - has_trait = diligent - has_trait = administrator - has_trait = architect - } - } - custom_tooltip = study_commander_trait_bonus - if = { - limit = { - OR = { - has_trait = vengeful - has_trait = wrathful - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = aggressive_attacker - WEIGHT = 10 - } - } - if = { - limit = { - has_trait = paranoid - } - trait_weighting_effect = { - WEIGHTED_TRAIT = cautious_leader - WEIGHT = 10 - } - } - if = { - limit = { - has_trait = arbitrary - } - trait_weighting_effect = { - WEIGHTED_TRAIT = reckless - WEIGHT = 10 - } - } - if = { - limit = { - has_trait = zealous - } - trait_weighting_effect = { - WEIGHTED_TRAIT = holy_warrior - WEIGHT = 10 - } - } - if = { - limit = { - has_trait = temperate - } - trait_weighting_effect = { - WEIGHTED_TRAIT = logistician - WEIGHT = 10 - } - } - if = { - limit = { - has_trait = gluttonous - } - trait_weighting_effect = { - WEIGHTED_TRAIT = logistician - WEIGHT = -10 - } - } - if = { - limit = { - has_trait = greedy - } - trait_weighting_effect = { - WEIGHTED_TRAIT = reaver - WEIGHT = 10 - } - } - if = { - limit = { - OR = { - has_trait = diligent - has_trait = administrator - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = organizer - WEIGHT = 5 - } - } - if = { - limit = { - has_trait = architect - } - trait_weighting_effect = { - WEIGHTED_TRAIT = military_engineer - WEIGHT = 10 - } - } - } - if = { - limit = { - NOR = { - scope:commander_trait_mentor = { is_courtier_of = root } - scope:commander_trait_mentor = { is_councillor_of = root } - scope:commander_trait_mentor = { is_knight_of = root } - scope:training_method ?= flag:mentor - } - } - scope:commander_trait_mentor = { - silent_disappearance_effect = yes - } - } - trigger_event = { - id = mpo_decisions_events.0201 - days = { 5 10 } - } - } -} - -scripted_effect study_commander_trait_option_mentor = { - if = { - limit = { - $DUEL$ = yes - } - duel = { - skill = $SKILL$ - target = scope:commander_trait_mentor - desc = study_commander_trait_option_mentor_desc - 60 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - } - desc = $SUCCESS_DESC$ - send_interface_toast = { - type = event_toast_effect_good - title = $SUCCESS_DESC$ - left_icon = root - right_icon = scope:commander_trait_mentor - if = { - limit = { - $WOUND_CHANCE$ = yes - } - random = { - chance = 10 - scope:commander_trait_mentor = { - increase_wounds_effect = { REASON = fight } - } - } - } - random_list = { - 50 = { - desc = study_commander_trait_option_success_ok - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 10 } - } - 50 = { - desc = study_commander_trait_option_success - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 20 } - } - } - } - } - 30 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - } - desc = $FAIL_DESC$ - send_interface_toast = { - type = event_toast_effect_bad - title = $FAIL_DESC$ - left_icon = root - right_icon = scope:commander_trait_mentor - if = { - limit = { - $WOUND_CHANCE$ = yes - } - random = { - chance = 10 - increase_wounds_effect = { REASON = fight } - } - } - random_list = { - 50 = { - desc = study_commander_trait_option_fail_ok - localize_study_commander_success_chance_change = { VALUE = -10 } - } - 50 = { - desc = study_commander_trait_option_fail - localize_study_commander_success_chance_change = { VALUE = -20 } - } - } - } - } - } - } - else = { - duel = { - skill = $SKILL$ - value = decent_skill_rating - 75 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - } - desc = $SUCCESS_DESC$ - send_interface_toast = { - type = event_toast_effect_good - title = $SUCCESS_DESC$ - left_icon = root - right_icon = scope:commander_trait_mentor - if = { - limit = { - $WOUND_CHANCE$ = yes - } - random = { - chance = 10 - scope:commander_trait_mentor = { - increase_wounds_effect = { REASON = fight } - } - } - } - random_list = { - 50 = { - desc = study_commander_trait_option_success_ok - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 10 } - } - 50 = { - desc = study_commander_trait_option_success - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 20 } - } - } - } - } - 30 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - } - desc = $FAIL_DESC$ - send_interface_toast = { - type = event_toast_effect_bad - title = $FAIL_DESC$ - left_icon = root - right_icon = scope:commander_trait_mentor - if = { - limit = { - $WOUND_CHANCE$ = yes - } - random = { - chance = 10 - increase_wounds_effect = { REASON = fight } - } - } - random_list = { - 50 = { - desc = study_commander_trait_option_fail_ok - localize_study_commander_success_chance_change = { VALUE = -10 } - } - 50 = { - desc = study_commander_trait_option_fail - localize_study_commander_success_chance_change = { VALUE = -20 } - } - } - } - } - } - } -} - -scripted_effect study_commander_trait_option_no_mentor = { - if = { - limit = { - $DUEL$ = yes - } - duel = { - skill = $SKILL$ - value = high_skill_rating - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - } - desc = $SUCCESS_DESC$ - send_interface_toast = { - type = event_toast_effect_good - title = $SUCCESS_DESC$ - left_icon = root - random_list = { - 50 = { - desc = study_commander_trait_option_success_ok - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 10 } - } - 50 = { - desc = study_commander_trait_option_success - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 20 } - } - } - } - } - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - } - desc = $FAIL_DESC$ - send_interface_toast = { - type = event_toast_effect_bad - title = $FAIL_DESC$ - left_icon = root - if = { - limit = { - $WOUND_CHANCE$ = yes - } - random = { - chance = 10 - increase_wounds_effect = { REASON = fight } - } - } - random_list = { - 50 = { - desc = study_commander_trait_option_fail_ok - localize_study_commander_success_chance_change = { VALUE = -10 } - } - 50 = { - desc = study_commander_trait_option_fail - localize_study_commander_success_chance_change = { VALUE = -20 } - } - } - } - } - } - } - else = { - random_list = { - 50 = { - desc = $SUCCESS_DESC$ - show_chance = no - localize_study_commander_success_chance_change = { VALUE = 10 } - } - 50 = { - desc = $FAIL_DESC$ - show_chance = no - localize_study_commander_success_chance_change = { VALUE = -10 } - } - } - } -} - - -mpo_decisions_events.0201 = { # Training Session 1 - type = character_event - title = mpo_decisions_events.0201.t - desc = { - desc = mpo_decisions_events.0201.desc_intro - triggered_desc = { - trigger = { - scope:training_method = flag:mentor - } - desc = mpo_decisions_events.0201.desc_mentor - } - } - theme = nomads - - left_portrait = { - character = root - animation = marshal - } - - right_portrait = { - trigger = { - scope:training_method = flag:mentor - } - character = scope:commander_trait_mentor - animation = personality_honorable - } - - immediate = { - stress_impact = { - base = medium_stress_impact_gain - } - if = { - limit = { - debug_only = yes - } - custom_tooltip = study_commander_trait_current_success_chance_debug - } - else = { - custom_tooltip = study_commander_trait_current_success_chance - } - if = { - limit = { - scope:training_method = flag:mentor - } - mentor_option_seed_effect = yes - } - } - - option = { # Single Combat - name = mpo_decisions_events.0201.martial_1 - trigger = { - OR = { - scope:training_method = flag:martial - scope:mentor_option_seed ?= 1 - } - } - flavor = mpo_decisions_events.0201.martial_1_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0201.martial_1_mentor_success - FAIL_DESC = mpo_decisions_events.0201.martial_1_mentor_fail - WOUND_CHANCE = yes - } - } - else = { - custom_tooltip = mpo_decisions_events.0201.martial_1_tt - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0201.martial_1_success - FAIL_DESC = mpo_decisions_events.0201.martial_1_fail - WOUND_CHANCE = yes - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = aggressive_attacker - WEIGHT = 15 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = martial - } - modifier = { - factor = 0 - has_trait = aggressive_attacker - } - } - } - - option = { # Small-scale Battle - name = mpo_decisions_events.0201.martial_2 - trigger = { - OR = { - scope:training_method = flag:martial - scope:mentor_option_seed ?= 2 - } - } - flavor = mpo_decisions_events.0201.martial_2_flavor - custom_tooltip = mpo_decisions_events.0201.martial_2_tt - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0201.martial_2_success - FAIL_DESC = mpo_decisions_events.0201.martial_2_fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0201.martial_2_success - FAIL_DESC = mpo_decisions_events.0201.martial_2_fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = unyielding_defender - WEIGHT = 15 - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:battlefield - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = martial - } - modifier = { - factor = 1.2 - martial >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = unyielding_defender - } - } - } - - option = { # Landscape - name = mpo_decisions_events.0201.learning_1 - trigger = { - OR = { - scope:training_method = flag:learning - scope:mentor_option_seed ?= 1 - } - } - flavor = mpo_decisions_events.0201.learning_1_flavor - custom_tooltip = mpo_decisions_events.0201.learning_1_tt - if = { - limit = { - scope:training_method = flag:mentor - } - custom_tooltip = mpo_decisions_events.0201.learning_1_mentor - study_commander_trait_option_mentor = { - DUEL = no - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0201.learning_1_success - FAIL_DESC = mpo_decisions_events.0201.learning_1_fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0201.learning_1_success - FAIL_DESC = mpo_decisions_events.0201.learning_1_fail - WOUND_CHANCE = no - } - } - if = { - limit = { - can_weigh_trait_trigger = { TRAIT = open_terrain_expert } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = open_terrain_expert - WEIGHT = 15 - } - } - else_if = { - limit = { - can_weigh_trait_trigger = { TRAIT = rough_terrain_expert } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = rough_terrain_expert - WEIGHT = 15 - } - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:terrain - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = learning - } - modifier = { - factor = 1.2 - learning >= decent_skill_rating - } - modifier = { - factor = 0.5 - has_trait = rough_terrain_expert - } - modifier = { - factor = 0.5 - has_trait = open_terrain_expert - } - } - } - - option = { # Study military innovations - name = mpo_decisions_events.0201.learning_2 - trigger = { - OR = { - scope:training_method = flag:learning - scope:mentor_option_seed ?= 2 - } - } - custom_tooltip = mpo_decisions_events.0201.learning_2_tt - flavor = mpo_decisions_events.0201.learning_2_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - custom_tooltip = mpo_decisions_events.0201.learning_2_mentor - study_commander_trait_option_mentor = { - DUEL = no - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0201.learning_2_success - FAIL_DESC = mpo_decisions_events.0201.learning_2_fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0201.learning_2_success - FAIL_DESC = mpo_decisions_events.0201.learning_2_fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = military_engineer - WEIGHT = 15 - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:study - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = learning - } - modifier = { - factor = 1.2 - learning >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = military_engineer - } - } - } - - option = { # Boost morale / manipulate enemy - name = mpo_decisions_events.0201.intrigue_1 - trigger = { - OR = { - scope:training_method = flag:intrigue - scope:mentor_option_seed ?= 1 - } - } - custom_tooltip = mpo_decisions_events.0201.intrigue_1_tt - flavor = mpo_decisions_events.0201.intrigue_1_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - custom_tooltip = mpo_decisions_events.0201.intrigue_1_mentor - study_commander_trait_option_mentor = { - DUEL = no - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0201.intrigue_1_success - FAIL_DESC = mpo_decisions_events.0201.intrigue_1_fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0201.intrigue_1_success - FAIL_DESC = mpo_decisions_events.0201.intrigue_1_fail - WOUND_CHANCE = no - } - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:town - } - trait_weighting_effect = { - WEIGHTED_TRAIT = flexible_leader - WEIGHT = 15 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = intrigue - } - modifier = { - factor = 1.2 - intrigue >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = flexible_leader - } - } - } - - option = { # Negotiate with enemy - name = mpo_decisions_events.0201.intrigue_2 - trigger = { - OR = { - scope:training_method = flag:intrigue - scope:mentor_option_seed ?= 2 - } - } - custom_tooltip = mpo_decisions_events.0201.intrigue_2_tt - flavor = mpo_decisions_events.0201.intrigue_2_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = no - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0201.intrigue_2_success - FAIL_DESC = mpo_decisions_events.0201.intrigue_2_fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0201.intrigue_2_success - FAIL_DESC = mpo_decisions_events.0201.intrigue_2_fail - WOUND_CHANCE = yes - } - } - if = { - limit = { - can_weigh_trait_trigger = { TRAIT = cautious_leader } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = cautious_leader - WEIGHT = 15 - } - } - else = { - trait_weighting_effect = { - WEIGHTED_TRAIT = organizer - WEIGHT = 15 - } - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:town - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = intrigue - } - modifier = { - factor = 1.2 - intrigue >= decent_skill_rating - } - modifier = { - factor = 0.5 - has_trait = organizer - } - modifier = { - factor = 0.5 - has_trait = cautious_leader - } - } - } - - option = { # Supply Crisis - name = mpo_decisions_events.0201.none_1 - trigger = { - OR = { - scope:mentor_option_seed ?= 1 - scope:training_method = flag:none - } - } - flavor = mpo_decisions_events.0201.none_1_flavor - trait_weighting_effect = { - WEIGHTED_TRAIT = logistician - WEIGHT = 5 - } - study_commander_trait_option_no_mentor = { - DUEL = no - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0201.none_1_success - FAIL_DESC = mpo_decisions_events.0201.none_1_fail - WOUND_CHANCE = yes - } - save_scope_value_as = { - name = last_location_study_commander - value = flag:town - } - ai_chance = { - base = 50 - modifier = { - factor = 0 - has_trait = logistician - } - } - } - - option = { # Simple Training Exercise - name = mpo_decisions_events.0201.none_2 - trigger = { - OR = { - scope:mentor_option_seed ?= 2 - scope:training_method = flag:none - } - } - flavor = mpo_decisions_events.0201.none_2_flavor - add_prowess_skill = 2 - random = { - chance = 10 - if = { - limit = { - has_trait = craven - } - remove_trait = craven - } - add_trait = brave - } - } - - after = { - trigger_event = { - id = mpo_decisions_events.0202 - days = { 15 20 } - } - } -} - -mpo_decisions_events.0202 = { # Random Situation - type = character_event - title = mpo_decisions_events.0202.t - desc = { - first_valid = { - triggered_desc = { - trigger = { - scope:last_location_study_commander ?= flag:battlefield - } - desc = mpo_decisions_events.0202.desc_battlefield - } - triggered_desc = { - trigger = { - scope:last_location_study_commander ?= flag:terrain - } - desc = mpo_decisions_events.0202.desc_terrain - } - triggered_desc = { - trigger = { - scope:last_location_study_commander ?= flag:study - } - desc = mpo_decisions_events.0202.desc_study - } - triggered_desc = { - trigger = { - scope:last_location_study_commander ?= flag:town - } - desc = mpo_decisions_events.0202.desc_town - } - } - desc = mpo_decisions_events.0202.desc - first_valid = { - triggered_desc = { - trigger = { - scope:random_situation = 1 - } - desc = mpo_decisions_events.0202.desc_1_intro - } - triggered_desc = { - trigger = { - scope:random_situation = 2 - } - desc = mpo_decisions_events.0202.desc_2 - } - triggered_desc = { - trigger = { - scope:random_situation = 3 - } - desc = mpo_decisions_events.0202.desc_3 - } - } - first_valid = { - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:forest - } - desc = terrain_forest - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:taiga - } - desc = terrain_taiga - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:jungle - } - desc = terrain_jungle - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:wetlands - } - desc = terrain_wetlands - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:floodplains - } - desc = terrain_floodplains - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:desert - } - desc = terrain_desert - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:desert_mountains - } - desc = terrain_desert_mountains - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:oasis - } - desc = terrain_oasis - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:steppe - } - desc = terrain_steppe - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:farmlands - } - desc = terrain_farmlands - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:plains - } - desc = terrain_plains - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:drylands - } - desc = terrain_drylands - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:mountains - } - desc = terrain_mountains - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - scope:situation_1_terrain ?= flag:hills - } - desc = terrain_hills - } - - } - random_valid = { - triggered_desc = { - trigger = { - scope:situation_1_terrain ?= flag:taiga - } - desc = terrain_disadvantage_freeze - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:forest - scope:situation_1_terrain ?= flag:jungle - } - } - desc = terrain_disadvantage_foliage - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:forest - scope:situation_1_terrain ?= flag:jungle - scope:situation_1_terrain ?= flag:wetlands - scope:situation_1_terrain ?= flag:floodplains - } - } - desc = terrain_disadvantage_heavy_rain - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:desert - scope:situation_1_terrain ?= flag:desert_mountains - } - } - desc = terrain_disadvantage_sand - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:desert - scope:situation_1_terrain ?= flag:desert_mountains - scope:situation_1_terrain ?= flag:oasis - scope:situation_1_terrain ?= flag:steppe - scope:situation_1_terrain ?= flag:farmlands - scope:situation_1_terrain ?= flag:plains - scope:situation_1_terrain ?= flag:drylands - } - } - desc = terrain_disadvantage_heat - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:mountains - scope:situation_1_terrain ?= flag:hills - } - } - desc = terrain_disadvantage_hike - } - triggered_desc = { - trigger = { - OR = { - scope:situation_1_terrain ?= flag:steppe - scope:situation_1_terrain ?= flag:farmlands - scope:situation_1_terrain ?= flag:plains - scope:situation_1_terrain ?= flag:drylands - } - } - desc = terrain_disadvantage_endless_field - } - triggered_desc = { - trigger = { - scope:random_situation = 1 - } - desc = terrain_disadvantage_difficult - } - } - desc = mpo_decisions_events.0202.desc_outro - } - - theme = nomads - - override_background = { - trigger = { - scope:last_location_study_commander ?= flag:battlefield - } - reference = battlefield - } - - override_background = { - trigger = { - scope:last_location_study_commander ?= flag:terrain - } - reference = terrain - } - - override_background = { - trigger = { - scope:last_location_study_commander ?= flag:study - } - reference = study - } - - override_background = { - trigger = { - scope:last_location_study_commander ?= flag:town - } - reference = courtyard - } - - left_portrait = { - character = root - animation = thinking - } - - right_portrait = { - character = scope:situation_alerter - animation = storyteller - } - - immediate = { - stress_impact = { - base = miniscule_stress_impact_gain - } - if = { - limit = { - debug_only = yes - } - custom_tooltip = study_commander_trait_current_success_chance_debug - } - else = { - custom_tooltip = study_commander_trait_current_success_chance - } - if = { - limit = { - scope:training_method = flag:mentor - } - mentor_option_seed_effect = yes - } - if = { - limit = { - NOT = { scope:training_method = flag:mentor } - } - if = { - limit = { - any_courtier = { - NOT = { - this = root - } - is_available_adult = yes - } - } - random_courtier = { - limit = { - NOT = { - this = root - } - is_available_adult = yes - } - save_scope_as = situation_alerter - } - } - else = { - create_character = { - dynasty = none - template = soldier_friend_character - location = root.location - age = { 16 30 } - save_scope_as = situation_alerter - } - } - } - else = { - # For loc - scope:commander_trait_mentor = { save_scope_as = situation_alerter } - } - # Find random situation - random_list = { - 15 = { - save_scope_value_as = { # Battlefield/Terrain - name = random_situation - value = 1 - } - random_list = { - 10 = { - modifier = { - add = 5 - OR = { - location = { terrain = drylands } - location = { terrain = desert } - location = { terrain = desert_mountains } - location = { terrain = oasis } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = drylands - terrain = desert - terrain = desert_mountains - terrain = oasis - } - } - } - } - } - modifier = { - add = -100 - NOT = { can_weigh_trait_trigger = { TRAIT = desert_warrior } } - } - save_scope_value_as = { name = situation_1_terrain value = flag:desert } - } - 10 = { - modifier = { - add = 5 - OR = { - location = { terrain = jungle } - any_sub_realm_barony = { - title_province = { - terrain = jungle - } - } - } - } - modifier = { - add = -100 - NOT = { can_weigh_trait_trigger = { TRAIT = jungle_stalker } } - } - save_scope_value_as = { name = situation_1_terrain value = flag:jungle } - } - 10 = { - modifier = { - add = 5 - OR = { - location = { terrain = forest } - location = { terrain = taiga } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = forest - terrain = taiga - } - } - } - } - } - modifier = { - add = -100 - NOT = { can_weigh_trait_trigger = { TRAIT = forest_fighter } } - } - save_scope_value_as = { name = situation_1_terrain value = flag:forest } - } - 10 = { - modifier = { - add = 5 - OR = { - location = { terrain = farmlands } - location = { terrain = plains } - location = { terrain = steppe } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = farmlands - terrain = plains - terrain = steppe - } - } - } - } - } - modifier = { - add = -100 - NOT = { can_weigh_trait_trigger = { TRAIT = open_terrain_expert } } - } - save_scope_value_as = { name = situation_1_terrain value = flag:plains } - } - 10 = { - modifier = { - add = 5 - OR = { - location = { terrain = hills } - location = { terrain = mountains } - location = { terrain = wetlands } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = hills - terrain = mountains - terrain = wetlands - } - } - } - } - } - modifier = { - add = -100 - NOT = { can_weigh_trait_trigger = { TRAIT = rough_terrain_expert } } - } - save_scope_value_as = { name = situation_1_terrain value = flag:mountains } - } - 20 = { - trigger = { - current_season_trigger = { SEASON = winter } - } - modifier = { - add = -100 - NOT = { - can_weigh_trait_trigger = { TRAIT = reaver } - can_weigh_trait_trigger = { TRAIT = winter_soldier } - } - } - save_scope_value_as = { name = situation_1_terrain value = flag:winter_terrain } - } - } - } - 10 = { - save_scope_value_as = { # Siege - name = random_situation - value = 2 - } - } - 10 = { - save_scope_value_as = { # Sabotage - name = random_situation - value = 3 - } - } - } - - } - - option = { - name = mpo_decisions_events.0202.martial_situation_1 - trigger = { - scope:random_situation = 1 - } - flavor = mpo_decisions_events.0202.martial_situation_1_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - switch = { - trigger = scope:situation_1_terrain - flag:desert = { - trait_weighting_effect = { - WEIGHTED_TRAIT = desert_warrior - WEIGHT = 20 - } - } - flag:jungle = { - trait_weighting_effect = { - WEIGHTED_TRAIT = jungle_stalker - WEIGHT = 20 - } - } - flag:forest = { - trait_weighting_effect = { - WEIGHTED_TRAIT = forest_fighter - WEIGHT = 20 - } - } - flag:plains = { - trait_weighting_effect = { - WEIGHTED_TRAIT = open_terrain_expert - WEIGHT = 20 - } - } - flag:mountains = { - trait_weighting_effect = { - WEIGHTED_TRAIT = rough_terrain_expert - WEIGHT = 20 - } - } - flag:winter_terrain = { - random_list = { - 1 = { - trigger = { can_weigh_trait_trigger = { TRAIT = reaver } } - trait_weighting_effect = { - WEIGHTED_TRAIT = reaver - WEIGHT = 15 - } - } - 1 = { - trigger = { can_weigh_trait_trigger = { TRAIT = winter_soldier } } - trait_weighting_effect = { - WEIGHTED_TRAIT = winter_soldier - WEIGHT = 15 - } - } - } - } - flag:wetlands = { - trait_weighting_effect = { - WEIGHTED_TRAIT = forder - WEIGHT = 20 - } - } - flag:floodplains = { - trait_weighting_effect = { - WEIGHTED_TRAIT = forder - WEIGHT = 20 - } - } - } - ai_chance = { - base = 150 - modifier = { - factor = 1.5 - highest_skill = martial - } - modifier = { - factor = 1.2 - martial >= decent_skill_rating - } - } - } - - option = { - name = mpo_decisions_events.0202.martial_situation_2 - trigger = { - scope:random_situation = 2 - OR = { - scope:training_method = flag:martial - scope:mentor_option_seed ?= 1 - } - } - flavor = mpo_decisions_events.0202.martial_situation_2_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = aggressive_attacker - WEIGHT = 20 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = martial - } - modifier = { - factor = 1.2 - martial >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = aggressive_attacker - } - } - } - - option = { - name = mpo_decisions_events.0202.martial_situation_3 - trigger = { - scope:random_situation = 3 - OR = { - scope:training_method = flag:martial - scope:mentor_option_seed ?= 2 - } - } - flavor = mpo_decisions_events.0202.martial_situation_3_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - random = { - chance = 10 - if = { - limit = { - has_trait = craven - } - remove_trait = craven - } - add_trait = brave - } - ai_chance = { - base = 100 - } - } - - option = { - name = mpo_decisions_events.0202.learning_situation_1 - trigger = { - scope:random_situation = 1 - OR = { - scope:training_method = flag:learning - scope:mentor_option_seed ?= 2 - } - } - flavor = mpo_decisions_events.0202.learning_situation_1_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = flexible_leader - WEIGHT = 20 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = learning - } - modifier = { - factor = 1.2 - learning >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = flexible_leader - } - } - } - - option = { - name = mpo_decisions_events.0202.learning_situation_2 - trigger = { - scope:random_situation = 2 - } - flavor = mpo_decisions_events.0202.learning_situation_2_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = military_engineer - WEIGHT = 20 - } - ai_chance = { - base = 150 - modifier = { - factor = 1.5 - highest_skill = learning - } - modifier = { - factor = 1.2 - learning >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = military_engineer - } - } - } - - option = { - name = mpo_decisions_events.0202.learning_situation_3 - trigger = { - scope:random_situation = 3 - OR = { - scope:training_method = flag:learning - scope:mentor_option_seed ?= 2 - } - } - flavor = mpo_decisions_events.0202.learning_situation_3_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = reckless - WEIGHT = -5 - } - ai_chance = { - base = 75 - modifier = { - factor = 1.5 - highest_skill = learning - } - modifier = { - factor = 1.2 - learning >= decent_skill_rating - } - } - } - - option = { - name = mpo_decisions_events.0202.intrigue_situation_1 - trigger = { - scope:random_situation = 1 - OR = { - scope:training_method = flag:intrigue - scope:mentor_option_seed ?= 1 - } - } - flavor = mpo_decisions_events.0202.intrigue_situation_1_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = organizer - WEIGHT = 20 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = intrigue - } - modifier = { - factor = 1.2 - intrigue >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = organizer - } - } - } - - option = { - name = mpo_decisions_events.0202.intrigue_situation_2 - trigger = { - scope:random_situation = 2 - OR = { - scope:training_method = flag:intrigue - scope:mentor_option_seed ?= 2 - } - } - flavor = mpo_decisions_events.0202.intrigue_situation_2_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = reckless - WEIGHT = 20 - } - trait_weighting_effect = { - WEIGHTED_TRAIT = cautious_leader - WEIGHT = -5 - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - highest_skill = intrigue - } - modifier = { - factor = 1.2 - intrigue >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = reckless - } - } - } - - option = { - name = mpo_decisions_events.0202.intrigue_situation_3 - trigger = { - scope:random_situation = 3 - } - trait_weighting_effect = { - WEIGHTED_TRAIT = cautious_leader - WEIGHT = 20 - } - flavor = mpo_decisions_events.0202.intrigue_situation_3_flavor - if = { - limit = { - scope:training_method = flag:mentor - } - study_commander_trait_option_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - else = { - study_commander_trait_option_no_mentor = { - DUEL = yes - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = no - } - } - ai_chance = { - base = 150 - modifier = { - factor = 1.5 - highest_skill = intrigue - } - modifier = { - factor = 1.2 - intrigue >= decent_skill_rating - } - modifier = { - factor = 0 - has_trait = cautious_leader - } - } - } - - option = { - name = mpo_decisions_events.0202.none_situation_1 - trigger = { - scope:random_situation = 1 - } - flavor = mpo_decisions_events.0202.none_situation_1_flavor - study_commander_trait_option_no_mentor = { - DUEL = no - SKILL = martial - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = yes - } - trait_weighting_effect = { - WEIGHTED_TRAIT = unyielding_defender - WEIGHT = 5 - } - trait_weighting_effect = { - WEIGHTED_TRAIT = aggressive_attacker - WEIGHT = -5 - } - ai_chance = { - base = 75 - modifier = { - factor = 0 - has_trait = unyielding_defender - } - } - } - - option = { - name = mpo_decisions_events.0202.none_situation_2 - trigger = { - scope:random_situation = 2 - } - flavor = mpo_decisions_events.0202.none_situation_2_flavor - trait_weighting_effect = { - WEIGHTED_TRAIT = cautious_leader - WEIGHT = 20 - } - study_commander_trait_option_no_mentor = { - DUEL = no - SKILL = learning - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = yes - } - ai_chance = { - base = 75 - } - } - - option = { - name = mpo_decisions_events.0202.none_situation_3 - trigger = { - scope:random_situation = 3 - } - flavor = mpo_decisions_events.0202.none_situation_3_flavor - study_commander_trait_option_no_mentor = { - DUEL = no - SKILL = intrigue - SUCCESS_DESC = mpo_decisions_events.0202.success - FAIL_DESC = mpo_decisions_events.0202.fail - WOUND_CHANCE = yes - } - add_dread = miniscule_dread_gain - ai_chance = { - base = 75 - } - } - - after = { - trigger_event = { - id = mpo_decisions_events.0203 - days = { 3 7 } - } - if = { - limit = { - NOR = { - scope:situation_alerter = { is_courtier_of = root } - scope:commander_trait_mentor ?= scope:situation_alerter - } - } - scope:situation_alerter = { - silent_disappearance_effect = yes - } - } - } -} - -mpo_decisions_events.0203 = { # Reflection - type = character_event - title = mpo_decisions_events.0203.t - desc = { - desc = mpo_decisions_events.0203.desc_intro - first_valid = { - triggered_desc = { - trigger = { - scope:training_method = flag:mentor - } - desc = mpo_decisions_events.0203.desc_mentor - } - desc = mpo_decisions_events.0203.desc - } - } - theme = nomads - - override_background = { - reference = study - } - - left_portrait = { - character = root - animation = thinking - } - - right_portrait = { - trigger = { - scope:training_method = flag:mentor - } - character = scope:commander_trait_mentor - animation = storyteller - } - - lower_center_portrait = { - trigger = { - exists = scope:heir_person - } - character = scope:heir_person - } - - lower_right_portrait = { - trigger = { - exists = scope:love_person - } - character = scope:love_person - } - - lower_left_portrait = { - trigger = { - exists = scope:hate_person - } - character = scope:hate_person - } - - immediate = { - stress_impact = { - base = miniscule_stress_impact_gain - } - if = { - limit = { - debug_only = yes - } - custom_tooltip = study_commander_trait_current_success_chance_debug - } - else = { - custom_tooltip = study_commander_trait_current_success_chance - } - # Get some people - # Heir (family member or designated) - if = { - limit = { - any_close_family_member = { - is_player_heir_of = root - is_primary_heir_of = root - } - } - random_close_family_member = { - limit = { - OR = { - is_player_heir_of = root - is_primary_heir_of = root - } - } - save_scope_as = heir_person - } - } - else_if = { - limit = { - exists = designated_heir - } - designated_heir = { save_scope_as = heir_person } - } - # Lover / Spouse - if = { - limit = { - any_spouse = { count >= 1 } - } - ordered_spouse = { - order_by = { - value = 10 - if = { - limit = { - has_opinion_modifier = { - modifier = love_opinion - target = root - } - } - add = 25 - } - } - save_scope_as = love_person - } - } - else_if = { - limit = { - num_of_relation_lover >= 1 - } - ordered_relation = { - type = lover - order_by = "opinion(root)" - save_scope_as = love_person - } - } - # Rival(s) - if = { - limit = { - num_of_relation_rival >= 1 - } - random_relation = { - type = rival - save_scope_as = hate_person - } - } - } - - option = { # Heir (if they're your relative or designated heir) - name = mpo_decisions_events.0203.a - trigger = { - exists = scope:heir_person - } - dynasty = { - add_dynasty_prestige = miniscule_dynasty_prestige_gain - } - if = { - limit = { - OR = { - scope:heir_person = { - has_relation_friend = root - } - has_trait = family_first - } - } - stress_impact = { - base = minor_stress_impact_loss - } - } - if = { - limit = { - scope:heir_person = { - opinion = { - target = root - value >= 40 - } - } - } - scope:heir_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - scope:heir_person = { - opinion = { - target = root - value >= 15 - } - } - } - scope:heir_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - has_trait = family_first - } - opinion_modifier = { - opinion_target = scope:heir_person - multiplier = 0.5 - } - } - } - - option = { # Lover or Spouse - name = mpo_decisions_events.0203.b - trigger = { - exists = scope:love_person - } - - if = { - limit = { - scope:love_person = { - opinion = { - target = root - value >= 40 - } - } - } - scope:love_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - scope:love_person = { - opinion = { - target = root - value >= 15 - } - } - } - scope:love_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - if = { - limit = { - scope:love_person = { - OR = { - has_opinion_modifier = { - modifier = love_opinion - target = root - } - has_relation_lover = root - } - } - } - stress_impact = { - base = minor_stress_impact_loss - lustful = minor_stress_impact_loss - } - } - scope:love_person = { - add_opinion = { - target = root - modifier = love_opinion - opinion = 15 - } - } - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - has_trait = lustful - } - opinion_modifier = { - opinion_target = scope:love_person - multiplier = 0.5 - } - } - } - - option = { # Rival(s) / Enemies - name = { - text = { - triggered_desc = { - trigger = { - exists = scope:hate_person - } - desc = mpo_decisions_events.0203.c_rival - } - desc = mpo_decisions_events.0203.c - } - } - trait_weighting_effect = { - WEIGHTED_TRAIT = aggressive_attacker - WEIGHT = 20 - } - stress_impact = { - vengeful = minor_stress_impact_loss - } - if = { - limit = { - exists = scope:hate_person - scope:hate_person = { - opinion = { - target = root - value <= -40 - } - } - } - scope:hate_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - exists = scope:hate_person - scope:hate_person ?= { - opinion = { - target = root - value <= -15 - } - } - } - scope:hate_person = { save_scope_as = target_person } # For loc - custom_tooltip = mpo_decisions_events.0203.sentiment - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - else_if = { - limit = { - dread > 40 - } - custom_tooltip = mpo_decisions_events.0203.dread - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - dread > 15 - } - custom_tooltip = mpo_decisions_events.0203.dread - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - add_dread = miniscule_dread_gain - ai_chance = { - base = 100 - modifier = { - factor = 1.5 - has_trait = vengeful - } - modifier = { - factor = 1.2 - has_trait = wrathful - } - modifier = { - factor = 0 - NOT = { can_weigh_trait_trigger = { TRAIT = aggressive_attacker } } - } - } - } - - option = { # Title - name = { - text = { - triggered_desc = { - trigger = { - is_landed = no - } - desc = mpo_decisions_events.0203.d_landless - } - desc = mpo_decisions_events.0203.d - } - } - stress_impact = { - ambitious = minor_stress_impact_loss - } - if = { - limit = { - prestige_level >= 4 - } - custom_tooltip = mpo_decisions_events.0203.prestige - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - prestige_level >= 2 - } - custom_tooltip = mpo_decisions_events.0203.prestige - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - add_prestige = miniscule_prestige_gain - ai_chance = { - base = 110 - modifier = { - factor = 1.25 - has_trait = ambitious - } - } - } - - option = { # Faith - name = mpo_decisions_events.0203.e - trigger = { - NOT = { has_trait = cynical } - } - stress_impact = { - zealous = minor_stress_impact_loss - } - trait_weighting_effect = { - WEIGHTED_TRAIT = holy_warrior - WEIGHT = 15 - } - if = { - limit = { - piety_level >= 4 - } - custom_tooltip = mpo_decisions_events.0203.piety - localize_study_commander_success_chance_change = { - VALUE = 25 - } - } - else_if = { - limit = { - piety_level >= 2 - } - custom_tooltip = mpo_decisions_events.0203.piety - localize_study_commander_success_chance_change = { - VALUE = 10 - } - } - add_piety = miniscule_piety_gain - ai_chance = { - base = 110 - modifier = { - factor = 1.25 - has_trait = zealous - } - modifier = { - factor = 0 - NOT = { can_weigh_trait_trigger = { TRAIT = holy_warrior } } - } - } - } - - after = { - trigger_event = { - id = mpo_decisions_events.0204 - days = { 3 7 } - } - } -} - -mpo_decisions_events.0204 = { # Get Trait - Or not! - type = character_event - title = mpo_decisions_events.0204.t - desc = { - desc = mpo_decisions_events.0204.desc - triggered_desc = { - trigger = { - scope:training_method = flag:mentor - } - desc = mpo_decisions_events.0204.desc_mentor - } - } - theme = nomads - - left_portrait = { - character = root - animation = marshal - } - - right_portrait = { - trigger = { - scope:training_method = flag:mentor - } - character = scope:commander_trait_mentor - animation = admiration - } - - option = { # Ok - name = mpo_decisions_events.0204.a - if = { - limit = { - scope:training_method = flag:mentor - } - reverse_add_opinion = { - modifier = grateful_opinion - target = scope:commander_trait_mentor - opinion = 30 - } - } - random_list = { - 1 = { - modifier = { - always = yes - add = study_commander_trait_success_chance_value - } - custom_tooltip = mpo_decisions_events.0204.a_success - if = { - limit = { - number_of_commander_traits <= 1 # Because otherwise they hit limit and can't actually retry - } - custom_tooltip = mpo_decisions_events.0204.a_success_desc - } - hidden_effect = { - random_list = { # A little less likely to get the terrain ones cuz they're more situational - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = logistician } } - modifier = { has_variable = logistician_weight add = var:logistician_weight } - add_trait = logistician - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = military_engineer } } - modifier = { has_variable = military_engineer_weight add = var:military_engineer_weight } - add_trait = military_engineer - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = aggressive_attacker } } - modifier = { has_variable = aggressive_attacker_weight add = var:aggressive_attacker_weight } - add_trait = aggressive_attacker - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = unyielding_defender } } - modifier = { has_variable = unyielding_defender_weight add = var:unyielding_defender_weight } - add_trait = unyielding_defender - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = forder } } - modifier = { has_variable = forder_weight add = var:forder_weight } - add_trait = forder - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = flexible_leader } } - modifier = { has_variable = flexible_leader_weight add = var:flexible_leader_weight } - add_trait = flexible_leader - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = desert_warrior } } - modifier = { has_variable = desert_warrior_weight add = var:desert_warrior_weight } - add_trait = desert_warrior - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = jungle_stalker } } - modifier = { has_variable = jungle_stalker_weight add = var:jungle_stalker_weight } - add_trait = jungle_stalker - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = reaver } } - modifier = { has_variable = reaver_weight add = var:reaver_weight } - add_trait = reaver - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = reckless } } - modifier = { has_variable = reckless_weight add = var:reckless_weight } - add_trait = reckless - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = holy_warrior } } - modifier = { has_variable = holy_warrior_weight add = var:holy_warrior_weight } - modifier = { has_trait = zealous add = 5 } - modifier = { has_trait = cynical add = -5 } - add_trait = holy_warrior - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = open_terrain_expert } } - modifier = { has_variable = open_terrain_expert_weight add = var:open_terrain_expert_weight } - add_trait = open_terrain_expert - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = rough_terrain_expert } } - modifier = { has_variable = rough_terrain_expert_weight add = var:rough_terrain_expert_weight } - add_trait = rough_terrain_expert - } - 5 = { - trigger = { can_weigh_trait_trigger = { TRAIT = forest_fighter } } - modifier = { has_variable = forest_fighter_weight add = var:forest_fighter_weight } - add_trait = forest_fighter - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = cautious_leader } } - modifier = { has_variable = cautious_leader_weight add = var:cautious_leader_weight } - add_trait = cautious_leader - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = organizer } } - modifier = { has_variable = organizer_weight add = var:organizer_weight } - add_trait = organizer - } - 10 = { - trigger = { can_weigh_trait_trigger = { TRAIT = winter_soldier } } - modifier = { has_variable = winter_soldier_weight add = var:winter_soldier_weight } - add_trait = winter_soldier - } - } - } - add_character_flag = { - flag = study_commander_trait_cooldown - years = 10 - } - } - 100 = { - modifier = { - always = yes - add = study_commander_trait_success_chance_value_neg - } - custom_tooltip = mpo_decisions_events.0204.a_fail - send_interface_toast = { - title = mpo_decisions_events.0204.a_fail - type = event_toast_effect_bad - left_icon = root - custom_tooltip = mpo_decisions_events.0204.a_fail_desc - } - add_character_flag = { - flag = study_commander_trait_cooldown - years = 5 - } - } - } - } - - after = { - if = { - limit = { - NOT = { has_variable = study_commander_trait_tally } - } - set_variable = { - name = study_commander_trait_tally - value = 0 - } - } - change_variable = { - name = study_commander_trait_tally - add = 1 - } - if = { - limit = { - number_of_commander_traits = commander_trait_limit - } - remove_variable = study_commander_trait_tally - } - # Remove vars - remove_variable = winter_soldier_weight - remove_variable = organizer_weight - remove_variable = cautious_leader_weight - remove_variable = forest_fighter_weight - remove_variable = rough_terrain_expert_weight - remove_variable = open_terrain_expert_weight - remove_variable = holy_warrior_weight - remove_variable = reckless_weight - remove_variable = reaver_weight - remove_variable = jungle_stalker_weight - remove_variable = desert_warrior_weight - remove_variable = flexible_leader_weight - remove_variable = forder_weight - remove_variable = unyielding_defender_weight - remove_variable = aggressive_attacker_weight - remove_variable = military_engineer_weight - remove_variable = logistician_weight - remove_variable = study_commander_trait_success_chance_var - remove_character_flag = is_learning_commander_trait - } -} - -#Fertility Dance event -mpo_decisions_events.0300 = { - type = character_event - title = mpo_decisions_events.0300.t - desc = mpo_decisions_events.0300.desc - theme = nomads - override_background = { reference = temple } - - left_portrait = { - character = root - animation = prayer - } - - right_portrait = { - character = scope:shaman - animation = personality_zealous - } - - immediate = { - court_position:court_astrologer_court_position = { save_scope_as = shaman } - } - - # Regular option - option = { - name = mpo_decisions_events.0300.a - if = { - limit = { - scope:fertility_county = { county_fertility >= 90 } - } - scope:fertility_county = { - change_county_fertility = fertility_dance_bonus_value - } - } - else = { - scope:fertility_county = { - add_county_modifier = { - modifier = mpo_fertility_dance_county_modifier - years = 5 - } - } - } - if = { - limit = { - domicile ?= { - has_domicile_parameter = nomad_yurt_improved_fertility_dance - } - } - custom_tooltip = mpo_decisions_events.0300.a.tt.yurt - scope:fertility_county = { - every_neighboring_county = { - limit = { - OR = { - holder = root - holder = { - government_has_flag = government_is_herder - } - } - } - add_county_modifier = { - modifier = mpo_fertility_dance_county_modifier - years = 2 - } - } - } - } - - ai_chance = { - base = 50 - } - } -} - -# Pax Mongolica event -mpo_decisions_events.0400 = { - type = character_event - title = mpo_decisions_events.0400.t - desc = mpo_decisions_events.0400.desc - theme = nomads - override_background = { reference = mpo_city_steppe } - - left_portrait = { - character = root - animation = horse_archer_idle - camera = camera_event_horse_left - } - - right_portrait = { - character = scope:courtier - animation = obsequious_bow - } - - immediate = { - if = { - limit = { - any_courtier = { - is_available_ai_adult = yes - } - } - ordered_courtier = { - limit = { - is_available_ai_adult = yes - } - order_by = stewardship - save_scope_as = courtier - } - } - else = { - create_character = { - location = root.capital_province - template = merchant_template - culture = root.location.culture - faith = root.location.faith - save_scope_as = merchant - } - } - } - - # Happy day - option = { - name = mpo_decisions_events.0400.a - add_character_modifier = { - modifier = pax_mongolica_ruler_modifier # Forever - } - custom_tooltip = pax_mongolica_every_county_in_steppe_tt - every_realm_county = { - limit = { - is_landless_type_title = no - any_county_situation = { this = situation:the_great_steppe } - holder.dynasty = root.dynasty - } - random_county_province = { - limit = { has_holding = no } - set_holding_type = city_holding - } - } - culture = { - if = { - limit = { - NOT = { has_innovation = innovation_city_planning } - } - add_innovation = innovation_city_planning - } - else_if = { - limit = { - NOT = { has_innovation = innovation_development_01 } - } - add_innovation = innovation_development_01 - } - else = { - add_random_innovation = culture_group_civic - } - } - - ai_chance = { - base = 50 - } - } -} - -# Desperate Stance event -mpo_decisions_events.0500 = { - type = character_event - title = mpo_decisions_events.0500.t - desc = mpo_decisions_events.0500.desc - theme = nomads - override_background = { reference = mpo_campfire_steppe } - - left_portrait = { - character = root - animation = worry - } - - right_portrait = { - character = scope:courtier - animation = beg - } - - immediate = { - if = { - limit = { - any_spouse = { count >= 1 } - } - random_spouse = { - save_scope_as = courtier - } - } - else_if = { - limit = { - any_child = { count >= 1 } - } - random_child = { - save_scope_as = courtier - } - } - else_if = { - limit = { - any_courtier_or_guest = { count >= 1 } - } - random_courtier_or_guest = { - limit = { is_available_ai_adult = yes } - save_scope_as = courtier - } - } - else = { - create_character = { - location = root.location - dynasty = none - culture = root.location.culture - faith = root.location.faith - gender_female_chance = 50 - template = peasant_character - save_scope_as = courtier - } - } - hidden_effect = { - scope:courtier = { - change_current_weight = -50 - } - } - } - - # Let's get out of here - option = { - name = mpo_decisions_events.0500.a - mpo_decisions_events_0500_effect = yes - ai_chance = { - base = 100 - } - } -} - -# Invite Stargazer -scripted_trigger mpo_decisions_events_0070_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 mpo_decisions_events_0070_low_skill_trigger = { - mpo_decisions_events_0070_basic_requirements_trigger = yes - #Empire/kingdom - trigger_if = { - limit = { - root = { highest_held_title_tier >= tier_kingdom } - } - learning <= high_skill_rating - learning >= mediocre_skill_rating # 8 - } - #Duchy/county - trigger_else = { - learning <= decent_skill_rating - learning >= low_skill_rating # 5 - } -} - -scripted_trigger mpo_decisions_events_0070_high_skill_trigger = { - mpo_decisions_events_0070_basic_requirements_trigger = yes - #Empire/kingdom - trigger_if = { - limit = { - root = { highest_held_title_tier >= tier_kingdom } - } - learning <= extremely_high_skill_rating - learning >= decent_skill_rating # 12 - } - #Duchy/county - trigger_else = { - learning <= high_skill_rating - learning >= medium_skill_rating # 10 - } -} -mpo_decisions_events.0070 = { - type = character_event - title = mpo_decisions_events.0070.t - desc = mpo_decisions_events.0070.desc - theme = nomads - left_portrait = { - character = scope:great_court_astrologer_option - animation = holding_staff - camera = camera_event_left_forward - } - right_portrait = { - character = scope:good_court_astrologer_option - animation = personality_zealous - camera = camera_event_right_forward - } - override_background = { - reference = mpo_temple_steppe - } - trigger = { - exists = capital_province - } - immediate = { - # Good Character - if = { # check for a GOOD character in the pool - limit = { - any_pool_character = { - province = root.capital_province - mpo_decisions_events_0070_low_skill_trigger = yes - can_be_employed_as = court_astrologer_court_position - } - } - random_pool_character = { - province = root.capital_province - limit = { - mpo_decisions_events_0070_low_skill_trigger = yes - can_be_employed_as = court_astrologer_court_position - } - save_scope_as = good_court_astrologer_option - } - } - else = { # otherwise create one - create_character = { - location = root.capital_province - gender_female_chance = root_faith_clergy_gender_female_chance - template_character = root - random_traits = yes - random_traits_list = { - count = 1 - education_learning_1 = {} - education_learning_2 = {} - } - age = { 18 50 } - learning = { - min_template_medium_skill - max_template_decent_skill - } - save_scope_as = good_court_astrologer_option - } - hidden_effect = { - scope:good_court_astrologer_option = { - save_scope_as = goodly_created - } - } - } - # Great Character - if = { # check for a GREAT character in the pool - limit = { - any_pool_character = { - province = root.capital_province - mpo_decisions_events_0070_high_skill_trigger = yes - NOT = { this = scope:good_court_astrologer_option } - can_be_employed_as = court_astrologer_court_position - } - } - ordered_pool_character = { - order_by = { - # Ok, first we group by aptitude. - value = "aptitude(court_astrologer_court_position)" - # Then we want to use learning as a tiebreaker... - ## ... so make it a decimal of aptitude... - multiply = 100 - ## ... and _then_ add it. - add = learning - } - province = root.capital_province - limit = { - mpo_decisions_events_0070_high_skill_trigger = yes - NOT = { this = scope:good_court_astrologer_option } - can_be_employed_as = court_astrologer_court_position - } - save_scope_as = great_court_astrologer_option - } - } - else = { # otherwise create one - create_character = { - location = root.capital_province - gender_female_chance = root_faith_clergy_gender_female_chance - template_character = root - random_traits = yes - random_traits_list = { - count = 1 - education_learning_2 = {} - education_learning_3 = {} - education_learning_4 = {} - } - age = { 18 50 } - learning = { - min_template_high_skill - max_template_high_skill - } - save_scope_as = great_court_astrologer_option - } - hidden_effect = { - scope:great_court_astrologer_option = { - save_scope_as = greatly_created - random_list = { - 100 = {} - 20 = { - add_trait = lifestyle_herbalist - } - 10 = { - add_trait = lifestyle_mystic - } - 10 = { - add_trait = lifestyle_mystic - add_trait_xp = { - trait = lifestyle_mystic - value = 25 - } - } - 5 = { - add_trait = lifestyle_mystic - add_trait_xp = { - trait = lifestyle_mystic - value = 50 - } - } - 5 = { - add_trait = lifestyle_mystic - add_trait_xp = { - trait = lifestyle_mystic - value = 75 - } - } - } - } - } - } - } - #Great option - option = { - name = mpo_decisions_events.0070.a - custom_tooltip = mpo_decisions_events.0070.a.aptitude - pay_short_term_gold = { - target = scope:great_court_astrologer_option - gold = high_skill_court_astrologer_cost - } - add_courtier = scope:great_court_astrologer_option - if = { - limit = { - can_employ_court_position_type = court_astrologer_court_position - } - appoint_court_position = { - recipient = scope:great_court_astrologer_option - court_position = court_astrologer_court_position - } - } - else_if = { - limit = { - employs_court_position = court_astrologer_court_position - } - random_court_position_holder = { - type = court_astrologer_court_position - save_scope_as = current_court_astrologer - } - replace_court_position = { - recipient = scope:great_court_astrologer_option - holder = scope:current_court_astrologer - court_position = court_astrologer_court_position - } - } - ai_chance = { - base = 100 - modifier = { - gold < high_skill_court_astrologer_cost - } - } - } - #Good option - option = { - name = mpo_decisions_events.0070.b - custom_tooltip = mpo_decisions_events.0070.b.aptitude - pay_short_term_gold = { - target = scope:good_court_astrologer_option - gold = low_skill_court_astrologer_cost - } - add_courtier = scope:good_court_astrologer_option - if = { - limit = { - can_employ_court_position_type = court_astrologer_court_position - } - appoint_court_position = { - recipient = scope:good_court_astrologer_option - court_position = court_astrologer_court_position - } - } - else_if = { - limit = { - employs_court_position = court_astrologer_court_position - } - random_court_position_holder = { - type = court_astrologer_court_position - save_scope_as = current_court_astrologer - } - replace_court_position = { - recipient = scope:good_court_astrologer_option - holder = scope:current_court_astrologer - court_position = court_astrologer_court_position - } - } - } - #Nah - option = { - name = mpo_decisions_events.0070.c - } - after = { - if = { - limit = { - exists = scope:goodly_created - NOT = { - scope:goodly_created = { - is_courtier_of = root - } - } - } - scope:goodly_created = { - silent_disappearance_effect = yes - } - } - if = { - limit = { - exists = scope:greatly_created - NOT = { - scope:greatly_created = { - is_courtier_of = root - } - } - } - scope:greatly_created = { - silent_disappearance_effect = yes - } - } - } -} - -mpo_decisions_events.0120 = { - type = character_event - title = mpo_decisions_events.0120.t - desc = { - desc = mpo_decisions_events.0120.desc.intro - first_valid = { - triggered_desc = { - trigger = { - var:previous_holder = flag:subject - } - desc = mpo_decisions_events.0120.desc.subject - } - } - } - - theme = nomads - left_portrait = { - character = root - animation = jockey_idle - camera = camera_event_horse_left - } - right_portrait = { - character = scope:herder - animation = obsequious_bow - } - lower_right_portrait = { - trigger = { exists = scope:nomad } - character = scope:nomad - } - - immediate = { - set_variable = adventurer_to_nomad_tributary_var - location.county.holder = { save_scope_as = herder } - if = { - limit = { - scope:herder = { - is_independent_ruler = yes - is_tributary = no - } - } - set_variable = { - name = previous_holder - value = flag:independent - } - } - else = { - set_variable = { - name = previous_holder - value = flag:subject - } - if = { - limit = { exists = scope:herder.suzerain } - scope:herder.suzerain = { save_scope_as = nomad } - } - else = { - scope:herder.liege = { save_scope_as = nomad } - } - } - } - - option = { # Become Tributary - name = mpo_decisions_events.0120.a - trigger = { - var:previous_holder = flag:subject - NOT = { is_tributary_of = scope:nomad } # If you are already a Tributary of overlord - } - start_tributary_interaction_effect = { - TRIBUTARY = this - SUZERAIN = scope:nomad - } - - stress_impact = { - ambitious = major_stress_impact_gain - } - ai_chance = { - base = 100 - modifier = { - has_trait = ambitious - factor = 0 - } - ai_value_modifier = { - ai_boldness = -0.5 - } - } - } - - option = { # Refuse to become Tributary - name = mpo_decisions_events.0120.b - trigger = { - var:previous_holder = flag:subject - NOT = { is_tributary_of = scope:nomad } # If you are already a Tributary of overlord - } - add_prestige_level = -1 - scope:nomad = { - add_opinion = { - target = root - modifier = angry_opinion - opinion = -50 - } - } - - stress_impact = { - craven = major_stress_impact_gain - } - ai_chance = { - base = 100 - modifier = { - has_trait = craven - factor = 0 - } - } - } - - option = { # Wait, join our court - name = mpo_decisions_events.0120.c - trigger = { - var:previous_holder = flag:independent - } - add_courtier = scope:herder - - stress_impact = { - callous = medium_stress_impact_gain - } - ai_chance = { - base = 100 - modifier = { - has_trait = callous - factor = 0 - } - ai_value_modifier = { - ai_compassion = 1 - } - } - } - - option = { # We'll take it from here - name = mpo_decisions_events.0120.d - trigger = { - var:previous_holder = flag:independent - } - - stress_impact = { - compassionate = medium_stress_impact_gain - } - ai_chance = { - base = 100 - modifier = { - has_trait = compassionate - factor = 0 - } - ai_value_modifier = { - ai_compassion = 1 - } - } - } - - after = { - adopt_nomadic_ways_decision_event_effect = yes - remove_variable = previous_holder - remove_variable = previous_provisions - remove_variable = adventurer_to_nomad_tributary_var - } -} - -# Invite Siege Engineer -scripted_trigger invite_siege_engineer_requirements = { - can_be_employed_as = siege_engineer_court_position - 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 - "aptitude(siege_engineer_court_position)" = $APTITUDE$ -} - -scripted_effect invite_siege_engineer_find_example = { - if = { # check for a GOOD character in the pool - limit = { - any_pool_character = { - province = root.capital_province - invite_siege_engineer_requirements = { APTITUDE = $APTITUDE$ } - } - } - random_pool_character = { - province = root.capital_province - limit = { - invite_siege_engineer_requirements = { APTITUDE = $APTITUDE$ } - } - save_scope_as = $LEVEL$_siege_engineer_option - } - } - else = { # otherwise create one - random_independent_ruler = { - weight = { - modifier = { - factor = 100 - culture = { - has_same_culture_heritage = root.culture - } - } - modifier = { - factor = 100 - faith.religion = root.faith.religion - } - modifier = { - factor = 1000 - character_is_land_realm_neighbor = root.top_liege - } - } - limit = { - is_landed = yes - NOR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder - } - } - save_scope_as = target_character - } - create_character = { - location = root.capital_province - gender_female_chance = root_soldier_female_chance - template_character = root - random_traits = yes - culture = scope:target_character.culture - faith = scope:target_character.faith - random_traits_list = { - count = 1 - education_learning_$EDUCATION_1$ = {} - education_learning_$EDUCATION_2$ = {} - } - age = { 18 50 } - learning = { - min_template_$MAIN_SKILL_MIN$_skill - max_template_$MAIN_SKILL_MAX$_skill - } - martial = { - min_template_$OTHER_SKILL_MIN$_skill - max_template_$OTHER_SKILL_MAX$_skill - } - stewardship = { - min_template_$OTHER_SKILL_MIN$_skill - max_template_$OTHER_SKILL_MAX$_skill - } - save_scope_as = $LEVEL$_siege_engineer_option - after_creation = { - save_scope_as = $LEVEL$ly_created - add_trait = military_engineer - add_trait_xp = { - trait = military_engineer - value = { - integer_range = { - min = $TRAIT_XP_MIN$ - max = $TRAIT_XP_MAX$ - } - } - } - } - } - } -} - -scripted_effect invite_siege_engineer_appointment = { - pay_short_term_gold = { - target = scope:$SCOPE$_siege_engineer_option - gold = $LEVEL$_skill_siege_engineer_cost - } - add_courtier = scope:$SCOPE$_siege_engineer_option - if = { - limit = { - NOT = { employs_court_position = siege_engineer_court_position } - } - appoint_court_position = { - recipient = scope:$SCOPE$_siege_engineer_option - court_position = siege_engineer_court_position - } - } - else_if = { - limit = { - employs_court_position = siege_engineer_court_position - } - random_court_position_holder = { - type = siege_engineer_court_position - save_scope_as = current_siege_engineer - } - replace_court_position = { - recipient = scope:$SCOPE$_siege_engineer_option - holder = scope:current_siege_engineer - court_position = siege_engineer_court_position - } - } - hidden_effect = { - scope:$SCOPE$_siege_engineer_option = { - add_opinion = { - modifier = grateful_opinion - target = root - opinion = 25 - } - } - } -} - -mpo_decisions_events.0080 = { - type = character_event - title = mpo_decisions_events.0080.t - desc = mpo_decisions_events.0080.desc - theme = nomads - - left_portrait = { - character = scope:great_siege_engineer_option - animation = thinking - } - - right_portrait = { - character = scope:good_siege_engineer_option - animation = storyteller - } - - override_background = { - reference = mpo_camp_steppe - } - - immediate = { - # Good Character - invite_siege_engineer_find_example = { - APTITUDE = 4 - LEVEL = good - EDUCATION_1 = 1 - EDUCATION_2 = 2 - MAIN_SKILL_MIN = average - MAIN_SKILL_MAX = medium - OTHER_SKILL_MIN = low - OTHER_SKILL_MAX = low - TRAIT_XP_MIN = 5 - TRAIT_XP_MAX = 25 - } - # Great Character - invite_siege_engineer_find_example = { - APTITUDE = 5 - LEVEL = great - EDUCATION_1 = 3 - EDUCATION_2 = 4 - MAIN_SKILL_MIN = decent - MAIN_SKILL_MAX = decent - OTHER_SKILL_MIN = average - OTHER_SKILL_MAX = average - TRAIT_XP_MIN = 33 - TRAIT_XP_MAX = 66 - } - - if = { - limit = { - exists = scope:good_siege_engineer_option - exists = scope:great_siege_engineer_option - "scope:good_siege_engineer_option.aptitude(siege_engineer_court_position)" > "scope:great_siege_engineer_option.aptitude(siege_engineer_court_position)" - } - scope:great_siege_engineer_option = { save_scope_as = temp_scope } - scope:good_siege_engineer_option = { save_scope_as = great_siege_engineer_option } - scope:temp_scope = { save_scope_as = good_siege_engineer_option } - } - } - #Great option - option = { - name = mpo_decisions_events.0080.a - custom_tooltip = mpo_decisions_events.0080.a.aptitude - invite_siege_engineer_appointment = { - SCOPE = great - LEVEL = high - } - ai_chance = { - base = 100 - modifier = { - gold < high_skill_court_astrologer_cost - } - } - } - #Good option - option = { - name = mpo_decisions_events.0080.b - custom_tooltip = mpo_decisions_events.0080.b.aptitude - invite_siege_engineer_appointment = { - SCOPE = good - LEVEL = low - } - } - #Nah - option = { - name = mpo_decisions_events.0080.c - } - after = { - if = { - limit = { - exists = scope:goodly_created - NOT = { - scope:goodly_created = { - is_courtier_of = root - } - } - } - scope:goodly_created = { - silent_disappearance_effect = yes - } - } - if = { - limit = { - exists = scope:greatly_created - NOT = { - scope:greatly_created = { - is_courtier_of = root - } - } - } - scope:greatly_created = { - silent_disappearance_effect = yes - } - } - } -} - -# Invite Foreign Emissary -scripted_trigger invite_foreign_emissary_requirements = { - can_be_employed_as = foreign_emissary_court_position - 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 - "aptitude(foreign_emissary_court_position)" = $APTITUDE$ -} - -scripted_effect invite_foreign_emissary_find_example = { - if = { # check for a GOOD character in the pool - limit = { - any_pool_character = { - province = root.capital_province - invite_foreign_emissary_requirements = { APTITUDE = $APTITUDE$ } - } - } - random_pool_character = { - province = root.capital_province - limit = { - invite_foreign_emissary_requirements = { APTITUDE = $APTITUDE$ } - } - save_scope_as = $LEVEL$_foreign_emissary_option - } - } - else = { # otherwise create one - random_independent_ruler = { - weight = { - modifier = { - factor = 1000 - government_has_flag = government_is_republic - } - } - limit = { - is_landed = yes - NOR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder - } - } - save_scope_as = target_character - } - create_character = { - location = root.capital_province - gender_female_chance = root_soldier_female_chance - template_character = root - random_traits = yes - culture = scope:target_character.culture - faith = scope:target_character.faith - random_traits_list = { - count = 1 - education_diplomacy_$EDUCATION_1$ = {} - education_diplomacy_$EDUCATION_2$ = {} - } - random_traits_list = { - count = 1 - diplomat = {} - lifestyle_reveler = {} - } - age = { 18 50 } - diplomacy = { - min_template_$MAIN_SKILL_MIN$_skill - max_template_$MAIN_SKILL_MAX$_skill - } - stewardship = { - min_template_$OTHER_SKILL_MIN$_skill - max_template_$OTHER_SKILL_MAX$_skill - } - save_scope_as = $LEVEL$_foreign_emissary_option - after_creation = { - save_scope_as = $LEVEL$ly_created - } - } - } -} - -scripted_effect invite_foreign_emissary_appointment = { - pay_short_term_gold = { - target = scope:$SCOPE$_foreign_emissary_option - gold = $LEVEL$_skill_foreign_emissary_cost - } - add_courtier = scope:$SCOPE$_foreign_emissary_option - if = { - limit = { - NOT = { employs_court_position = foreign_emissary_court_position } - } - appoint_court_position = { - recipient = scope:$SCOPE$_foreign_emissary_option - court_position = foreign_emissary_court_position - } - } - else_if = { - limit = { - employs_court_position = foreign_emissary_court_position - } - random_court_position_holder = { - type = foreign_emissary_court_position - save_scope_as = current_foreign_emissary - } - replace_court_position = { - recipient = scope:$SCOPE$_foreign_emissary_option - holder = scope:current_foreign_emissary - court_position = foreign_emissary_court_position - } - } - hidden_effect = { - scope:$SCOPE$_foreign_emissary_option = { - add_opinion = { - modifier = grateful_opinion - target = root - opinion = 25 - } - } - } -} - -mpo_decisions_events.0090 = { - type = character_event - title = mpo_decisions_events.0090.t - desc = mpo_decisions_events.0090.desc - theme = nomads - - left_portrait = { - character = scope:great_foreign_emissary_option - animation = debating - } - - right_portrait = { - character = scope:good_foreign_emissary_option - animation = thinking - } - - override_background = { - reference = mpo_tent_interior_mongol - } - - immediate = { - ordered_courtier_or_guest = { - order_by = diplomacy - limit = { - age >= 10 - } - save_scope_as = courtier - } - # Good Character - invite_foreign_emissary_find_example = { - APTITUDE = 4 - LEVEL = good - EDUCATION_1 = 1 - EDUCATION_2 = 2 - MAIN_SKILL_MIN = average - MAIN_SKILL_MAX = medium - OTHER_SKILL_MIN = low - OTHER_SKILL_MAX = low - } - # Great Character - invite_foreign_emissary_find_example = { - APTITUDE = 5 - LEVEL = great - EDUCATION_1 = 3 - EDUCATION_2 = 4 - MAIN_SKILL_MIN = high - MAIN_SKILL_MAX = high - OTHER_SKILL_MIN = medium - OTHER_SKILL_MAX = medium - } - - if = { - limit = { - exists = scope:good_foreign_emissary_option - exists = scope:great_foreign_emissary_option - "scope:good_foreign_emissary_option.aptitude(foreign_emissary_court_position)" > "scope:great_foreign_emissary_option.aptitude(foreign_emissary_court_position)" - } - scope:great_foreign_emissary_option = { save_scope_as = temp_scope } - scope:good_foreign_emissary_option = { save_scope_as = great_foreign_emissary_option } - scope:temp_scope = { save_scope_as = good_foreign_emissary_option } - } - } - #Great option - option = { - name = mpo_decisions_events.0090.a - custom_tooltip = mpo_decisions_events.0090.a.aptitude - invite_foreign_emissary_appointment = { - SCOPE = great - LEVEL = high - } - ai_chance = { - base = 100 - modifier = { - gold < high_skill_court_astrologer_cost - } - } - } - #Good option - option = { - name = mpo_decisions_events.0090.b - custom_tooltip = mpo_decisions_events.0090.b.aptitude - invite_foreign_emissary_appointment = { - SCOPE = good - LEVEL = low - } - } - #Nah - option = { - name = mpo_decisions_events.0090.c - } - after = { - if = { - limit = { - exists = scope:goodly_created - NOT = { - scope:goodly_created = { - is_courtier_of = root - } - } - } - scope:goodly_created = { - silent_disappearance_effect = yes - } - } - if = { - limit = { - exists = scope:greatly_created - NOT = { - scope:greatly_created = { - is_courtier_of = root - } - } - } - scope:greatly_created = { - silent_disappearance_effect = yes - } - } - } -} diff --git a/events/dlc/mpo/mpo_events_ariana.txt b/events/dlc/mpo/mpo_events_ariana.txt deleted file mode 100644 index 579f9add..00000000 --- a/events/dlc/mpo/mpo_events_ariana.txt +++ /dev/null @@ -1,4812 +0,0 @@ -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/events/dlc/mpo/mpo_events_tova.txt b/events/dlc/mpo/mpo_events_tova.txt deleted file mode 100644 index b0bbf73a..00000000 --- a/events/dlc/mpo/mpo_events_tova.txt +++ /dev/null @@ -1,1870 +0,0 @@ -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/events/dlc/mpo/mpo_flavor_events_settled.txt b/events/dlc/mpo/mpo_flavor_events_settled.txt deleted file mode 100644 index ce2551ef..00000000 --- a/events/dlc/mpo/mpo_flavor_events_settled.txt +++ /dev/null @@ -1,453 +0,0 @@ -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/events/dlc/mpo/mpo_jamukha_flavor_events.txt b/events/dlc/mpo/mpo_jamukha_flavor_events.txt deleted file mode 100644 index a38a4e50..00000000 --- a/events/dlc/mpo/mpo_jamukha_flavor_events.txt +++ /dev/null @@ -1,450 +0,0 @@ -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/events/dlc/mpo/mpo_migration_events.txt b/events/dlc/mpo/mpo_migration_events.txt deleted file mode 100644 index 200dcf55..00000000 --- a/events/dlc/mpo/mpo_migration_events.txt +++ /dev/null @@ -1,4573 +0,0 @@ -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/events/dlc/mpo/mpo_migration_travel_events.txt b/events/dlc/mpo/mpo_migration_travel_events.txt index 2e174e3e..772a7b82 100644 --- a/events/dlc/mpo/mpo_migration_travel_events.txt +++ b/events/dlc/mpo/mpo_migration_travel_events.txt @@ -916,6 +916,14 @@ mpo_migration_travel_events.0050 = { random_courtier = { limit = { is_eligible_courtier_0050 = yes + save_temporary_scope_as = courtier_temp_im + location = { + any_character_in_location = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_temp_im } + is_similar_age_trigger = { CHARACTER = scope:courtier_temp_im } + } + } } weight = { base = 10 diff --git a/events/dlc/mpo/mpo_nomad_events_1.txt b/events/dlc/mpo/mpo_nomad_events_1.txt deleted file mode 100644 index 6770b7a0..00000000 --- a/events/dlc/mpo/mpo_nomad_events_1.txt +++ /dev/null @@ -1,8980 +0,0 @@ -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/events/dlc/mpo/mpo_nomads_flavour_events.txt b/events/dlc/mpo/mpo_nomads_flavour_events.txt deleted file mode 100644 index d51abc96..00000000 --- a/events/dlc/mpo/mpo_nomads_flavour_events.txt +++ /dev/null @@ -1,5743 +0,0 @@ -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/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt b/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt deleted file mode 100644 index 5b57020b..00000000 --- a/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt +++ /dev/null @@ -1,835 +0,0 @@ -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/events/error_suppression_events.txt b/events/error_suppression_events.txt deleted file mode 100644 index 4b77f69d..00000000 --- a/events/error_suppression_events.txt +++ /dev/null @@ -1,198 +0,0 @@ -#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/events/game_rule_events.txt b/events/game_rule_events.txt deleted file mode 100644 index 2e52513d..00000000 --- a/events/game_rule_events.txt +++ /dev/null @@ -1,7419 +0,0 @@ -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_theocracy - has_character_flag = do_not_generate_starting_family - } - } - - - 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/events/global_religion_events.txt b/events/global_religion_events.txt deleted file mode 100644 index 1a786bc9..00000000 --- a/events/global_religion_events.txt +++ /dev/null @@ -1,1328 +0,0 @@ -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/events/harm_events.txt b/events/harm_events.txt deleted file mode 100644 index 48a06d7a..00000000 --- a/events/harm_events.txt +++ /dev/null @@ -1,9668 +0,0 @@ -@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/events/health_events.txt b/events/health_events.txt deleted file mode 100644 index 400a9af7..00000000 --- a/events/health_events.txt +++ /dev/null @@ -1,12008 +0,0 @@ -#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/events/jester_stress_relief_events.txt b/events/jester_stress_relief_events.txt deleted file mode 100644 index 4033c49e..00000000 --- a/events/jester_stress_relief_events.txt +++ /dev/null @@ -1,1982 +0,0 @@ -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/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt b/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt index 12b0f47e..5204fce8 100644 --- a/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt +++ b/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt @@ -998,6 +998,7 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed sender = scope:physician immediate = { + save_scope_as = liege # for salary tooltips random_pool_character = { province = root.capital_province limit = { learning >= medium_skill_rating } @@ -1011,6 +1012,7 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed } } save_scope_as = physician + save_scope_as = candidate # for aptitude tooltips } if = { limit = { NOT = { exists = scope:physician } } @@ -1020,12 +1022,16 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed location = root.capital_province save_scope_as = physician } + scope:physician = { + save_scope_as = candidate # for aptitude tooltips + } } } #Yes I want your services option = { name = learning_medicine.2021.a + custom_tooltip = learning_medicine.2021.a.tt pay_treasury_or_gold = { value = high_skill_court_physician_cost target = scope:physician @@ -1034,11 +1040,22 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed EMPLOYER = root PHYSICIAN = scope:physician } - custom_tooltip = learning_medicine.2021.a.tt + custom_tooltip = health.3001.a.tt + custom_tooltip = court_physician_aptitude_tooltip trigger_event = { id = learning_medicine.2022 days = { 7 10 } } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.25 + } + modifier = { + add = age + } + } } #Maybe there is something else you can help me with @@ -1053,12 +1070,28 @@ learning_medicine.2021 = { #by Mathilda Bjarnehed EMPLOYER = root PHYSICIAN = scope:physician } + custom_tooltip = health.3001.a.tt + custom_tooltip = court_physician_aptitude_tooltip + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.5 + } + } } #Nah thanks option = { name = learning_medicine.2021.c add_prestige = miniscule_prestige_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = -0.25 + } + } } } diff --git a/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt b/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt deleted file mode 100644 index 094403ab..00000000 --- a/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt +++ /dev/null @@ -1,4559 +0,0 @@ -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/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt b/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt index 5df5a5b8..dd0ec97e 100644 --- a/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt +++ b/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt @@ -740,7 +740,7 @@ learning_theology.3002 = { 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:christianity_religion religion = religion:islam_religion } } diff --git a/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt b/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt deleted file mode 100644 index b8bb32cd..00000000 --- a/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt +++ /dev/null @@ -1,884 +0,0 @@ -#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/events/lifestyles/warfare_lifestyle/martial_authority_events.txt b/events/lifestyles/warfare_lifestyle/martial_authority_events.txt deleted file mode 100644 index 95afacef..00000000 --- a/events/lifestyles/warfare_lifestyle/martial_authority_events.txt +++ /dev/null @@ -1,2590 +0,0 @@ -#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/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt b/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt deleted file mode 100644 index 686d70f5..00000000 --- a/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt +++ /dev/null @@ -1,697 +0,0 @@ -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/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt b/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt deleted file mode 100644 index 6a9b71a8..00000000 --- a/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt +++ /dev/null @@ -1,4562 +0,0 @@ -#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/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt b/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt deleted file mode 100644 index 370a3da4..00000000 --- a/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt +++ /dev/null @@ -1,3768 +0,0 @@ -#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/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt b/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt deleted file mode 100644 index a18a7c2f..00000000 --- a/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt +++ /dev/null @@ -1,729 +0,0 @@ -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/events/pregnancy_events.txt b/events/pregnancy_events.txt deleted file mode 100644 index 4467bb41..00000000 --- a/events/pregnancy_events.txt +++ /dev/null @@ -1,1735 +0,0 @@ -#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/events/realm_maintenance_events.txt b/events/realm_maintenance_events.txt deleted file mode 100644 index 870a4d05..00000000 --- a/events/realm_maintenance_events.txt +++ /dev/null @@ -1,423 +0,0 @@ -#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/events/religion_events/faith_conversion_events.txt b/events/religion_events/faith_conversion_events.txt deleted file mode 100644 index 1e664db2..00000000 --- a/events/religion_events/faith_conversion_events.txt +++ /dev/null @@ -1,469 +0,0 @@ -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/events/religion_events/faith_creation_events.txt b/events/religion_events/faith_creation_events.txt deleted file mode 100644 index c365d379..00000000 --- a/events/religion_events/faith_creation_events.txt +++ /dev/null @@ -1,668 +0,0 @@ -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/events/religion_events/heresy_events.txt b/events/religion_events/heresy_events.txt deleted file mode 100644 index 34b1edce..00000000 --- a/events/religion_events/heresy_events.txt +++ /dev/null @@ -1,1355 +0,0 @@ -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/events/religion_events/holy_order_events.txt b/events/religion_events/holy_order_events.txt deleted file mode 100644 index c44bbb9d..00000000 --- a/events/religion_events/holy_order_events.txt +++ /dev/null @@ -1,1865 +0,0 @@ - -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/events/religion_events/local_shrine_events.txt b/events/religion_events/local_shrine_events.txt deleted file mode 100644 index 90b61da0..00000000 --- a/events/religion_events/local_shrine_events.txt +++ /dev/null @@ -1,795 +0,0 @@ -######################## -# 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/events/religion_events/religious_decision_events.txt b/events/religion_events/religious_decision_events.txt deleted file mode 100644 index 9ebab0f0..00000000 --- a/events/religion_events/religious_decision_events.txt +++ /dev/null @@ -1,3028 +0,0 @@ -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/events/religion_events/religious_interaction_events.txt b/events/religion_events/religious_interaction_events.txt deleted file mode 100644 index 04af3450..00000000 --- a/events/religion_events/religious_interaction_events.txt +++ /dev/null @@ -1,2824 +0,0 @@ -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/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt b/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt index 3a3175a7..dd1a7c0b 100644 --- a/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt +++ b/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt @@ -353,9 +353,8 @@ court_ongoing.0502 = { #by Mathilda Bjarnehed } trigger = { - exists = scope:scheme - scope:scheme = { - scheme_type = courting + any_targeting_scheme = { + scope:scheme ?= this } } diff --git a/events/scheme_events/governor_contract_events.txt b/events/scheme_events/governor_contract_events.txt index 65bc4398..ceee7352 100644 --- a/events/scheme_events/governor_contract_events.txt +++ b/events/scheme_events/governor_contract_events.txt @@ -893,6 +893,75 @@ governor_contract_event.1013 = { hungry_times = { scope:contract_taker = { trigger_event = governor_contract_event.2111 } } + jail_inspection = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0001 } + } + potent_physick = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0002 } + } + irregular_accounting = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0003 } + } + salt_smugglers = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0004 } + } + hoarding_grain = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0005 } + } + hoarding_grain = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0005 } + } + doddering_magistrate = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0006 } + } + burdensome_taxes = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0007 } + } + unsafe_highways = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0008 } + } + dam_in_disrepair = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0009 } + } + lines_in_the_soil = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0010 } + } + fraud_in_broad_daylight = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0011 } + } + crumbling_bridge = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0012 } + } + confusion_of_tongues = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0013 } + } + seditious_storytelling = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0014 } + } + quaking_in_panic = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0015 } + } + monopoly_in_the_marketplace = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0033 } + } + contested_inheritance = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.0035 } + } + unsanctioned_deity = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0051 } + } + escaped_justice = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0056 } + } + forced_conscription = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0061 } + } + combat_train_monks = { + scope:contract_taker = { trigger_event = governor_contract_events_tova.0066 } + } + missing_equipment = { + scope:contract_taker = { trigger_event = tgp_governor_contract_event.2001 } + } } } } diff --git a/events/siege_events.txt b/events/siege_events.txt deleted file mode 100644 index 8b1c74ee..00000000 --- a/events/siege_events.txt +++ /dev/null @@ -1,1368 +0,0 @@ -#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/events/single_combat_events.txt b/events/single_combat_events.txt deleted file mode 100644 index 8a8a9739..00000000 --- a/events/single_combat_events.txt +++ /dev/null @@ -1,11831 +0,0 @@ -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/events/situation_events/mpo_the_great_steppe_events.txt b/events/situation_events/mpo_the_great_steppe_events.txt deleted file mode 100644 index c863a427..00000000 --- a/events/situation_events/mpo_the_great_steppe_events.txt +++ /dev/null @@ -1,425 +0,0 @@ -namespace = mpo_the_great_steppe - -################################### -# The Great Steppe Intro Event -# 0001 -################################### -mpo_the_great_steppe.0001 = { # Fullscreen Intro Event - type = character_event - window = fullscreen_event - title = mpo_the_great_steppe.0001.t - desc = mpo_the_great_steppe.0001.desc - theme = realm - trigger = { # we need to prevent this from firing for all players when a new player joins in MP - is_ai = no - NOT = { has_variable = mpo_the_great_steppe_events_0001_var } - } - hidden = yes - override_background = { reference = mpo_fullscreen_the_great_steppe } - override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } - - cooldown = { years = 100 } - - widgets = { - widget = { - gui = "event_window_widget_situation_info_the_great_steppe" - container = "dynamic_content_widget" - controller = situation_info - setup_scope = { situation:the_great_steppe = { save_scope_as = situation } } - } - } - immediate = { - play_music_cue = mx_cue_conquest_of_the_golden_horde - set_variable = mpo_the_great_steppe_events_0001_var - save_scope_value_as = { - name = start - value = yes - } - } - option = { - name = mpo_the_great_steppe.0001.a - clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" - } -} - -# Start Phase -mpo_the_great_steppe.0002 = { - type = character_event - title = mpo_the_great_steppe.0002.t - hidden = yes - desc = { - first_valid = { - triggered_desc = { - trigger = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.desc.cold_zud - } - 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.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.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.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.desc.white_zud - } - triggered_desc = { - trigger = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = root.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.desc.warm_nights - } - triggered_desc = { - trigger = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = root.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.desc.abundant_grazing - } - 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.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.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.capital_county - } - } - } - desc = mpo_the_great_steppe.0002.desc.sky_blessing - } - } - first_valid = { - triggered_desc = { - trigger = { - OR = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - } - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - } - desc = mpo_the_great_steppe.0002.desc.obedience - } - } - } - theme = nomads - override_background = { - trigger = { - has_zud_season_nomadic_capital_root_trigger = yes - } - reference = bp3_steppe_winter - } - override_background = { - trigger = { - has_zud_season_nomadic_capital_root_trigger = no - } - reference = wilderness - } - left_portrait = { - character = root - triggered_animation = { - trigger = { - has_bad_season_nomadic_capital_root_trigger = yes - } - animation = horse_exhausted - } - animation = horse_surveying - camera = camera_event_horse_left - } - lower_right_portrait = { - trigger = { exists = scope:person } - character = scope:person - } - - 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.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_havsarsan_zud_season - situation_sub_region_has_county = root.location.county - } - } - } - gui = "event_window_widget_vfx_snowstorm" - container = "foreground_shader_vfx_container" - } - } - - override_effect_2d = { - reference = fog - 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 - } - } - } - } - override_effect_2d = { - reference = rain - 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 - } - } - } - } - override_effect_2d = { - reference = legend_glow - 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 - } - } - } - } - - trigger = { - NOT = { has_variable = steppe_game_start_var } - } - - immediate = { - custom_tooltip = mpo_the_great_steppe.0002.tt - play_music_cue = mx_cue_conquest_of_the_golden_horde - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = root.location.county - } - } - } - if = { - limit = { - any_spouse = { - } - } - random_spouse = { - save_scope_as = person - } - } - else_if = { - limit = { - any_courtier_or_guest = { - } - } - random_courtier_or_guest = { - save_scope_as = person - } - } - else = { - hidden_effect = { - create_character = { - template = pool_repopulate_local_flavor - dynasty = none - location = root.location - save_scope_as = person - } - } - } - } - } - - option = { - name = mpo_the_great_steppe.0002.a - if = { - limit = { has_perk = souvenirs_aplenty_perk } - add_internal_flag = special - custom_tooltip = mpo_the_great_steppe_0002_souvenirs_aplenty_tt - every_held_county = { - limit = { - uses_county_fertility = yes - is_landless_type_title = no - } - add_county_modifier = { - modifier = souvenirs_aplenty_perk_county_modifier - years = 10 - } - } - } - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { is_landless_type_title = no } - change_county_control = -25 - } - domicile = { - change_herd = { - value = root.domicile.herd - multiply = -0.2 - } - } - } - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { is_landless_type_title = no } - change_county_control = -25 - } - domicile = { - change_herd = { - value = root.domicile.herd - multiply = -0.1 - } - } - } - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { is_landless_type_title = no } - change_county_control = -10 - } - } - - ai_chance = { - base = 100 - } - } -} - -mpo_the_great_steppe.0003 = { - type = character_event - hidden = yes - - immediate = { - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { - is_landless_type_title = no - uses_county_fertility = yes - } - change_county_fertility = -50 - } - } - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { - is_landless_type_title = no - uses_county_fertility = yes - } - change_county_fertility = -25 - } - } - if = { - limit = { - any_character_situation = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = root.capital_county - } - } - } - every_held_county = { - limit = { - is_landless_type_title = no - uses_county_fertility = yes - } - change_county_fertility = -10 - } - } - } -} \ No newline at end of file diff --git a/events/test_events/debug.txt b/events/test_events/debug.txt index 6b5c6134..ca84b172 100644 --- a/events/test_events/debug.txt +++ b/events/test_events/debug.txt @@ -3440,3 +3440,682 @@ debug.9622 = { } } } + + +# event hotkeys +debug.1000 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + option = { + name = "debug_option_1" + } + option = { + name = "debug_option_2" + reason = scholar + } + option = { + name = "debug_option_3" + add_stress = -10 + } + option = { + name = "debug_option_4" + add_internal_flag = dangerous + reason = scholar + } + option = { + name = "debug_option_5" + } +} + +# max 9 options will have shortcuts +debug.1001 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + option = { + name = "debug_option_1" + send_interface_message = { + title = "debug_option_1" + } + } + option = { + name = "debug_option_2" + send_interface_message = { + title = "debug_option_2" + } + add_internal_flag = dangerous + } + option = { + name = "debug_option_3" + send_interface_message = { + title = "debug_option_3" + } + } + option = { + name = "debug_option_4" + send_interface_message = { + title = "debug_option_4" + } + } + option = { + name = "debug_option_5" + send_interface_message = { + title = "debug_option_5" + } + } + option = { + name = "debug_option_6" + send_interface_message = { + title = "debug_option_6" + } + } + option = { + name = "debug_option_7" + send_interface_message = { + title = "debug_option_7" + } + } + option = { + name = "debug_option_8" + send_interface_message = { + title = "debug_option_8" + } + } + option = { + name = "debug_option_9" + send_interface_message = { + title = "debug_option_9" + } + } +} + +# verify that shortcuts select the right button +debug.1002 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + option = { + name = "debug_option_1" + send_interface_message = { + title = "debug_option_1" + } + } + option = { + name = "debug_option_2" + send_interface_message = { + title = "debug_option_2" + } + } + option = { + name = "debug_option_3" + send_interface_message = { + title = "debug_option_3" + } + } + option = { + name = "debug_option_4" + send_interface_message = { + title = "debug_option_4" + } + } + option = { + name = "debug_option_5" + send_interface_message = { + title = "debug_option_5" + } + } +} + +# big event +debug.1003 = { + type = character_event + title = LOREM_IPSUM_TITLE + window = big_event_window + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + option = { + name = "debug_option_1" + } + option = { + name = "debug_option_2" + reason = scholar + } + option = { + name = "debug_option_3" + add_stress = -10 + } + option = { + name = "debug_option_4" + add_internal_flag = dangerous + reason = scholar + } + option = { + name = "debug_option_5" + } +} + +debug.1004 = { + type = letter_event + opening = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + + sender = root + orphan = yes + + option = { + name = "debug_option_1" + } +} + +debug.1005 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + option = { + name = "debug_option_1" + } +} + +debug.1006 = { + type = character_event + window = fullscreen_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = legend + orphan = yes + + option = { + name = "debug_option_1" + } +} + +### for nameplates testing + +# two rulers +debug.1100 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + random_ruler = { save_scope_as = portrait_2 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one ruler +debug.1101 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# you and another ruler +debug.1102 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = root + right_portrait = scope:portrait_2 + + immediate = { + random_ruler = { save_scope_as = portrait_2 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# you and a random +debug.1103 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = root + right_portrait = scope:portrait_2 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_2 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# you, another ruler, and middle artifact +debug.1104 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + artifact = { + target = scope:portrait_3 + position = lower_center_portrait + } + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + random_ruler = { save_scope_as = portrait_2 } + random_artifact = { + save_scope_as = portrait_3 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# two vassals +debug.1105 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + + immediate = { + random_vassal = { save_scope_as = portrait_1 } + random_vassal = { save_scope_as = portrait_2 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# ruler and center +debug.1106 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + lower_center_portrait = scope:portrait_2 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + random_ruler = { save_scope_as = portrait_2 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one ruler +debug.1107 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + right_portrait = scope:portrait_1 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# fire all previous +debug.1109 = { + hidden = yes + orphan = yes + + immediate = { + trigger_event = debug.1100 + trigger_event = debug.1101 + trigger_event = debug.1102 + trigger_event = debug.1103 + trigger_event = debug.1104 + trigger_event = debug.1105 + trigger_event = debug.1106 + trigger_event = debug.1107 + } +} + +### + +# two randoms +debug.1110 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + random_living_character = { + limit = { + this != scope:portrait_1 + is_ruler = no + } + save_scope_as = portrait_2 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one random +debug.1111 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# two randoms and a middle portrait +debug.1112 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + lower_center_portrait = scope:portrait_3 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + random_living_character = { + limit = { + this != scope:portrait_1 + is_ruler = no + } + save_scope_as = portrait_2 + } + random_living_character = { + limit = { + this != scope:portrait_1 + this != scope:portrait_2 + is_ruler = no + } + save_scope_as = portrait_3 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# two house members with an artifact +debug.1113 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + + artifact = { + target = scope:portrait_3 + position = lower_center_portrait + } + + immediate = { + random_living_character = { + limit = { + house = root.house + is_ruler = no + } + save_scope_as = portrait_1 + } + random_living_character = { + limit = { + this != scope:portrait_1 + house = root.house + is_ruler = no + } + save_scope_as = portrait_2 + } + random_artifact = { + save_scope_as = portrait_3 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one right random +debug.1114 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + right_portrait = scope:portrait_1 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one random and a center portrait +debug.1115 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + lower_left_portrait = scope:portrait_2 + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + random_living_character = { + limit = { + this != scope:portrait_1 + is_ruler = no + } + save_scope_as = portrait_2 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# one random and a center artifact +debug.1116 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + + artifact = { + target = scope:portrait_2 + position = lower_center_portrait + } + + immediate = { + random_living_character = { + limit = { + is_ruler = no + } + save_scope_as = portrait_1 + } + random_artifact = { + save_scope_as = portrait_2 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# ruler and random +debug.1117 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + + left_portrait = scope:portrait_1 + right_portrait = scope:portrait_2 + + immediate = { + random_ruler = { + limit = { + this != root + } + save_scope_as = portrait_1 + } + random_living_character = { + limit = { + this != scope:portrait_1 + house = root.house + is_ruler = no + } + save_scope_as = portrait_2 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# characters with hidden info +debug.1118 = { + type = character_event + title = yearly.7051.t + desc = yearly.7051.desc + theme = mental_health + override_background = { reference = battlefield } + override_effect_2d = { reference = fog } + + left_portrait = { + character = scope:portrait_1 + hide_info = yes + } + right_portrait = { + character = scope:portrait_2 + hide_info = yes + } + lower_left_portrait = { + character = scope:portrait_3 + hide_info = yes + } + lower_center_portrait = { + character = scope:portrait_4 + hide_info = yes + } + lower_right_portrait = { + character = scope:portrait_5 + hide_info = yes + } + + immediate = { + random_living_character = { + save_scope_as = portrait_1 + } + random_living_character = { + save_scope_as = portrait_2 + } + random_living_character = { + save_scope_as = portrait_3 + } + random_living_character = { + save_scope_as = portrait_4 + } + random_living_character = { + save_scope_as = portrait_5 + } + } + + option = { name = "LOREM_IPSUM_TITLE" } +} + +# fire all previous +debug.1119 = { + hidden = yes + orphan = yes + + immediate = { + trigger_event = debug.1110 + trigger_event = debug.1111 + trigger_event = debug.1112 + trigger_event = debug.1113 + trigger_event = debug.1114 + trigger_event = debug.1115 + trigger_event = debug.1116 + trigger_event = debug.1117 + trigger_event = debug.1118 + } +} \ No newline at end of file diff --git a/events/test_events/insult_poetry.txt b/events/test_events/insult_poetry.txt deleted file mode 100644 index 5db6b6aa..00000000 --- a/events/test_events/insult_poetry.txt +++ /dev/null @@ -1,104 +0,0 @@ -# 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/events/test_events/poetry_events.txt b/events/test_events/poetry_events.txt deleted file mode 100644 index 07d9b2fc..00000000 --- a/events/test_events/poetry_events.txt +++ /dev/null @@ -1,317 +0,0 @@ -# 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/events/title_events.txt b/events/title_events.txt index 7c4ed637..eb91140e 100644 --- a/events/title_events.txt +++ b/events/title_events.txt @@ -21,6 +21,13 @@ title_event.9900 = { } immediate = { + if = { + limit = { exists = root.var:ascended_throne_reason } + root.var:ascended_throne_reason = { save_scope_as = real_transfer_type } + } + else = { + scope:transfer_type = { save_scope_as = real_transfer_type } + } if = { limit = { is_target_in_variable_list = { @@ -99,8 +106,90 @@ title_event.9900 = { root = { remove_variable = ascended_throne_extra } } } + #Clean up LAAMPS who get the wrong governments in claimant wars + if = { + limit = { + OR = { + AND = { + has_variable = city_construction_is_temple_citadel + any_in_list = { + variable = new_titles + this = root.var:city_construction_is_temple_citadel + } + } + AND = { + has_variable = city_construction_is_castle + any_in_list = { + variable = new_titles + this = root.var:city_construction_is_castle + } + } + } + } + #Can the LAAMP become Mandala? + if = { + limit = { has_variable = city_construction_is_temple_citadel } + if = { + limit = { + #... we're lenient + faith = { has_doctrine = doctrine_polytheist } + } + #Sort out the House shenanigans + if = { + limit = { is_house_head = no } + house = { + if = { + limit = { + house_head = { + is_landed = no + is_courtier_of = root + } + } + set_house_head = root + } + } + } + else = { + house ?= { + set_house_aspiration = { type = no_aspect } + } + } + } + #Otherwise go vanilla + else = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + #Otherwise we have city_construction_is_castle + else = { + #... Feudals shouldn't have temple capitals + if = { + limit = { + has_variable = holding_barony + capital_barony = { this != root.var:holding_barony } + capital_province = { has_holding_type = church_holding } + } + capital_province = { set_holding_type = castle_holding } + } + #Otherwise go vanilla + else = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + remove_variable = city_construction_is_temple_citadel + remove_variable = city_construction_is_castle + remove_variable = holding_barony + } clear_variable_list = new_titles - remove_variable = title_count + remove_variable = title_count } } diff --git a/events/travel_events/travel_events_james.txt b/events/travel_events/travel_events_james.txt index d419903a..928502c0 100644 --- a/events/travel_events/travel_events_james.txt +++ b/events/travel_events/travel_events_james.txt @@ -1632,6 +1632,7 @@ travel_events.4006 = { root.current_travel_plan = { random_entourage_character = { limit = { + is_adult = yes opinion = { value <= low_negative_opinion target = root @@ -2528,10 +2529,22 @@ travel_events.4013 = { limit = { exists = dynasty dynasty.dynast = root + NOT = { + culture = { + has_cultural_tradition = tradition_tgp_japanese_houses + } + } } dynasty = { add_dynasty_prestige = major_dynasty_prestige_loss } } - else = { + else_if = { + limit = { + NOT = { + culture = { + has_cultural_tradition = tradition_tgp_japanese_houses + } + } + } add_prestige = massive_prestige_loss } if = { @@ -3384,6 +3397,12 @@ travel_events.4018 = { name = travel_events.4018.b add_piety = major_piety_loss set_character_faith = scope:mystic_scope.faith + if = { + limit = { + scope:mystic_scope.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } add_courtier = scope:mystic_scope root.current_travel_plan = { add_companion = scope:mystic_scope @@ -5660,7 +5679,7 @@ travel_events.4032 = { } if = { limit = { - accolade ?= { is_accolade_active = yes } + is_acclaimed = yes } accolade = { add_glory = minor_glory_gain } } @@ -5679,7 +5698,7 @@ travel_events.4032 = { } if = { limit = { - accolade ?= { is_accolade_active = yes } + is_acclaimed = yes } accolade = { add_glory = minor_glory_gain } } diff --git a/events/witch_events.txt b/events/witch_events.txt index f66a0993..4f8837e0 100644 --- a/events/witch_events.txt +++ b/events/witch_events.txt @@ -208,7 +208,7 @@ witch.1002 = { #by Mathilda Bjarnehed modifier = { exists = liege - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = liege.faith GENDER_CHARACTER = root } + trait_is_criminal_in_faith_trigger = { TRAIT = trait:witch FAITH = liege.faith GENDER_CHARACTER = root } add = 100 } #Player children of witch covens should always be asked @@ -279,7 +279,7 @@ witch.2001 = { #by Mathilda Bjarnehed desc = witch.2001.start.desc first_valid = { triggered_desc = { - trigger = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = root } } + trigger = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:witch GENDER_CHARACTER = root } } desc = witch.2001.secrecy.desc } desc = witch.2001.no_secrecy.desc @@ -383,20 +383,23 @@ witch.2002 = { #by Mathilda Bjarnehed limit = { exists = scope:scheme_discovered } scope:owner = { save_scope_as = left_portrait - show_as_tooltip = { - random_secret = { - type = secret_witch - limit = { - NOT = { is_known_by = root } - } - reveal_to = root + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = root } } + reveal_to = root + save_scope_as = secret_witch_scope } } } else = { save_scope_as = left_portrait } + random_targeting_scheme = { + save_scope_as = scheme + scheme_owner = { save_scope_as = left_portrait save_scope_as = owner } + } } #Yes I want to be a witch @@ -460,8 +463,21 @@ witch.2002 = { #by Mathilda Bjarnehed modifier = hate_opinion opinion = -30 } - + scope:owner = { + if = { + limit = { + any_secret = { + type = secret_witch + } + } + show_as_tooltip = { + random_secret = { + type = secret_witch + expose_secret = scope:target + } + } + } trigger_event = witch.2005 } @@ -826,11 +842,6 @@ witch.2005 = { #by Mathilda Bjarnehed animation = anger } trigger = { - scope:target = { - exists = liege - is_ruler = no - liege = { this != scope:owner } - } exists = scope:scheme_discovered } @@ -856,13 +867,43 @@ witch.2005 = { #by Mathilda Bjarnehed immediate = { random_secret = { type = secret_witch - if = { - limit = { NOT = { is_known_by = scope:target } } - reveal_to = scope:target + save_scope_as = witch_secret_scope + } + } + + option = { + name = witch.2005.a + flavor = witch.2005.a.tt + if = { + limit = { + scope:witch_secret_scope = { + NOT = { is_known_by = scope:target } + } } - if = { - limit = { NOT = { is_known_by = scope:target.liege } } - reveal_to = scope:target.liege + scope:target = { + send_interface_toast = { + title = witch.2005.toast + left_icon = root + scope:witch_secret_scope = { + reveal_to = scope:target + } + } + } + } + if = { + limit = { + scope:witch_secret_scope = { + NOT = { is_known_by = scope:target.liege } + } + } + scope:target.liege = { + send_interface_toast = { + title = witch.2005.toast + left_icon = root + scope:witch_secret_scope = { + reveal_to = scope:target.liege + } + } } } scope:target = { @@ -876,16 +917,16 @@ witch.2005 = { #by Mathilda Bjarnehed modifier = impious_opinion opinion = -20 } - } - - option = { - name = witch.2005.a - flavor = witch.2005.a.tt - scope:scheme = { end_scheme = yes } } + + after = { + scope:witch_secret_scope = { + expose_secret = scope:target + } + } } diff --git a/events/yearly_events/bp1_yearly_james.txt b/events/yearly_events/bp1_yearly_james.txt index 379ea4fa..e317752f 100644 --- a/events/yearly_events/bp1_yearly_james.txt +++ b/events/yearly_events/bp1_yearly_james.txt @@ -1896,7 +1896,7 @@ bp1_yearly.9015 = { } is_adult = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous GENDER_CHARACTER = scope:bp1_yearly_9007_doppelganger FAITH = root.faith } @@ -1919,7 +1919,7 @@ bp1_yearly.9015 = { } is_adult = yes trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = incestuous + TRAIT = trait:incestuous GENDER_CHARACTER = root FAITH = scope:bp1_yearly_9007_doppelganger.faith } @@ -2936,7 +2936,7 @@ scripted_trigger bp1_yearly_9019_spouse_trigger = { faith = { has_doctrine_parameter = homosexuality_accepted } NOT = { trait_is_shunned_in_faith_trigger = { - TRAIT = adulterer + TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } @@ -3473,7 +3473,7 @@ bp1_yearly.9020 = { option = { # I would report you to the authorities for love name = bp1_yearly.9020.c trigger = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = root } + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = trait:deviant GENDER_CHARACTER = root } exists = scope:bp1_yearly_9020_spouse_secret } scope:bp1_yearly_9020_spouse_secret = { @@ -5334,7 +5334,7 @@ bp1_yearly.9030 = { after = { add_character_flag = had_event_bp1_yearly_9030 } } -# Redemption: making ammends with rival's family +# Redemption: making amends with rival's family bp1_yearly.9031 = { type = character_event @@ -5555,7 +5555,7 @@ bp1_yearly.9031 = { after = { add_character_flag = had_event_bp1_yearly_9031 } } -# Redemption: making ammends with rival +# Redemption: making amends with rival bp1_yearly.9032 = { type = character_event @@ -7116,14 +7116,14 @@ bp1_yearly.9043 = { AND = { is_deviant_trigger = yes trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = cp:councillor_court_chaplain } } AND = { is_cannibal_trigger = yes trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7147,7 +7147,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7168,7 +7168,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = cp:councillor_court_chaplain } } @@ -7227,7 +7227,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = cannibal + TRAIT = trait:cannibal GENDER_CHARACTER = root } } @@ -7248,7 +7248,7 @@ bp1_yearly.9043 = { if = { limit = { trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - TRAIT = deviant + TRAIT = trait:deviant GENDER_CHARACTER = root } } diff --git a/events/yearly_events/court_yearly_events.txt b/events/yearly_events/court_yearly_events.txt index 05e6e2d5..3cfcdee8 100644 --- a/events/yearly_events/court_yearly_events.txt +++ b/events/yearly_events/court_yearly_events.txt @@ -3592,10 +3592,13 @@ court_yearly.4800 = { immediate = { if = { limit = { - employs_court_position = bodyguard_court_position + any_court_position_holder = { + type = bodyguard_court_position + is_available_ai_adult = yes + } } random_court_position_holder = { - type = akolouthos_court_position + type = bodyguard_court_position limit = { is_available_ai_adult = yes } @@ -3604,7 +3607,7 @@ court_yearly.4800 = { } else = { random_court_position_holder = { - type = bodyguard_court_position + type = akolouthos_court_position limit = { is_available_ai_adult = yes } @@ -5241,8 +5244,8 @@ court_yearly.0110 = { cp:councillor_court_chaplain ?= { is_available_adult = yes } is_available_adult = yes OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + trait_is_shunned_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules + trait_is_criminal_in_faith_trigger = { TRAIT = trait:adulterer FAITH = root.faith GENDER_CHARACTER = root } #Fornicator is handled by same rules } OR = { has_trait = deviant @@ -6161,6 +6164,12 @@ court_yearly.8120 = { CONVERTOR = scope:accuser } set_character_faith_with_conversion = scope:accuser.faith + if = { + limit = { + scope:accuser.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } else = { reverse_add_opinion = { @@ -6178,6 +6187,12 @@ court_yearly.8120 = { CONVERTOR = scope:refuter } set_character_faith_with_conversion = scope:refuter.faith + if = { + limit = { + scope:refuter.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } } stress_impact = { zealous = massive_stress_impact_gain