From 821cf5b44c670d4bcdb5fe37a76e9811bc5e3377 Mon Sep 17 00:00:00 2001 From: GoTouchSomeGrass314 Date: Sat, 6 Jun 2026 23:44:20 +0200 Subject: [PATCH] Zone Rouge work part 1 Added a new flag that is special to Zone Rouge, which gives less wanderer XP and doesent give the traveler trait. --- common/buildings/NEOW_special_buildings.txt | 2 +- .../customizable_localization/NEOW_travel.txt | 96 +++++++++++++++++++ common/on_action/province_on_actions.txt | 8 ++ .../scripted_effects/NEOW_travel_effects.txt | 11 +++ .../NEOW_travel_point_of_interest_types.txt | 35 +++++++ .../_travel_point_of_interest_types.info | 18 ++++ .../travel_options/_travel_options.info | 61 ++++++++++++ .../gui/travel_planner_window_l_english.yml | 3 + .../travel/tourism_destinations_l_english.yml | 3 + .../travel_points_of_interest_l_english.yml | 2 + 10 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 common/customizable_localization/NEOW_travel.txt create mode 100644 common/scripted_effects/NEOW_travel_effects.txt create mode 100644 common/travel/point_of_interest_types/NEOW_travel_point_of_interest_types.txt create mode 100644 common/travel/point_of_interest_types/_travel_point_of_interest_types.info create mode 100644 common/travel/travel_options/_travel_options.info create mode 100644 localization/english/replace/gui/travel_planner_window_l_english.yml create mode 100644 localization/english/replace/travel/tourism_destinations_l_english.yml create mode 100644 localization/english/replace/travel/travel_points_of_interest_l_english.yml diff --git a/common/buildings/NEOW_special_buildings.txt b/common/buildings/NEOW_special_buildings.txt index 17b03618..75c0579a 100644 --- a/common/buildings/NEOW_special_buildings.txt +++ b/common/buildings/NEOW_special_buildings.txt @@ -579,7 +579,7 @@ zone_rouge_01 = { type = special - flag = travel_point_of_interest_natural_feature + flag = travel_point_of_interest_zone_rouge } ########## diff --git a/common/customizable_localization/NEOW_travel.txt b/common/customizable_localization/NEOW_travel.txt new file mode 100644 index 00000000..d893fe17 --- /dev/null +++ b/common/customizable_localization/NEOW_travel.txt @@ -0,0 +1,96 @@ +GetSpecialBuildingTouristDescriptor = { + type = province + + text = { # Zone Rouge + trigger = { + has_special_building = yes + has_building_or_higher = zone_rouge_01 + } + localization_key = building_zone_rouge_destination_desc + } +} + +GetTouristHoldingOutro = { + type = province + random_valid = yes + text = { #Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_travel_point_of_interest = poi_special_buildings_zone_rouge + } + localization_key = building_zone_rouge_outro_desc + } +} + +GetSpecialBuildingSong = { + type = province + random_valid = yes + text = { # Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_building_with_flag = poi_special_buildings_zone_rouge + } + localization_key = event_song_natural_wonders_03 + } +} + +GetSpecialBuildingCatSleepingSpot = { + type = province + random_valid = yes + text = { # Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_building_with_flag = poi_special_buildings_zone_rouge + } + localization_key = cats_sleeping_natural_wonders_01 + } +} + +GetSpecialBuildingNonsensicalClaim = { + type = province + random_valid = yes + text = { # Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_travel_point_of_interest = poi_special_buildings_zone_rouge + } + localization_key = guide_natural_wonder_5 + } +} + +GetSpecialBuildingPerson = { + type = province + random_valid = yes + text = { # Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_travel_point_of_interest = poi_special_buildings_zone_rouge + } + localization_key = natural_guide + } +} + +MonumentTypeDesc = { + type = province + random_valid = yes + + text = { # Zone Rouge + setup_scope = { + root = { save_scope_as = location } + } + trigger = { + has_travel_point_of_interest = poi_special_buildings_zone_rouge + } + localization_key = monument_beautiful_natural_wonder + } +} diff --git a/common/on_action/province_on_actions.txt b/common/on_action/province_on_actions.txt index ac51fd54..22d6a8ec 100644 --- a/common/on_action/province_on_actions.txt +++ b/common/on_action/province_on_actions.txt @@ -405,6 +405,14 @@ on_building_completed = { add_travel_point_of_interest = poi_special_buildings_economic } + else_if = { + limit = { + has_building_with_flag = { flag = travel_point_of_interest_zone_rouge } + NOT = { has_travel_point_of_interest = poi_special_buildings_zone_rouge } + } + add_travel_point_of_interest = poi_special_buildings_zone_rouge + } + # The Builder event chain if = { limit = { diff --git a/common/scripted_effects/NEOW_travel_effects.txt b/common/scripted_effects/NEOW_travel_effects.txt new file mode 100644 index 00000000..ca4e1a90 --- /dev/null +++ b/common/scripted_effects/NEOW_travel_effects.txt @@ -0,0 +1,11 @@ +add_poi_zone_rouge_effect = { + if = { + limit = { + has_bp3_dlc_trigger = yes + } + poi_lifestyle_experience_effect = { + LIFESTYLE = wanderer + VALUE = travel_minor_lifestyle_xp + } + } +} \ No newline at end of file diff --git a/common/travel/point_of_interest_types/NEOW_travel_point_of_interest_types.txt b/common/travel/point_of_interest_types/NEOW_travel_point_of_interest_types.txt new file mode 100644 index 00000000..a4702399 --- /dev/null +++ b/common/travel/point_of_interest_types/NEOW_travel_point_of_interest_types.txt @@ -0,0 +1,35 @@ +# Zone Rouge +poi_special_buildings_zone_rouge = { + build_province_list = { + every_special_building_province = { + limit = { + has_building_with_flag = { flag = travel_point_of_interest_zone_rouge } + } + add_to_list = provinces + } + } + + on_visit = { + send_interface_toast = { + title = poi_special_buildings_zone_rouge.visit + left_icon = root + + add_poi_zone_rouge_effect = yes + + wanderer_lifestyle_destination_effect = yes + + traveler_dnager_xp_effect = { + MIN = 2 + MAX = 3 + } + if = { + limit = { + has_government = landless_adventurer_government + has_perk = organized_muster_rolls_perk + } + add_gold = minor_gold_laamps_value + } + } + visiting_poi_effect = yes + } +} \ No newline at end of file diff --git a/common/travel/point_of_interest_types/_travel_point_of_interest_types.info b/common/travel/point_of_interest_types/_travel_point_of_interest_types.info new file mode 100644 index 00000000..084beb94 --- /dev/null +++ b/common/travel/point_of_interest_types/_travel_point_of_interest_types.info @@ -0,0 +1,18 @@ +Structure: + +# Travel Points of Interest type +# Each entry represents a type of interesting locations to visit. +key = { + + # Effect that gets triggered when a character visits a POI for the first time + # Root - Traveling character. + # scope:province - province being visited + on_visit = {} + + # Optional, effect which is run monthly period to find which provinces have this type of point of interest + # If provinces are also added/removed via effects (`add_travel_point_of_interest`, `remove_travel_point_of_interest`), + # they need to be valid/invalid in this effect too. + # + # use add_to_list = provinces to return which provinces are valid + build_province_list = {} +} diff --git a/common/travel/travel_options/_travel_options.info b/common/travel/travel_options/_travel_options.info new file mode 100644 index 00000000..1b629aeb --- /dev/null +++ b/common/travel/travel_options/_travel_options.info @@ -0,0 +1,61 @@ +Structure: + +# Travel Option +key = { + # Trigger which has to be true to be shown while planning travel. Scope is the travel owner. + is_shown = {} + + # Trigger which has to be true to be able to be picked while planning travel. Scope is the travel owner. + is_valid = {} + + # Scripted cost which will be applied to the travel owner once the travel start, if the option is picked. Scope is the travel owner character. + # We have chosen to remove the gold cost and have the player choose what options they want to apply for a limited number of slots. Still maintaining it for special options. + cost = {} + + # Travel modifier which gets applied to the travels safety/speed if the option is picked. + travel_modifier = { + travel_speed = number + travel_safety = number + } + + # Character modifier that gets applied to the travel owner character + owner_modifier = {} + + # Effect that gets triggered once the travel starts, or once the option is gained mid-travel. + # Root - Travel Owner. + # scope:travel_speed - Travel Speed (percentage points above 100%) + # scope:travel_safety - Travel Safety + on_applied_effect = {} + + # Effect that gets triggered once the travel ends. + # Root - Travel Owner. + # scope:travel_speed - Travel Speed (percentage points above 100%) + # scope:travel_safety - Travel Safety + on_travel_end_effect = {} + + ### Brief: ai_will_do (scripted value int32) + # How likely is the AI to pick this option if valid? Options will be selected using weighted random. + # Options will be re-evaluated after each option is added. + # + # Root - Travel Plan. + # Extra scopes: + # scope:highest_future_danger_value - highest danger value on route; to compare with `travel_safety` + ai_will_do = {} + + # Select which court characters are added to the travel entourage when this option is added. + # Weighted list is evaluated until all values are negative, or `max` is reached. + travel_entourage_selection = { + # List is all court characters. + # root = character in the travel plan owners' court + # scope:owner = character owning the travel plan + weight = { + value = 10 + } + + # Up to how many characters to select for a player + max = 2 + + # Up to how many characters to select for an AI + ai_max = 2 + } +} diff --git a/localization/english/replace/gui/travel_planner_window_l_english.yml b/localization/english/replace/gui/travel_planner_window_l_english.yml new file mode 100644 index 00000000..37ef15fd --- /dev/null +++ b/localization/english/replace/gui/travel_planner_window_l_english.yml @@ -0,0 +1,3 @@ +l_english: + + TRAVEL_POINT_OF_INTEREST_TT_poi_special_buildings_zone_rouge:0 "[Province.GetHolding.GetCurrentSpecialBuildingType.GetName]" diff --git a/localization/english/replace/travel/tourism_destinations_l_english.yml b/localization/english/replace/travel/tourism_destinations_l_english.yml new file mode 100644 index 00000000..942fbd04 --- /dev/null +++ b/localization/english/replace/travel/tourism_destinations_l_english.yml @@ -0,0 +1,3 @@ +l_english: + building_zone_rouge_destination_desc: "WIP" + building_zone_rouge_outro_desc: "WIP" diff --git a/localization/english/replace/travel/travel_points_of_interest_l_english.yml b/localization/english/replace/travel/travel_points_of_interest_l_english.yml new file mode 100644 index 00000000..4379ed76 --- /dev/null +++ b/localization/english/replace/travel/travel_points_of_interest_l_english.yml @@ -0,0 +1,2 @@ +l_english: + poi_special_buildings_zone_rouge.visit:0 "Visited the [province.GetHolding.GetSpecialBuildingType.GetName]"