From 53ff696f5ce95dce458790c3d76890ca4fa19901 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Wed, 20 Nov 2024 17:21:37 +0400 Subject: [PATCH 01/10] `has_war_with` supports variables --- Config/triggers.cwt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Config/triggers.cwt b/Config/triggers.cwt index 165f573e..a51cfefc 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -406,6 +406,10 @@ alias[trigger:has_war_with] = scope[country] ## scope = country alias[trigger:has_war_with] = enum[country_tags] +### Is countries at war. +## scope = country +alias[trigger:has_war_with] = value[variable] + ### Checks for amount of divisions in specified state owned by current country. ## scope = country alias[trigger:divisions_in_state] = { From 3dce52671b30a427aebed32c1c71363927a02d32 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:24:29 +0100 Subject: [PATCH 02/10] graphic_db can have empty unit equipment. --- Config/gfx/graphic_db.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/gfx/graphic_db.cwt b/Config/gfx/graphic_db.cwt index 31d4454b..1c036325 100644 --- a/Config/gfx/graphic_db.cwt +++ b/Config/gfx/graphic_db.cwt @@ -14,7 +14,7 @@ types = { graphic_db = { ## cardinality = 1..inf enum[equipment_bonus_type] ={ - ## cardinality = 1..inf + ## cardinality = ~1..inf pool = { ## cardinality = 0..1 limit = { From 75c58a33554b1254ec47287d6b12b02612bf7d28 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:06:06 +0100 Subject: [PATCH 03/10] fixing copy paste errors for the add_scientist_role and remove_scientist_role --- Config/effects_gtd.cwt | 75 +++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index 8e00b6f6..1cc973cc 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -284,52 +284,59 @@ alias[effect:generate_scientist_character] = { } +### Add scientist role to a character. The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers. +## scope = country alias[effect:add_scientist_role] = { - ## cardinality = 0..1 - portrait = GFX_portrait # optional - random portrait by default - ## cardinality = 0..1 - portrait_tag_override = scope[country] # optional - accepts variable and keyword - only relevant if using random portrait - by default use country in scope - ## cardinality = 0..1 - gender = enum[gender] # optional - by default random gender - ## cardinality = 0..1 - skills = { - # optional array - # same format as in scientist role in character DB - # by default all skills are at 1 - ## cardinality = ~1..inf - = 2 - } - ## cardinality = 0..1 - traits = { - - } # optional array - + character = + character = value[character_token] + character = value[variable] + character = value[event_target] + character = value[global_event_target] + character = scope[character] + scientist = { + ## cardinality = 0..1 + desc = localisation + ## cardinality = 0..1 + skills = { + # optional array + # same format as in scientist role in character DB + # by default all skills are at 1 + ## cardinality = ~1..inf + = 2 + } + ## cardinality = 0..1 + traits = { + + } # optional array + } } ### Add scientist role to a character. The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers. ## scope = character alias[effect:add_scientist_role] = { - ## cardinality = 0..1 - desc = localisation - ## cardinality = 0..1 - traits = { - ## cardinality = ~1..inf - - } - ## cardinality = 1..1 - skills = { - ## cardinality = 1..inf - = int - } + scientist = { + ## cardinality = 0..1 + desc = localisation + ## cardinality = 0..1 + traits = { + ## cardinality = ~1..inf + + } + ## cardinality = 1..1 + skills = { + ## cardinality = 1..inf + = int + } + } } ### Remove the scientist role from a character.The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers. -## scope = country +## scope = character alias[effect:remove_scientist_role] = bool ### Remove the scientist role from a character.The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers. ## scope = country alias[effect:remove_scientist_role] = { - character = - character = value[character_token] + character = + character = value[character_token] character = value[variable] character = value[event_target] character = value[global_event_target] From c018707f43e458468d2c1ba9167268cd4525a008 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:07:24 +0100 Subject: [PATCH 04/10] fixed another copy paste error --- Config/triggers_gtd.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt index 85773bb7..3038155e 100644 --- a/Config/triggers_gtd.cwt +++ b/Config/triggers_gtd.cwt @@ -209,7 +209,7 @@ alias[trigger:custom_override_tooltip] = { tooltip = localisation tooltip = single_alias_right[bindable_loc] ## cardinality = 0..1 - alias_name[effect] = alias_match_left[effect] + alias_name[trigger] = alias_match_left[trigger] } ### Checks if a state has the specified country as a contested owner. The trigger can be used either from a country or a state scope and accepts the other as parameter. From f42be5047808bac8b08fc6df6353f1e65eea519e Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:07:42 +0100 Subject: [PATCH 05/10] these support variables when equipment is stored in it. --- Config/effects.cwt | 2 ++ Config/triggers.cwt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index 9aa61bca..d81ad158 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -1589,6 +1589,8 @@ alias[effect:send_equipment] = { ## cardinality = 0..1 type = ## cardinality = 0..1 + type = value[variable] + ## cardinality = 0..1 equipment = amount = int_variable_field target = scope[country] diff --git a/Config/triggers.cwt b/Config/triggers.cwt index a51cfefc..78043f60 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -869,6 +869,9 @@ alias[trigger:has_equipment] = { = int_variable_field } ### Checks for amount of equipment stored. ## scope = country alias[trigger:has_equipment] = { value[equipment_variant] = int_variable_field } +### Checks for amount of equipment stored. +## scope = country +alias[trigger:has_equipment] = { value[variable] = int_variable_field } ### Check amount of total factories. ## scope = country From d9dea4148cd5c866e094a09937bf2b3e359d58aa Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Thu, 21 Nov 2024 20:14:12 +0400 Subject: [PATCH 06/10] Add `has_truce_with` from 1.15.1 --- Config/triggers_gtd.cwt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt index 3038155e..b34ef710 100644 --- a/Config/triggers_gtd.cwt +++ b/Config/triggers_gtd.cwt @@ -252,3 +252,15 @@ alias[trigger:num_nukes_being_dropped] = int ### number of nukes left to drop during this game tick (only useful in-between nuke drops, like in on_nuke_drop on-action, for example) ## scope = country alias[trigger:num_nukes_left_to_drop] = int + +### Are countries at peace. +## scope = country +alias[trigger:has_truce_with] = scope[country] + +### Are countries at peace. +## scope = country +alias[trigger:has_truce_with] = enum[country_tags] + +### Are countries at peace. +## scope = country +alias[trigger:has_truce_with] = value[variable] From ffc692b7d65f3c51386ca3dbd52636085bf0c305 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 1 Dec 2024 13:27:33 +0400 Subject: [PATCH 07/10] Add `ai_give_core_state_control_threshold` to ideologies --- Config/common/ideologies.cwt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Config/common/ideologies.cwt b/Config/common/ideologies.cwt index 803bbd3d..74ddd082 100644 --- a/Config/common/ideologies.cwt +++ b/Config/common/ideologies.cwt @@ -37,6 +37,9 @@ ideology = { } ai_ideology_wanted_units_factor = float + ### Extra threshold value added to DIPLOMATIC_ACTION_PROPOSE_SCORE for this ideology to give back core state control to other country + ## cardinality = 0..1 + ai_give_core_state_control_threshold = float dynamic_faction_names = { ## cardinality = 0..inf From ce4172e57c5a0734450d72b039ddb8a452a18ea1 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 1 Dec 2024 14:02:13 +0400 Subject: [PATCH 08/10] Add support of focus inlay windows --- Config/common/national_focus.cwt | 9 +++++ Config/common/national_focus_inlay_window.cwt | 38 +++++++++++++++++++ Config/interface/gui.cwt | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Config/common/national_focus_inlay_window.cwt diff --git a/Config/common/national_focus.cwt b/Config/common/national_focus.cwt index d9dc468e..8dff5716 100644 --- a/Config/common/national_focus.cwt +++ b/Config/common/national_focus.cwt @@ -95,6 +95,15 @@ focus_tree = { } } + ## cardinality = 0..inf + inlay_window = { + id = + position = { + x = int + y = int + } + } + ## cardinality = 0..1 initial_show_position = { ## cardinality = 0..1 diff --git a/Config/common/national_focus_inlay_window.cwt b/Config/common/national_focus_inlay_window.cwt new file mode 100644 index 00000000..909e1122 --- /dev/null +++ b/Config/common/national_focus_inlay_window.cwt @@ -0,0 +1,38 @@ +types = { + type[focus_inlay_window] = { + path = "game/common/focus_inlay_windows" + } +} + + +focus_inlay_window = { + window_name = + ### If true, then the inlay window is only visible to the country itself (defaults no) + ## cardinality = 0..1 + internal = bool + ### When not visible, no evaluations will be done + ## replace_scope = { this = country root = country } + ## cardinality = 0..1 + visible = { + alias_name[trigger] = alias_match_left[trigger] + } + ### List of images that should have dynamic sprites + scripted_images = { + ### Name of the icon (must be a subcomponent of "gui_component_name") + ## cardinality = 1..inf + value[iconType_name] = { + ### List of possible gfx:es for the icon, first that evaluates to true is selected (each update) + ### Each entry consists of a gfx_name (the gfx that will be used if the trigger is true); and a trigger or "yes" + ### If a trigger is provided, then it will be evaluated with the country scope of the focus tree. + ## replace_scope = { this = country root = country } + ## cardinality = 0..inf + = { + ## cardinality = 1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ### If "yes" is set, then it will always be used. Note: "yes" is commonly the last entry in the list that acts as a default case. + ## cardinality = 0..1 + = yes + } + } +} diff --git a/Config/interface/gui.cwt b/Config/interface/gui.cwt index 2c57a455..d99954ff 100644 --- a/Config/interface/gui.cwt +++ b/Config/interface/gui.cwt @@ -392,7 +392,7 @@ alias[gui:smoothListBoxType] = { ###Non-clickable icon alias[gui:iconType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[iconType_name] ##cardinality = ~1..1 alias_name[any_image_type] = alias_match_left[any_image_type] alias_name[gui_image] = alias_match_left[gui_image] From fdd5d1457e6f0b584438749943b85ad1e53c499d Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 1 Dec 2024 14:04:59 +0400 Subject: [PATCH 09/10] Update KR's has_dlc_gtd trigger --- Config/common/special_projects.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/common/special_projects.cwt b/Config/common/special_projects.cwt index d0a77324..fdf86960 100644 --- a/Config/common/special_projects.cwt +++ b/Config/common/special_projects.cwt @@ -51,7 +51,7 @@ special_project = { } ### KR DLC triggers ## cardinality = 0..inf - has_dlc_got = yes + has_dlc_gtd = yes ## cardinality = 0..inf has_dlc_mtg = yes ## cardinality = 0..inf From 2947d6ec34ffd4a480357b6f9cf3b66f48259b70 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 1 Dec 2024 14:20:19 +0400 Subject: [PATCH 10/10] Add new tech_effect|character name stuff to scripted loc --- Config/common/raids.cwt | 2 +- Config/common/scripted_effects_locs_and_triggers.cwt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Config/common/raids.cwt b/Config/common/raids.cwt index b41546c1..1eaab0fc 100644 --- a/Config/common/raids.cwt +++ b/Config/common/raids.cwt @@ -298,7 +298,7 @@ single_alias[raid_outcome] = { ## cardinality = 0..1 custom_sound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files - ## cardinality = 0..1 + ## cardinality = 0..inf visual_effect = { entity = animation = diff --git a/Config/common/scripted_effects_locs_and_triggers.cwt b/Config/common/scripted_effects_locs_and_triggers.cwt index ec944980..f7e08b2e 100644 --- a/Config/common/scripted_effects_locs_and_triggers.cwt +++ b/Config/common/scripted_effects_locs_and_triggers.cwt @@ -34,12 +34,18 @@ scripted_loc = { ## cardinality = 0..1 localization_key = ## cardinality = 0..1 + localization_key = character_name| + ## cardinality = 0..1 + localization_key = tech_effect| + ## cardinality = 0..1 random_list = { ## cardinality = 1..inf int = { alias_name[modifier_rule] = alias_match_left[modifier_rule] localization_key = localisation_inline localization_key = + localization_key = character_name| + localization_key = tech_effect| } } }