From d816ef6a327cbcaa4a6b1c2c76a9aa68ccf3557c Mon Sep 17 00:00:00 2001 From: AngriestBird Date: Thu, 1 Aug 2024 20:41:10 -0400 Subject: [PATCH 1/7] added ribbon and fixed a bug --- Config/common/achievements.cwt | 15 +++++++++++---- Config/triggers.cwt | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Config/common/achievements.cwt b/Config/common/achievements.cwt index b0b4ab84..f19af2d3 100644 --- a/Config/common/achievements.cwt +++ b/Config/common/achievements.cwt @@ -1,8 +1,8 @@ types = { type[achievement] = { path = "game/common/achievements" - unique = yes - } + unique = yes + } } ## replace_scope = { ROOT = country THIS = country } @@ -16,13 +16,20 @@ achievement = { ## cardinality = ~1..inf alias_name[trigger] = alias_match_left[trigger] } + + ribbon = { + frames = { int } + colors = { + scalar + } + } } enums = { complex_enum[mod_achievement_id] = { path = "game/common/achievements" - unique = yes - start_from_root = yes + unique = yes + start_from_root = yes name = { unique_id = enum_name } diff --git a/Config/triggers.cwt b/Config/triggers.cwt index 706daf06..aabdf76a 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -2367,4 +2367,5 @@ alias[trigger:has_bombing_war_support] = variable_field_32 alias[trigger:has_resources_in_country] = { resource = amount = int_variable_field + extracted = bool } From c41e986959cb5b937dccf439716815891ef3df59 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Sun, 4 Aug 2024 22:34:54 +0200 Subject: [PATCH 2/7] added controller_priority to build_railway --- Config/effects.cwt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index a2c18d8c..5ad9500f 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -913,6 +913,21 @@ alias[effect:build_railway] = { } ## cardinality = 0..1 build_only_on_allied = bool + ### You can specify a weight function that will be used in pathing. The scope will be the controller of the province it is trying to path to. + ### A negative value will make it not to path to that controller. + ### Non-negative values will be used as a path cost for that province. + ## cardinality = 0..1 + controller_priority ={ + ## cardinality = 0..1 + base = variable_field + ## cardinality = 0..inf + modifier = { + ## cardinality = ~1..inf + tag = enum[country_tags] + ## cardinality = ~1..1 + add = float + } + } ## cardinality = 0..1 level = int[1..5] ### Option 3: Specify start & end state IDs. It will pick provinces with the best node (capital > nodes > naval ) start_state = 50 target_state = 100 @@ -928,6 +943,21 @@ alias[effect:build_railway] = { alias[effect:build_railway] = { ## cardinality = 0..1 build_only_on_allied = bool + ### You can specify a weight function that will be used in pathing. The scope will be the controller of the province it is trying to path to. + ### A negative value will make it not to path to that controller. + ### Non-negative values will be used as a path cost for that province. + ## cardinality = 0..1 + controller_priority ={ + ## cardinality = 0..1 + base = variable_field + ## cardinality = 0..inf + modifier = { + ## cardinality = ~1..inf + tag = enum[country_tags] + ## cardinality = ~1..1 + add = float + } + } ## cardinality = 0..1 level = int[1..5] start_province = enum[provinces] @@ -950,6 +980,21 @@ alias[effect:build_railway] = { alias[effect:build_railway] = { ## cardinality = 0..1 build_only_on_allied = bool + ### You can specify a weight function that will be used in pathing. The scope will be the controller of the province it is trying to path to. + ### A negative value will make it not to path to that controller. + ### Non-negative values will be used as a path cost for that province. + ## cardinality = 0..1 + controller_priority ={ + ## cardinality = 0..1 + base = variable_field + ## cardinality = 0..inf + modifier = { + ## cardinality = ~1..inf + tag = enum[country_tags] + ## cardinality = ~1..1 + add = float + } + } ## cardinality = 0..1 level = int[1..5] start_state = From 2543fa6579a81ae906b9a83df7a2c78c70c4998a Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Mon, 5 Aug 2024 16:34:04 +0400 Subject: [PATCH 3/7] Achievements - moved "ribbon" to optional --- Config/common/achievements.cwt | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/common/achievements.cwt b/Config/common/achievements.cwt index f19af2d3..5e6c6c89 100644 --- a/Config/common/achievements.cwt +++ b/Config/common/achievements.cwt @@ -17,6 +17,7 @@ achievement = { alias_name[trigger] = alias_match_left[trigger] } + ## cardinality = 0..1 ribbon = { frames = { int } colors = { From 769f4c38262ef64c71da0e8e009bee9cb2a22ac5 Mon Sep 17 00:00:00 2001 From: Alpinia Date: Tue, 13 Aug 2024 09:31:06 -0300 Subject: [PATCH 4/7] Added highlight_only_provinces boolean. --- Config/common/decisions.cwt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Config/common/decisions.cwt b/Config/common/decisions.cwt index d17b129c..d7bd569b 100644 --- a/Config/common/decisions.cwt +++ b/Config/common/decisions.cwt @@ -159,6 +159,9 @@ decision_category = { enum[provinces] } + ## cardinality = 0..1 + highlight_only_provinces = bool + ## cardinality = 0..1 highlight_color_before_active = int ## cardinality = 0..1 @@ -339,6 +342,9 @@ decision = { enum[provinces] } + ## cardinality = 0..1 + highlight_only_provinces = bool + ## cardinality = 0..1 highlight_color_before_active = int ## cardinality = 0..1 @@ -486,6 +492,9 @@ decision = { state = variable_field } + ## cardinality = 0..1 + highlight_only_provinces = bool + ## cardinality = 0..1 highlight_provinces = { ## cardinality = ~1..inf From bd6de17abac6bac058cd9093efc7e5edd172a608 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 13 Aug 2024 21:41:22 +0400 Subject: [PATCH 5/7] Properly update `has_resources_in_country` trigger --- Config/triggers.cwt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Config/triggers.cwt b/Config/triggers.cwt index aabdf76a..eb0c1009 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -2362,10 +2362,15 @@ alias[trigger:has_bombing_war_support] = float ## scope = country alias[trigger:has_bombing_war_support] = variable_field_32 -### Has a certain amount of resources +### Checks for amount of resources in country ## scope = country alias[trigger:has_resources_in_country] = { resource = amount = int_variable_field + ### Checks extracted amount instead of country balance. Default - no + ## cardinality = 0..1 extracted = bool + ### Checks only amount from local buildings instead of country balance. Default - no + ## cardinality = 0..1 + buildings = bool } From 4ff89e9a6dacf92892a51e26c0b1cd9bd55e02dd Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 13 Aug 2024 21:50:25 +0400 Subject: [PATCH 6/7] Add some pc variables --- Config/common/peace_conference.cwt | 4 ++-- Config/variables.cwt | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Config/common/peace_conference.cwt b/Config/common/peace_conference.cwt index 8424d1bd..dbd45dbb 100644 --- a/Config/common/peace_conference.cwt +++ b/Config/common/peace_conference.cwt @@ -161,11 +161,11 @@ alias[trigger:pc_is_forced_government_to] = ### Checks if the current scope has the specified amount in total score within the peace conference. Can only be used for the winning countries. 1.12 ## scope = country -alias[trigger:pc_total_score] = int +alias[trigger:pc_total_score] = int_variable_field ### Checks if the current scope has the specified amount in current score within the peace conference. ## scope = country -alias[trigger:pc_current_score] = int +alias[trigger:pc_current_score] = int_variable_field ### Check if state is claimed with a take_states action in conference for TAG. Example: pc_is_state_claimed_and_taken_by = SOV/ROOT/ROOT.FROM" ## scope = state diff --git a/Config/variables.cwt b/Config/variables.cwt index 0d4ae636..d18fde14 100644 --- a/Config/variables.cwt +++ b/Config/variables.cwt @@ -648,6 +648,12 @@ values = { ### (Trigger) Total produced equipment of typetrain total_equipment_produced_train + ### (Trigger) Checks country's total peace conference score. Only usable if the country is on the winning side. Example: CZE = { pc_current_score > 400 } + pc_current_score + + ### (Trigger) Checks country's total peace conference score. Only usable if the country is on the winning side. Example: CZE = { pc_total_score > 400 } + pc_total_score + # ======================= # STATE DYNAMIC VARIABLES # ======================= From 3d1c1d6d01d4e877ff1a001e807a91a1109f09fe Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 13 Aug 2024 22:01:03 +0400 Subject: [PATCH 7/7] Update scripted gui config with mapmode and trigger for mapicon_targets --- Config/common/scripted_guis.cwt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Config/common/scripted_guis.cwt b/Config/common/scripted_guis.cwt index baf17676..a69901c4 100644 --- a/Config/common/scripted_guis.cwt +++ b/Config/common/scripted_guis.cwt @@ -52,6 +52,9 @@ scripted_gui = { ## cardinality = 0..1 context_type = enum[context_type] + ## cardinality = 0..1 + mapmode = + ## cardinality = 0..1 parent_window_token = enum[parent_window_token] @@ -350,6 +353,11 @@ scripted_gui = { target_array = value[array] ## cardinality = 0..1 target_array = variable_field + ## cardinality = 0..1 + target_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } } ## cardinality = 0..inf ### Limits AI to selected scopes. When used multiple times, will use all matching scopes. @@ -397,6 +405,11 @@ scripted_gui = { target_array = value[array] ## cardinality = 0..1 target_array = variable_field + ## cardinality = 0..1 + target_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } } ## cardinality = 0..inf ### Limits AI to selected scopes. When used multiple times, will use all matching scopes.