From d816ef6a327cbcaa4a6b1c2c76a9aa68ccf3557c Mon Sep 17 00:00:00 2001 From: AngriestBird Date: Thu, 1 Aug 2024 20:41:10 -0400 Subject: [PATCH 01/73] 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 02/73] 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 03/73] 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 04/73] 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 05/73] 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 06/73] 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 07/73] 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. From ad443cc9c29d960274f918fcd0d482dba8411958 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:55:55 +0200 Subject: [PATCH 08/73] added months and years to modify_timed_idea --- Config/effects.cwt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Config/effects.cwt b/Config/effects.cwt index 5ad9500f..15a426d9 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -3032,7 +3032,13 @@ alias[effect:remove_targeted_decision] = { ## scope = country alias[effect:modify_timed_idea] = { idea = enum[idea_name] - days = int + idea = value[variable] + ## cardinality = 0..1 + days = int_variable_field + ## cardinality = 0..1 + months = int_variable_field + ## cardinality = 0..1 + years = int_variable_field } ### Activates specified decision for scope country. From 3606407363576c095b9c497a43637d74da2a6493 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 3 Sep 2024 16:50:21 +0400 Subject: [PATCH 09/73] Update upper limit of regiments from 24 to 25 in templates --- Config/common/consolidated_ai.cwt | 2 +- Config/effects.cwt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/common/consolidated_ai.cwt b/Config/common/consolidated_ai.cwt index 55b917f0..fd5d51a3 100644 --- a/Config/common/consolidated_ai.cwt +++ b/Config/common/consolidated_ai.cwt @@ -258,7 +258,7 @@ ai_template = { regiments = { ## cardinality = 1..25 - = int[0..24] + = int[0..25] } ## cardinality = 0..1 support = { diff --git a/Config/effects.cwt b/Config/effects.cwt index 15a426d9..8d47e8dd 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -655,7 +655,7 @@ alias[effect:add_units_to_division_template] = { ## cardinality = 0..1 regiments = { ## cardinality = 1..25 - = int[0..24] + = int[0..25] } ## cardinality = 0..1 support = { From 7acc9d1fdd1b38be5f3cc53ffdb3f5173f9800e5 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 3 Sep 2024 18:01:24 +0400 Subject: [PATCH 10/73] Update "has_railway_connection" trigger --- Config/triggers_bba.cwt | 14 -------------- Config/triggers_nsb.cwt | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/Config/triggers_bba.cwt b/Config/triggers_bba.cwt index 44631e42..0c7003ce 100644 --- a/Config/triggers_bba.cwt +++ b/Config/triggers_bba.cwt @@ -118,20 +118,6 @@ alias[trigger:num_battalions_in_states] = { ## scope = country alias[trigger:has_war_with_major] = bool -### Checks if there is a railway connection between provinces/states -## scope = country -alias[trigger:has_railway_connection] = { - start_state = - target_state = -} - -### Checks if there is a railway connection between provinces/states -## scope = country -alias[trigger:has_railway_connection] = { - start_province = enum[provinces] - target_province = enum[provinces] -} - ### Checks if country has war with wargoal against target ## scope = country alias[trigger:has_war_with_wargoal_against] = { diff --git a/Config/triggers_nsb.cwt b/Config/triggers_nsb.cwt index a78156e5..aec13295 100644 --- a/Config/triggers_nsb.cwt +++ b/Config/triggers_nsb.cwt @@ -373,6 +373,43 @@ alias[trigger:can_build_railway] = { fallback = bool } +### Checks for an existing rail connection. Uses same params as can_build_railway +## scope = country +alias[trigger:has_railway_connection] = { + path = { + ## cardinality = 1..inf + enum[provinces] + } + ## cardinality = 0..1 + build_only_on_allied = bool + ## cardinality = 0..1 + fallback = bool +} + +### Checks for an existing rail connection. Uses same params as can_build_railway +## scope = country +alias[trigger:has_railway_connection] = { + ## cardinality = 0..1 + build_only_on_allied = bool + start_province = enum[provinces] + target_province = enum[provinces] + ## cardinality = 0..1 + fallback = bool +} + +### Checks for an existing rail connection. Uses same params as can_build_railway +## scope = country +alias[trigger:has_railway_connection] = { + ## cardinality = 0..1 + build_only_on_allied = bool + start_state = + start_state = scope[state] + target_state = + target_state = scope[state] + ## cardinality = 0..1 + fallback = bool +} + ### Checks if country has idea. ## scope = country alias[trigger:has_idea] = value[variable] From d8f46c875bf0712c39136f9721fdd588b80b17d5 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 3 Sep 2024 22:06:47 +0400 Subject: [PATCH 11/73] [Modifiers] Add script to check missing modifiers, add arrays and script to pass modifiers to variables --- Config/modifiers.cwt | 1140 ++++++++++++++++++++++++- Config/variables.cwt | 85 +- tests/test_check_missing_modifiers.py | 47 + tests/test_generate_modifiers_enum.py | 41 + 4 files changed, 1225 insertions(+), 88 deletions(-) create mode 100644 tests/test_check_missing_modifiers.py create mode 100644 tests/test_generate_modifiers_enum.py diff --git a/Config/modifiers.cwt b/Config/modifiers.cwt index 71971f85..db9195d2 100644 --- a/Config/modifiers.cwt +++ b/Config/modifiers.cwt @@ -1,5 +1,5 @@ modifiers = { - # aggressive + # aggressive annex_cost_factor = aggressive army_armor_attack_factor = aggressive army_armor_speed_factor = aggressive @@ -18,12 +18,14 @@ modifiers = { breakthrough_factor = aggressive carrier_capacity_penalty_reduction = aggressive carrier_traffic = aggressive + carrier_sortie_hours_delay = aggressive cavalry_attack_factor = aggressive combat_width_factor = aggressive convoy_raiding_efficiency_factor = aggressive coordination_bonus = aggressive decryption = aggressive decryption_factor = aggressive + enemy_attrition = aggressive enemy_declare_war_tension = aggressive enemy_justify_war_goal_time = aggressive fighter_sortie_efficiency = aggressive @@ -45,8 +47,10 @@ modifiers = { naval_enemy_positioning_in_initial_attack = aggressive naval_has_potf_in_combat_attack = aggressive naval_has_potf_in_combat_defense = aggressive + naval_heavy_gun_hit_chance_factor = aggressive naval_hit_chance = aggressive naval_invasion_planning_bonus_speed = aggressive + naval_light_gun_hit_chance_factor = aggressive naval_night_attack = aggressive naval_strike = aggressive naval_torpedo_cooldown_factor = aggressive @@ -78,7 +82,7 @@ modifiers = { winter_attrition = aggressive winter_attrition_factor = aggressive - # ai + # ai ai_badass_factor = ai ai_call_ally_desire_factor = ai ai_desired_divisions_factor = ai @@ -95,7 +99,7 @@ modifiers = { ai_join_ally_desire_factor = ai ai_license_acceptance = ai - # air + # air ace_effectiveness_factor = air air_accidents = air air_accidents_factor = air @@ -151,7 +155,7 @@ modifiers = { ground_attack_factor = air paratrooper_aa_defense = air - # army + # army acclimatization_cold_climate_gain_factor = army acclimatization_hot_climate_gain_factor = army air_superiority_bonus_in_combat = army @@ -197,6 +201,9 @@ modifiers = { cavalry_defence_factor = army combat_width_factor = army coastal_bunker_effectiveness_factor = army + command_abilities_cost_factor = army + command_power_gain = army + command_power_gain_mult = army coordination_bonus = army defence = army defense_bonus_against = army @@ -205,6 +212,8 @@ modifiers = { disable_strategic_redeployment = army disable_strategic_redeployment_for_controller = army dont_lose_dig_in_on_attack = army + enemy_army_speed_factor = army + enemy_attrition = army experience_gain_army = army experience_gain_army_factor = army experience_gain_army_unit = army @@ -217,6 +226,9 @@ modifiers = { land_bunker_effectiveness_factor = army land_night_attack = army local_org_regain = army + marines_special_forces_contribution_factor = army + max_command_power = army + max_command_power_mult = army max_commander_army_size = army max_dig_in = army max_dig_in_factor = army @@ -225,14 +237,69 @@ modifiers = { max_training = army mechanized_attack_factor = army mechanized_defence_factor = army + modifier_army_sub_unit_armored_car_attack_factor = army + modifier_army_sub_unit_armored_car_defence_factor = army + modifier_army_sub_unit_armored_car_max_org_factor = army + modifier_army_sub_unit_armored_car_recon_attack_factor = army + modifier_army_sub_unit_armored_car_recon_defence_factor = army + modifier_army_sub_unit_armored_car_recon_max_org_factor = army + modifier_army_sub_unit_armored_car_recon_speed_factor = army + modifier_army_sub_unit_armored_car_speed_factor = army + modifier_army_sub_unit_blackshirt_assault_battalion_attack_factor = army + modifier_army_sub_unit_blackshirt_assault_battalion_defence_factor = army + modifier_army_sub_unit_blackshirt_assault_battalion_max_org_factor = army + modifier_army_sub_unit_blackshirt_assault_battalion_speed_factor = army + modifier_army_sub_unit_camelry_attack_factor = army + modifier_army_sub_unit_camelry_defence_factor = army + modifier_army_sub_unit_camelry_speed_factor = army + modifier_army_sub_unit_category_special_forces_max_org_factor = army + modifier_army_sub_unit_cavalry_attack_factor = army + modifier_army_sub_unit_cavalry_defence_factor = army + modifier_army_sub_unit_cavalry_speed_factor = army + modifier_army_sub_unit_infantry_attack_factor = army + modifier_army_sub_unit_infantry_defence_factor = army + modifier_army_sub_unit_infantry_speed_factor = army + modifier_army_sub_unit_irregular_infantry_attack_factor = army + modifier_army_sub_unit_irregular_infantry_defence_factor = army + modifier_army_sub_unit_irregular_infantry_max_org_factor = army + modifier_army_sub_unit_irregular_infantry_speed_factor = army + modifier_army_sub_unit_light_tank_recon_attack_factor = army + modifier_army_sub_unit_light_tank_recon_defence_factor = army + modifier_army_sub_unit_light_tank_recon_max_org_factor = army + modifier_army_sub_unit_light_tank_recon_speed_factor = army + modifier_army_sub_unit_long_range_patrol_support_attack_factor = army + modifier_army_sub_unit_long_range_patrol_support_defence_factor = army + modifier_army_sub_unit_marines_attack_factor = army + modifier_army_sub_unit_marines_defence_factor = army + modifier_army_sub_unit_marines_max_org_factor = army + modifier_army_sub_unit_marines_speed_factor = army + modifier_army_sub_unit_military_police_attack_factor = army + modifier_army_sub_unit_military_police_defence_factor = army + modifier_army_sub_unit_military_police_max_org_factor = army + modifier_army_sub_unit_military_police_speed_factor = army + modifier_army_sub_unit_militia_attack_factor = army + modifier_army_sub_unit_militia_defence_factor = army + modifier_army_sub_unit_militia_max_org_factor = army + modifier_army_sub_unit_militia_org_recovery_cap_factor = army + modifier_army_sub_unit_militia_speed_factor = army + modifier_army_sub_unit_mountaineers_attack_factor = army + modifier_army_sub_unit_mountaineers_defence_factor = army + modifier_army_sub_unit_mountaineers_max_org_factor = army + modifier_army_sub_unit_mountaineers_speed_factor = army + modifier_army_sub_unit_paratrooper_attack_factor = army + modifier_army_sub_unit_paratrooper_defence_factor = army + modifier_army_sub_unit_paratrooper_max_org_factor = army + modifier_army_sub_unit_paratrooper_speed_factor = army motorized_attack_factor = army motorized_defence_factor = army + mountaineers_special_forces_contribution_factor = army naval_invasion_planning_bonus_speed = army no_supply_grace = army offence = army org_loss_at_low_org_factor = army org_loss_when_moving = army out_of_supply_factor = army + paratroopers_special_forces_contribution_factor = army planning_speed = army pocket_penalty = army recon_factor = army @@ -241,6 +308,7 @@ modifiers = { shore_bombardment_bonus = army special_forces_attack_factor = army special_forces_cap = army + special_forces_cap_flat = army special_forces_defence_factor = army special_forces_min = army special_forces_no_supply_grace = army @@ -257,7 +325,7 @@ modifiers = { winter_attrition = army winter_attrition_factor = army - # autonomy + # autonomy autonomy_gain = autonomy autonomy_gain_global_factor = autonomy autonomy_gain_ll_to_overlord = autonomy @@ -278,7 +346,8 @@ modifiers = { overlord_trade_cost_factor = autonomy subjects_autonomy_gain = autonomy - # country + # country + additional_brigade_column_size = country agency_upgrade_time = country air_doctrine_cost_factor = country air_equipment_upgrade_xp_cost = country @@ -294,6 +363,7 @@ modifiers = { civil_war_involvement_tension = country civilian_factory_use = country civilian_intel_to_others = country + coastal_bunker_effectiveness_factor = country command_abilities_cost_factor = country command_power_gain = country command_power_gain_mult = country @@ -304,8 +374,8 @@ modifiers = { conscription_factor = country cic_construction_boost = country cic_construction_boost_factor = country - consumer_goods_factor = country # Consumer Goods Factor/Modifier to Base Value - consumer_goods_expected_value = country # Consumer Goods Base Value + consumer_goods_factor = country + consumer_goods_expected_value = country conversion_cost_civ_to_mil_factor = country conversion_cost_mil_to_civ_factor = country critical_receive_chance = country @@ -326,6 +396,7 @@ modifiers = { enemy_operative_harmed_time_factor = country enemy_operative_intel_extraction_rate = country enemy_spy_negative_status_factor = country + embargo_cost_factor = country embargo_threshold_factor = country equipment_capture = country equipment_capture_factor = country @@ -335,10 +406,12 @@ modifiers = { experience_loss_factor = country extra_trade_to_target_factor = country faction_trade_opinion_factor = country + female_divisional_commander_chance = country female_random_admiral_chance = country female_random_army_leader_chance = country female_random_country_leader_chance = country female_random_operative_chance = country + field_officer_promotion_penalty = country floating_harbor_duration = country floating_harbor_range = country floating_harbor_supply = country @@ -353,6 +426,7 @@ modifiers = { generate_wargoal_tension_against = country global_building_slots = country global_building_slots_factor = country + grant_medal_cost_factor = country guarantee_cost = country guarantee_tension = country improve_relations_maintain_cost_factor = country @@ -368,10 +442,12 @@ modifiers = { join_faction_tension = country justify_war_goal_time = country justify_war_goal_when_in_major_war_time = country + land_bunker_effectiveness_factor = country land_doctrine_cost_factor = country land_equipment_upgrade_xp_cost = country land_reinforce_rate = country lend_lease_tension = country + lend_lease_tension_with_overlord = country license_air_purchase_cost = country license_anti_tank_eq_cost_factor = country license_anti_tank_eq_production_speed_factor = country @@ -423,10 +499,15 @@ modifiers = { own_operative_forced_into_hiding_time_factor = country own_operative_harmed_time_factor = country own_operative_intel_extraction_rate = country + paradrop_organization_factor = country + paratrooper_aa_defense = country + paratrooper_weight_factor = country party_popularity_stability_factor = country political_power_cost = country political_power_factor = country political_power_gain = country + power_balance_daily = country + power_balance_weekly = country production_factory_efficiency_gain_factor = country production_factory_max_efficiency_factor = country production_factory_start_efficiency_factor = country @@ -485,7 +566,7 @@ modifiers = { army_spirit_category_type_cost_factor = country navy_spirit_category_type_cost_factor = country - # defensive + # defensive armor_factor = defensive army_armor_defence_factor = defensive army_artillery_defence_factor = defensive @@ -511,6 +592,7 @@ modifiers = { dont_lose_dig_in_on_attack = defensive encryption = defensive encryption_factor = defensive + enemy_attrition = defensive guarantee_tension = defensive local_intel_to_enemies = defensive max_dig_in = defensive @@ -521,6 +603,8 @@ modifiers = { naval_retreat_chance_after_initial_combat = defensive naval_retreat_speed = defensive naval_retreat_speed_after_initial_combat = defensive + naval_torpedo_damage_reduction_factor = defensive + naval_torpedo_enemy_critical_chance_factor = defensive navy_capital_ship_defence_factor = defensive navy_screen_defence_factor = defensive navy_submarine_defence_factor = defensive @@ -536,7 +620,7 @@ modifiers = { supply_consumption_factor = defensive terrain_penalty_reduction = defensive - # government_in_exile + # government_in_exile dockyard_donations = government_in_exile exile_manpower_factor = government_in_exile industrial_factory_donations = government_in_exile @@ -545,7 +629,7 @@ modifiers = { military_factory_donations = government_in_exile targeted_legitimacy_daily = government_in_exile - # intelligence_agency + # intelligence_agency airforce_intel_decryption_bonus = intelligence_agency airforce_intel_factor = intelligence_agency army_intel_decryption_bonus = intelligence_agency @@ -578,7 +662,7 @@ modifiers = { root_out_resistance_effectiveness_factor = intelligence_agency target_sabotage_factor = intelligence_agency - # military_advancements + # military_advancements experience_gain_army = military_advancements experience_gain_army_factor = military_advancements experience_gain_army_unit = military_advancements @@ -590,11 +674,12 @@ modifiers = { experience_gain_navy_unit_factor = military_advancements research_speed_factor = military_advancements - # naval + # naval amphibious_invasion = naval amphibious_invasion_defence = naval assign_navy_leader_cp_cost = naval carrier_capacity_penalty_reduction = naval + carrier_sortie_hours_delay = naval carrier_traffic = naval convoy_escort_efficiency = naval convoy_raiding_efficiency_factor = naval @@ -622,9 +707,11 @@ modifiers = { naval_enemy_retreat_chance = naval naval_has_potf_in_combat_attack = naval naval_has_potf_in_combat_defense = naval + naval_heavy_gun_hit_chance_factor = naval naval_hit_chance = naval naval_invasion_capacity = naval naval_invasion_penalty = naval + naval_light_gun_hit_chance_factor = naval naval_mine_hit_chance = naval naval_mines_damage_factor = naval naval_mines_effect_reduction = naval @@ -638,6 +725,8 @@ modifiers = { naval_speed_factor = naval naval_strike = naval naval_torpedo_cooldown_factor = naval + naval_torpedo_damage_reduction_factor = naval + naval_torpedo_enemy_critical_chance_factor = naval naval_torpedo_hit_chance_factor = naval naval_torpedo_reveal_chance_factor = naval naval_torpedo_screen_penetration_factor = naval @@ -677,18 +766,23 @@ modifiers = { terrain_trait_xp_gain_factor = naval transport_capacity = naval - # peace + # peace annex_cost_factor = peace + peace_score_ratio_transferred_to_overlord = peace + peace_score_ratio_transferred_to_players = peace puppet_cost_factor = peace - # politics + # politics drift_defence_factor = politics + embargo_cost_factor = politics + embargo_threshold_factor = politics guarantee_cost = politics master_ideology_drift = politics power_balance_weekly = politics - # state + # state army_speed_factor_for_controller = state + coastal_bunker_effectiveness_factor = state compliance_gain = state compliance_growth = state compliance_growth_on_our_occupied_states = state @@ -700,9 +794,11 @@ modifiers = { enemy_local_supplies = state enemy_spy_negative_status_factor = state enemy_truck_attrition_factor = state + equipment_capture_factor_for_controller = state equipment_capture_for_controller = state intel_network_gain = state intel_network_gain_factor = state + land_bunker_effectiveness_factor = state local_building_slots = state local_building_slots_factor = state local_factories = state @@ -743,7 +839,7 @@ modifiers = { truck_attrition = state truck_attrition_factor = state - # unit_leader + # unit_leader amphibious_invasion = unit_leader amphibious_invasion_defence = unit_leader army_leader_cost_factor = unit_leader @@ -754,6 +850,7 @@ modifiers = { army_leader_start_planning_level = unit_leader cannot_use_abilities = unit_leader carrier_capacity_penalty_reduction = unit_leader + carrier_sortie_hours_delay = unit_leader carrier_traffic = unit_leader convoy_escort_efficiency = unit_leader convoy_raiding_efficiency_factor = unit_leader @@ -794,9 +891,11 @@ modifiers = { naval_enemy_retreat_chance = unit_leader naval_has_potf_in_combat_attack = unit_leader naval_has_potf_in_combat_defense = unit_leader + naval_heavy_gun_hit_chance_factor = unit_leader naval_hit_chance = unit_leader naval_invasion_penalty = unit_leader naval_invasion_prep_speed = unit_leader + naval_light_gun_hit_chance_factor = unit_leader naval_morale = unit_leader naval_morale_factor = unit_leader naval_retreat_chance = unit_leader @@ -806,6 +905,8 @@ modifiers = { naval_speed_factor = unit_leader naval_strike = unit_leader naval_torpedo_cooldown_factor = unit_leader + naval_torpedo_damage_reduction_factor = unit_leader + naval_torpedo_enemy_critical_chance_factor = unit_leader naval_torpedo_hit_chance_factor = unit_leader naval_torpedo_reveal_chance_factor = unit_leader naval_torpedo_screen_penetration_factor = unit_leader @@ -842,6 +943,7 @@ modifiers = { paradrop_organization_factor = unit_leader paratrooper_aa_defense = unit_leader paratrooper_count_per_plane = unit_leader + paratrooper_weight_factor = unit_leader port_strike = unit_leader positioning = unit_leader promote_cost_factor = unit_leader @@ -859,13 +961,17 @@ modifiers = { unit_leader_as_advisor_cp_cost_factor = unit_leader wounded_chance_factor = unit_leader - # war_production + # war_production + cic_construction_boost = war_production + cic_construction_boost_factor = war_production civilian_factory_use = war_production conscription = war_production conscription_factor = war_production + consumer_goods_expected_value = war_production consumer_goods_factor = war_production conversion_cost_civ_to_mil_factor = war_production conversion_cost_mil_to_civ_factor = war_production + enemy_local_supplies = war_production equipment_conversion_speed = war_production exiled_government_weekly_manpower = war_production faction_trade_opinion_factor = war_production @@ -888,6 +994,15 @@ modifiers = { local_supplies = war_production local_supplies_for_controller = war_production min_export = war_production + military_industrial_organization_design_team_assign_cost = war_production + military_industrial_organization_design_team_change_cost = war_production + military_industrial_organization_funds_gain = war_production + military_industrial_organization_industrial_manufacturer_assign_cost = war_production + military_industrial_organization_policy_cooldown = war_production + military_industrial_organization_policy_cost = war_production + military_industrial_organization_research_bonus = war_production + military_industrial_organization_size_up_requirement = war_production + military_industrial_organization_task_capacity = war_production minimum_training_level = war_production mobilization_speed = war_production monthly_population = war_production @@ -908,7 +1023,7 @@ modifiers = { weekly_manpower = war_production - ### THE FOLLOWING MODIFERS DO NOT PRESENT IN MD DOC (NSB patch) + ### THE FOLLOWING MODIFERS DO NOT PRESENT IN MD DOC (NSB patch) air_advisor_cost_factor = country air_advisor_cost_factor = country @@ -1015,3 +1130,990 @@ modifiers = { military_industrial_organization_policy_cost = military_industrial_organization military_industrial_organization_policy_cooldown = military_industrial_organization } + +### These arrays are used in variables (modifier@modifier, unit_modifier@modifier and leader_modifier@modifier), they are autogenerated by .py file in tests. Don't edit manualy +enums = { + enum[general_modifiers_enum] = { + annex_cost_factor + army_armor_attack_factor + army_armor_speed_factor + army_artillery_attack_factor + army_attack_against_major_factor + army_attack_against_minor_factor + army_attack_factor + army_core_attack_factor + army_infantry_attack_factor + army_morale + army_morale_factor + army_org + army_org_factor + attrition + attrition_for_controller + breakthrough_factor + carrier_capacity_penalty_reduction + carrier_traffic + cavalry_attack_factor + combat_width_factor + convoy_raiding_efficiency_factor + coordination_bonus + decryption + decryption_factor + enemy_declare_war_tension + enemy_justify_war_goal_time + fighter_sortie_efficiency + ground_attack + ground_attack_factor + heat_attrition + heat_attrition_factor + justify_war_goal_time + justify_war_goal_when_in_major_war_time + land_night_attack + max_planning + max_planning_factor + max_training + mechanized_attack_factor + motorized_attack_factor + naval_critical_score_chance_factor + naval_damage_factor + naval_enemy_fleet_size_ratio_penalty_factor + naval_enemy_positioning_in_initial_attack + naval_has_potf_in_combat_attack + naval_has_potf_in_combat_defense + naval_hit_chance + naval_invasion_planning_bonus_speed + naval_night_attack + naval_strike + naval_torpedo_cooldown_factor + naval_torpedo_hit_chance_factor + naval_torpedo_screen_penetration_factor + navy_capital_ship_attack_factor + navy_carrier_air_agility_factor + navy_carrier_air_attack_factor + navy_carrier_air_targetting_factor + navy_screen_attack_factor + navy_submarine_attack_factor + no_supply_grace + offence + org_loss_when_moving + out_of_supply_factor + planning_speed + pocket_penalty + port_strike + rocket_attack_factor + sortie_efficiency + special_forces_attack_factor + special_forces_no_supply_grace + special_forces_out_of_supply_factor + strike_force_movement_org_loss + submarine_attack + supply_combat_penalties_on_core_factor + supply_consumption_factor + training_time_factor + winter_attrition + winter_attrition_factor + ai_badass_factor + ai_call_ally_desire_factor + ai_desired_divisions_factor + ai_focus_aggressive_factor + ai_focus_aviation_factor + ai_focus_defense_factor + ai_focus_military_advancements_factor + ai_focus_military_equipment_factor + ai_focus_naval_air_factor + ai_focus_naval_factor + ai_focus_peaceful_factor + ai_focus_war_production_factor + ai_get_ally_desire_factor + ai_join_ally_desire_factor + ai_license_acceptance + ace_effectiveness_factor + air_accidents + air_accidents_factor + air_ace_bonuses_factor + air_ace_generation_chance_factor + air_advisor_cost_factor + air_agility_factor + air_attack_factor + air_bombing_targetting + air_carrier_night_penalty_reduction_factor + air_cas_efficiency + air_cas_present_factor + air_close_air_support_org_damage_factor + air_defence_factor + air_detection + air_escort_efficiency + air_fuel_consumption_factor + air_home_defence_factor + air_intercept_efficiency + air_interception_detect_factor + air_manpower_requirement_factor + air_maximum_speed_factor + air_mission_efficiency + air_mission_xp_gain_factor + air_nav_efficiency + air_night_penalty + air_power_projection_factor + air_range_factor + air_strategic_bomber_bombing_factor + air_strategic_bomber_defence_factor + air_strategic_bomber_night_penalty + air_superiority_detect_factor + air_superiority_efficiency + air_training_xp_gain_factor + air_untrained_pilots_penalty_factor + air_weather_penalty + air_wing_xp_loss_when_killed_factor + army_bonus_air_superiority_factor + carrier_night_traffic + enemy_army_bonus_air_superiority_factor + experience_gain_air + experience_gain_air_factor + ground_attack + ground_attack_factor + mines_planting_by_air_factor + mines_sweeping_by_air_factor + modifier_enemy_port_superiority_limit + naval_strike_agility_factor + naval_strike_attack_factor + naval_strike_targetting_factor + navy_weather_penalty + strategic_bomb_visibility + ground_attack_factor + paratrooper_aa_defense + autonomy_gain + autonomy_gain_global_factor + autonomy_gain_ll_to_overlord + autonomy_gain_ll_to_overlord_factor + autonomy_gain_ll_to_subject + autonomy_gain_ll_to_subject_factor + autonomy_gain_trade + autonomy_gain_trade_factor + autonomy_gain_warscore + autonomy_gain_warscore_factor + autonomy_manpower_share + can_master_build_for_us + cic_to_overlord_factor + extra_trade_to_overlord_factor + license_subject_master_purchase_cost + master_build_autonomy_factor + mic_to_overlord_factor + overlord_trade_cost_factor + subjects_autonomy_gain + agency_upgrade_time + air_doctrine_cost_factor + air_equipment_upgrade_xp_cost + air_volunteer_cap + airforce_intel_to_others + army_intel_to_others + assign_army_leader_cp_cost + assign_navy_leader_cp_cost + base_fuel_gain + base_fuel_gain_factor + choose_preferred_tactics_cost + cic_to_target_factor + civil_war_involvement_tension + civilian_factory_use + civilian_intel_to_others + command_abilities_cost_factor + command_power_gain + command_power_gain_mult + compliance_gain + compliance_growth + compliance_growth_on_our_occupied_states + conscription + conscription_factor + cic_construction_boost + cic_construction_boost_factor + consumer_goods_factor + consumer_goods_expected_value + conversion_cost_civ_to_mil_factor + conversion_cost_mil_to_civ_factor + critical_receive_chance + decryption + decryption_factor + defensive_war_stability_factor + disabled_ideas + encryption + encryption_factor + enemy_declare_war_tension + enemy_justify_war_goal_time + enemy_operative_capture_chance_factor + enemy_operative_detection_chance + enemy_operative_detection_chance_factor + enemy_operative_detection_chance_factor_over_occupied_tag + enemy_operative_detection_chance_over_occupied_tag + enemy_operative_forced_into_hiding_time_factor + enemy_operative_harmed_time_factor + enemy_operative_intel_extraction_rate + enemy_spy_negative_status_factor + embargo_threshold_factor + equipment_capture + equipment_capture_factor + equipment_conversion_speed + equipment_upgrade_xp_cost + exiled_government_weekly_manpower + experience_loss_factor + extra_trade_to_target_factor + faction_trade_opinion_factor + female_random_admiral_chance + female_random_army_leader_chance + female_random_country_leader_chance + female_random_operative_chance + floating_harbor_duration + floating_harbor_range + floating_harbor_supply + forced_surrender_limit + foreign_subversive_activites + fuel_cost + fuel_gain + fuel_gain_factor + fuel_gain_factor_from_states + fuel_gain_from_states + generate_wargoal_tension + generate_wargoal_tension_against + global_building_slots + global_building_slots_factor + guarantee_cost + guarantee_tension + improve_relations_maintain_cost_factor + industrial_capacity_dockyard + industrial_capacity_factory + industry_air_damage_factor + industry_free_repair_factor + industry_repair_factor + initiative_factor + intel_from_combat_factor + intel_network_gain + intel_network_gain_factor + join_faction_tension + justify_war_goal_time + justify_war_goal_when_in_major_war_time + land_doctrine_cost_factor + land_equipment_upgrade_xp_cost + land_reinforce_rate + lend_lease_tension + license_air_purchase_cost + license_anti_tank_eq_cost_factor + license_anti_tank_eq_production_speed_factor + license_anti_tank_eq_tech_difference_speed_factor + license_armor_purchase_cost + license_artillery_eq_cost_factor + license_artillery_eq_production_speed_factor + license_artillery_eq_tech_difference_speed_factor + license_infantry_eq_cost_factor + license_infantry_eq_production_speed_factor + license_infantry_eq_tech_difference_speed_factor + license_infantry_purchase_cost + license_light_tank_eq_cost_factor + license_light_tank_eq_production_speed_factor + license_light_tank_eq_tech_difference_speed_factor + license_naval_purchase_cost + license_production_speed + license_purchase_cost + license_tech_difference_speed + line_change_production_efficiency_factor + max_command_power + max_command_power_mult + max_fuel + max_fuel_building + max_fuel_factor + max_surrender_limit_offset + mic_to_target_factor + min_export + minimum_training_level + modifier_enemy_port_superiority_limit + monthly_population + naval_doctrine_cost_factor + naval_equipment_upgrade_xp_cost + navy_intel_to_others + navy_refit_ic_cost + navy_refit_speed + no_compliance_gain + nuclear_production + nuclear_production_factor + occupation_cost + offensive_war_stability_factor + opinion_gain_monthly + opinion_gain_monthly_factor + opinion_gain_monthly_same_ideology + opinion_gain_monthly_same_ideology_factor + own_operative_capture_chance_factor + own_operative_detection_chance + own_operative_detection_chance_factor + own_operative_forced_into_hiding_time_factor + own_operative_harmed_time_factor + own_operative_intel_extraction_rate + party_popularity_stability_factor + political_power_cost + political_power_factor + political_power_gain + production_factory_efficiency_gain_factor + production_factory_max_efficiency_factor + production_factory_start_efficiency_factor + production_lack_of_resource_penalty_factor + production_oil_factor + production_speed_buildings_factor + railway_gun_bombardment_factor + refit_ic_cost + refit_speed + repair_speed_factor + request_lease_tension + required_garrison_factor + research_sharing_per_country_bonus + research_sharing_per_country_bonus_factor + research_speed_factor + resistance_activity + resistance_damage_to_garrison + resistance_damage_to_garrison_on_our_occupied_states + resistance_decay + resistance_decay_on_our_occupied_states + resistance_garrison_penetration_chance + resistance_growth + resistance_growth_on_our_occupied_states + resistance_target + resistance_target_on_our_occupied_states + screening_without_screens + send_volunteer_divisions_required + send_volunteer_factor + send_volunteer_size + send_volunteers_tension + stability_factor + stability_weekly + stability_weekly_factor + starting_compliance + subversive_activites_upkeep + supply_factor + supply_node_range + surrender_limit + tech_air_damage_factor + terrain_trait_xp_gain_factor + trade_cost_for_target_factor + trade_opinion_factor + truck_attrition + truck_attrition_factor + unit_leader_as_advisor_cp_cost_factor + war_stability_factor + war_support_factor + war_support_weekly + war_support_weekly_factor + weekly_manpower + weekly_casualties_war_support + weekly_convoys_war_support + weekly_bombing_war_support + air_spirit_category_type_cost_factor + land_spirit_category_type_cost_factor + army_spirit_category_type_cost_factor + navy_spirit_category_type_cost_factor + armor_factor + army_armor_defence_factor + army_artillery_defence_factor + army_breakthrough_against_major_factor + army_breakthrough_against_minor_factor + army_core_defence_factor + army_defence_against_major_factor + army_defence_against_minor_factor + army_defence_factor + army_infantry_defence_factor + army_morale + army_morale_factor + army_org + army_org_factor + attrition + attrition_for_controller + cavalry_defence_factor + convoy_escort_efficiency + convoy_retreat_speed + defence + dig_in_speed + dig_in_speed_factor + dont_lose_dig_in_on_attack + encryption + encryption_factor + guarantee_tension + local_intel_to_enemies + max_dig_in + max_dig_in_factor + mechanized_defence_factor + motorized_defence_factor + naval_retreat_chance + naval_retreat_chance_after_initial_combat + naval_retreat_speed + naval_retreat_speed_after_initial_combat + navy_capital_ship_defence_factor + navy_screen_defence_factor + navy_submarine_defence_factor + navy_submarine_detection_factor + puppet_cost_factor + recon_factor + recon_factor_while_entrenched + send_volunteers_tension + special_forces_defence_factor + static_anti_air_damage_factor + static_anti_air_hit_chance_factor + sub_retreat_speed + supply_consumption_factor + terrain_penalty_reduction + dockyard_donations + exile_manpower_factor + industrial_factory_donations + legitimacy_daily + legitimacy_gain_factor + military_factory_donations + targeted_legitimacy_daily + airforce_intel_decryption_bonus + airforce_intel_factor + army_intel_decryption_bonus + army_intel_factor + boost_ideology_mission_factor + boost_resistance_factor + civilian_intel_decryption_bonus + civilian_intel_factor + commando_trait_chance_factor + control_trade_mission_factor + crypto_department_enabled + crypto_strength + decryption_power + decryption_power_factor + defense_impact_on_blueprint_stealing + diplomatic_pressure_mission_factor + enemy_operative_recruitment_chance + female_random_operative_chance + intel_from_operatives_factor + intel_network_gain + intel_network_gain_factor + intelligence_agency_defense + navy_intel_decryption_bonus + navy_intel_factor + new_operative_slot_bonus + occupied_operative_recruitment_chance + operative_death_on_capture_chance + operative_slot + propaganda_mission_factor + root_out_resistance_effectiveness_factor + target_sabotage_factor + experience_gain_army + experience_gain_army_factor + experience_gain_army_unit + experience_gain_army_unit_factor + experience_gain_factor + experience_gain_navy + experience_gain_navy_factor + experience_gain_navy_unit + experience_gain_navy_unit_factor + research_speed_factor + amphibious_invasion + amphibious_invasion_defence + assign_navy_leader_cp_cost + carrier_capacity_penalty_reduction + carrier_traffic + convoy_escort_efficiency + convoy_raiding_efficiency_factor + convoy_retreat_speed + critical_receive_chance + experience_gain_navy + experience_gain_navy_factor + experience_gain_navy_unit + experience_gain_navy_unit_factor + female_random_admiral_chance + fighter_sortie_efficiency + invasion_preparation + mines_planting_by_fleets_factor + mines_sweeping_by_fleets_factor + naval_accidents_chance + naval_attrition + naval_coordination + naval_critical_effect_factor + naval_critical_score_chance_factor + naval_damage_factor + naval_defense_factor + naval_detection + naval_enemy_fleet_size_ratio_penalty_factor + naval_enemy_positioning_in_initial_attack + naval_enemy_retreat_chance + naval_has_potf_in_combat_attack + naval_has_potf_in_combat_defense + naval_hit_chance + naval_invasion_capacity + naval_invasion_penalty + naval_mine_hit_chance + naval_mines_damage_factor + naval_mines_effect_reduction + naval_morale + naval_morale_factor + naval_night_attack + naval_retreat_chance + naval_retreat_chance_after_initial_combat + naval_retreat_speed + naval_retreat_speed_after_initial_combat + naval_speed_factor + naval_strike + naval_torpedo_cooldown_factor + naval_torpedo_hit_chance_factor + naval_torpedo_reveal_chance_factor + naval_torpedo_screen_penetration_factor + navy_advisor_cost_factor + navy_anti_air_attack + navy_anti_air_attack_factor + navy_capital_ship_attack_factor + navy_capital_ship_defence_factor + navy_carrier_air_agility_factor + navy_carrier_air_attack_factor + navy_carrier_air_targetting_factor + navy_casualty_on_hit + navy_casualty_on_sink + navy_fuel_consumption_factor + navy_max_range + navy_max_range_factor + navy_org + navy_org_factor + navy_screen_attack_factor + navy_screen_defence_factor + navy_submarine_attack_factor + navy_submarine_defence_factor + navy_submarine_detection_factor + navy_visibility + night_spotting_chance + port_strike + positioning + repair_speed_factor + screening_efficiency + screening_without_screens + ships_at_battle_start + sortie_efficiency + spotting_chance + strike_force_movement_org_loss + sub_retreat_speed + submarine_attack + terrain_trait_xp_gain_factor + transport_capacity + annex_cost_factor + puppet_cost_factor + drift_defence_factor + guarantee_cost + master_ideology_drift + power_balance_weekly + army_speed_factor_for_controller + compliance_gain + compliance_growth + compliance_growth_on_our_occupied_states + disable_strategic_redeployment + disable_strategic_redeployment_for_controller + enemy_army_speed_factor + enemy_attrition + enemy_intel_network_gain_factor_over_occupied_tag + enemy_local_supplies + enemy_spy_negative_status_factor + enemy_truck_attrition_factor + equipment_capture_for_controller + intel_network_gain + intel_network_gain_factor + local_building_slots + local_building_slots_factor + local_factories + local_factory_sabotage + local_intel_to_enemies + local_manpower + local_non_core_manpower + local_non_core_supply_impact_factor + local_resources + local_resources_factor + local_supplies + local_supplies_for_controller + local_supply_impact_factor + mobilization_speed + no_compliance_gain + non_core_manpower + recruitable_population + recruitable_population_factor + required_garrison_factor + resistance_activity + resistance_damage_to_garrison + resistance_damage_to_garrison_on_our_occupied_states + resistance_decay + resistance_decay_on_our_occupied_states + resistance_garrison_penetration_chance + resistance_growth + resistance_growth_on_our_occupied_states + resistance_target + resistance_target_on_our_occupied_states + starting_compliance + state_production_speed_buildings_factor + state_repair_speed_air_base_factor + state_repair_speed_arms_factory_factor + state_repair_speed_industrial_complex_factor + state_repair_speed_infrastructure_factor + state_resources_factor + supply_factor + truck_attrition + truck_attrition_factor + civilian_factory_use + conscription + conscription_factor + consumer_goods_factor + conversion_cost_civ_to_mil_factor + conversion_cost_mil_to_civ_factor + equipment_conversion_speed + exiled_government_weekly_manpower + faction_trade_opinion_factor + global_building_slots + global_building_slots_factor + industrial_capacity_dockyard + industrial_capacity_factory + industry_air_damage_factor + industry_free_repair_factor + industry_repair_factor + land_reinforce_rate + line_change_production_efficiency_factor + local_building_slots + local_building_slots_factor + local_factories + local_manpower + local_non_core_manpower + local_resources + local_resources_factor + local_supplies + local_supplies_for_controller + min_export + minimum_training_level + mobilization_speed + monthly_population + non_core_manpower + production_factory_efficiency_gain_factor + production_factory_max_efficiency_factor + production_factory_start_efficiency_factor + production_lack_of_resource_penalty_factor + production_oil_factor + production_speed_buildings_factor + special_forces_training_time_factor + state_production_speed_buildings_factor + state_resources_factor + tech_air_damage_factor + trade_opinion_factor + training_time_army + training_time_army_factor + weekly_manpower + air_advisor_cost_factor + air_advisor_cost_factor + air_carrier_night_penalty_reduction_factor + air_chief_cost_factor + air_doctrine_cost_factor + air_home_defence_factor + air_power_projection_factor + air_untrained_pilots_penalty_factor + air_wing_xp_loss_when_killed_factor + aircraft_manufacturer_cost_factor + army_attack_against_major_factor + army_attack_speed_factor + army_chief_cost_factor + army_strength_factor + army_strength_factor + choose_preferred_tactics_cost + command_abilities_cost_factor + command_cap + coordination_bonus + economy_cost_factor + exiled_government_weekly_manpower + high_command_cost_factor + industrial_concern_cost_factor + intel_from_combat_factor + land_doctrine_cost_factor + materiel_manufacturer_cost_factor + materiel_manufacturer_cost_factor + mobilization_laws_cost_factor + naval_doctrine_cost_factor + naval_invasion_planning_bonus_speed + naval_manufacturer_cost_factor + naval_night_attack + naval_retreat_chance_after_initial_combat + naval_retreat_speed_after_initial_combat + navy_chief_cost_factor + navy_weather_penalty + night_spotting_chance + org_loss_at_low_org_factor + party_popularity_stability_factor + political_advisor_cost_factor + railway_gun_bombardment_factor + screening_without_screens + supply_combat_penalties_on_core_factor + tank_manufacturer_cost_factor + terrain_trait_xp_gain_factor + theorist_cost_factor + trade_laws_cost_factor + unit_leader_as_advisor_cp_cost_factor + cat_mobile_warfare_cost_factor + cat_superior_firepower_cost_factor + cat_grand_battle_plan_cost_factor + cat_mass_assault_cost_factor + cat_strategic_destruction_cost_factor + cat_battlefield_support_cost_factor + cat_operational_integrity_cost_factor + cat_base_strike_cost_factor + cat_fleet_in_being_cost_factor + cat_trade_interdiction_cost_factor + army_leader_start_level + navy_leader_start_level + army_leader_cost_factor + navy_leader_cost_factor + military_leader_cost_factor + army_leader_start_attack_level + army_leader_start_defense_level + army_leader_start_logistics_level + army_leader_start_planning_level + navy_leader_start_attack_level + navy_leader_start_coordination_level + navy_leader_start_defense_level + navy_leader_start_maneuvering_level + army_attack_speed_factor + supply_factor + truck_attrition_factor + attrition_for_controller + enemy_operative_detection_chance + enemy_operative_detection_chance_over_occupied_tag + operation_risk + operation_cost + operation_outcome + _risk + _cost + _outcome + operation_infiltrate_risk + operation_infiltrate_cost + operation_infiltrate_outcome + operation_steal_tech_risk + operation_steal_tech_cost + operation_steal_tech_outcome + target_sabotage_risk + target_sabotage_cost + target_sabotage_outcome + military_industrial_organization_research_bonus + military_industrial_organization_design_team_assign_cost + military_industrial_organization_design_team_change_cost + military_industrial_organization_industrial_manufacturer_assign_cost + military_industrial_organization_task_capacity + military_industrial_organization_size_up_requirement + military_industrial_organization_funds_gain + military_industrial_organization_policy_cost + military_industrial_organization_policy_cooldown + } + enum[leader_modifiers_enum] = { + amphibious_invasion + amphibious_invasion_defence + army_leader_cost_factor + army_leader_start_attack_level + army_leader_start_defense_level + army_leader_start_level + army_leader_start_logistics_level + army_leader_start_planning_level + cannot_use_abilities + carrier_capacity_penalty_reduction + carrier_traffic + convoy_escort_efficiency + convoy_raiding_efficiency_factor + convoy_retreat_speed + critical_receive_chance + enemy_operative_capture_chance_factor + enemy_operative_detection_chance + enemy_operative_detection_chance_factor + enemy_operative_detection_chance_factor_over_occupied_tag + enemy_operative_detection_chance_over_occupied_tag + enemy_operative_forced_into_hiding_time_factor + enemy_operative_harmed_time_factor + enemy_operative_intel_extraction_rate + exiled_divisions_attack_factor + exiled_divisions_defense_factor + experience_gain_factor + experience_gain_navy + experience_gain_navy_factor + experience_gain_navy_unit + experience_gain_navy_unit_factor + fighter_sortie_efficiency + fortification_collateral_chance + fortification_damage + initiative_factor + intel_network_gain + intel_network_gain_factor + invasion_preparation + max_army_group_size + military_leader_cost_factor + naval_coordination + naval_critical_effect_factor + naval_critical_score_chance_factor + naval_damage_factor + naval_defense_factor + naval_detection + naval_enemy_fleet_size_ratio_penalty_factor + naval_enemy_positioning_in_initial_attack + naval_enemy_retreat_chance + naval_has_potf_in_combat_attack + naval_has_potf_in_combat_defense + naval_hit_chance + naval_invasion_penalty + naval_invasion_prep_speed + naval_morale + naval_morale_factor + naval_retreat_chance + naval_retreat_chance_after_initial_combat + naval_retreat_speed + naval_retreat_speed_after_initial_combat + naval_speed_factor + naval_strike + naval_torpedo_cooldown_factor + naval_torpedo_hit_chance_factor + naval_torpedo_reveal_chance_factor + naval_torpedo_screen_penetration_factor + navy_anti_air_attack + navy_anti_air_attack_factor + navy_capital_ship_attack_factor + navy_capital_ship_defence_factor + navy_carrier_air_agility_factor + navy_carrier_air_attack_factor + navy_carrier_air_targetting_factor + navy_leader_cost_factor + navy_leader_start_attack_level + navy_leader_start_coordination_level + navy_leader_start_defense_level + navy_leader_start_level + navy_leader_start_maneuvering_level + navy_max_range + navy_max_range_factor + navy_org + navy_org_factor + navy_screen_attack_factor + navy_screen_defence_factor + navy_submarine_attack_factor + navy_submarine_defence_factor + navy_submarine_detection_factor + own_exiled_divisions_attack_factor + own_exiled_divisions_defense_factor + own_operative_capture_chance_factor + own_operative_detection_chance + own_operative_detection_chance_factor + own_operative_forced_into_hiding_time_factor + own_operative_harmed_time_factor + own_operative_intel_extraction_rate + paradrop_organization_factor + paratrooper_aa_defense + paratrooper_count_per_plane + port_strike + positioning + promote_cost_factor + reassignment_duration_factor + river_crossing_factor + screening_efficiency + ships_at_battle_start + sickness_chance + skill_bonus_factor + sortie_efficiency + spotting_chance + strike_force_movement_org_loss + sub_retreat_speed + submarine_attack + unit_leader_as_advisor_cp_cost_factor + wounded_chance_factor + } + enum[unit_modifiers_enum] = { + acclimatization_cold_climate_gain_factor + acclimatization_hot_climate_gain_factor + air_superiority_bonus_in_combat + armor_factor + army_advisor_cost_factor + army_armor_attack_factor + army_armor_defence_factor + army_armor_speed_factor + army_artillery_attack_factor + army_artillery_defence_factor + army_attack_against_major_factor + army_attack_against_minor_factor + army_attack_factor + army_attack_speed_factor + army_breakthrough_against_major_factor + army_breakthrough_against_minor_factor + army_core_attack_factor + army_core_defence_factor + army_defence_against_major_factor + army_defence_against_minor_factor + army_defence_factor + army_fuel_capacity_factor + army_fuel_consumption_factor + army_infantry_attack_factor + army_infantry_defence_factor + army_morale + army_morale_factor + army_org + army_org_factor + army_org_regain + army_speed_factor + army_speed_factor_for_controller + army_strength_factor + assign_army_leader_cp_cost + attack_bonus_against + attack_bonus_against_cores + attrition + attrition_for_controller + breakthrough_bonus_against + breakthrough_factor + cas_damage_reduction + cavalry_attack_factor + cavalry_defence_factor + combat_width_factor + coastal_bunker_effectiveness_factor + coordination_bonus + defence + defense_bonus_against + dig_in_speed + dig_in_speed_factor + disable_strategic_redeployment + disable_strategic_redeployment_for_controller + dont_lose_dig_in_on_attack + experience_gain_army + experience_gain_army_factor + experience_gain_army_unit + experience_gain_army_unit_factor + extra_marine_supply_grace + extra_paratrooper_supply_grace + female_random_army_leader_chance + heat_attrition + heat_attrition_factor + land_bunker_effectiveness_factor + land_night_attack + local_org_regain + max_commander_army_size + max_dig_in + max_dig_in_factor + max_planning + max_planning_factor + max_training + mechanized_attack_factor + mechanized_defence_factor + motorized_attack_factor + motorized_defence_factor + naval_invasion_planning_bonus_speed + no_supply_grace + offence + org_loss_at_low_org_factor + org_loss_when_moving + out_of_supply_factor + planning_speed + pocket_penalty + recon_factor + recon_factor_while_entrenched + rocket_attack_factor + shore_bombardment_bonus + special_forces_attack_factor + special_forces_cap + special_forces_defence_factor + special_forces_min + special_forces_no_supply_grace + special_forces_out_of_supply_factor + special_forces_training_time_factor + supply_combat_penalties_on_core_factor + supply_consumption_factor + terrain_penalty_reduction + terrain_trait_xp_gain_factor + training_time_army + training_time_army_factor + training_time_factor + unit_upkeep_attrition_factor + winter_attrition + winter_attrition_factor + } +} diff --git a/Config/variables.cwt b/Config/variables.cwt index d18fde14..64400e5d 100644 --- a/Config/variables.cwt +++ b/Config/variables.cwt @@ -260,12 +260,6 @@ values = { ### Total deployed manpower of country in thousands. deployed_total_manpower_k - ### A modifier stored in country scope. - modifier@enum[modifier] - - ### Custom modifier accessed via variable - modifier@ - ### Navy experience of a country. navy_experience @@ -680,10 +674,6 @@ values = { ### Infrastructure level in the state. infrastructure_level - ### Value of modifier stored in this state, uses target as modifier token. Example 123.modifier@local_manpower. - # TODO - modifier - ### Non damaged building level of a building with type, uses target as building type. example non_damaged_building_level@arms_factory. non_damaged_building_level@ @@ -726,52 +716,6 @@ values = { ### (Trigger) Uncapped_resistance_target temp variable can be used for getting resistance that that is not capped to 0-100 uncapped_resistance_target - ### State modifier variable - modifier@army_speed_factor_for_controller - modifier@compliance_gain - modifier@compliance_growth - modifier@compliance_growth_on_our_occupied_states - modifier@enemy_army_speed_factor - modifier@enemy_attrition - modifier@enemy_intel_network_gain_factor_over_occupied_tag - modifier@enemy_local_supplies - modifier@enemy_spy_negative_status_factor - modifier@enemy_truck_attrition_factor - modifier@equipment_capture_for_controller - modifier@intel_network_gain - modifier@intel_network_gain_factor - modifier@local_building_slots - modifier@local_building_slots_factor - modifier@local_factories - modifier@local_factory_sabotage - modifier@local_intel_to_enemies - modifier@local_manpower - modifier@local_non_core_manpower - modifier@local_non_core_supply_impact_factor - modifier@local_resources - modifier@local_resources_factor - modifier@local_supplies - modifier@local_supplies_for_controller - modifier@local_supply_impact_factor - modifier@mobilization_speed - modifier@non_core_manpower - modifier@recruitable_population - modifier@recruitable_population_factor - modifier@required_garrison_factor - modifier@resistance_activity - modifier@resistance_damage_to_garrison - modifier@resistance_decay - modifier@resistance_garrison_penetration_chance - modifier@resistance_growth - modifier@resistance_target - modifier@starting_compliance - modifier@state_production_speed_buildings_factor - modifier@state_repair_speed_infrastructure_factor - modifier@state_resources_factor - modifier@supply_factor - modifier@truck_attrition - modifier@truck_attrition_factor - ### Occupier tag occupier @@ -821,11 +765,6 @@ values = { ### Rate at which intel is extracted from this operative by an enemy country. intel_yield_factor_on_capture - # TODO: - ### Value of a modifier stored in leader modifier, modifier token is defined in target. Example leader_modifier@navy_max_range. - leader_modifier - leader_modifier@wounded_chance_factor - ### Logistics level of the leader. logistics_level @@ -962,14 +901,9 @@ values = { ### Skill level of the leader. skill_level - # TODO: ### Sum of terrain modifiers of each army's location, terrain type is defined in target. Example sum_unit_terrain_modifier@sickness_chance. sum_unit_terrain_modifier@enum[terrain_modifiers] - # TODO: - ### Value of a modifier stored in unit modifier, modifier token is defined in target. Example unit_modifier@army_attack_factor. - unit_modifier - ### Ratio of units that are ready for plan. unit_ratio_ready_for_plan @@ -1133,9 +1067,6 @@ values = { # ======================== # MIO VARIABLES # ======================== - ### Value of the modifier stored in the military industrial organization. ex: modifier@military_industrial_organization_research_bonus - modifier - ### Research bonus of the military industrial organization when assigned to a research slot research_bonus @@ -1156,5 +1087,21 @@ values = { ### Number of unused trait points of the military industrial organization number_of_unused_trait_points + + # ======================== + # MODIFIER VARIABLES + # ======================== + + ### Value of a modifier stored in country/state/mio modifier, modifier token is defined in target. Example modifier@weekly_manpower. + modifier@enum[general_modifiers_enum] + + ### Value of a modifier stored in unit modifier, modifier token is defined in target. Example unit_modifier@army_attack_factor. + unit_modifier@enum[unit_modifiers_enum] + + ### Value of a modifier stored in leader modifier, modifier token is defined in target. Example leader_modifier@navy_max_range. + leader_modifier@enum[leader_modifiers_enum] + + ### Custom modifier accessed via variable + modifier@ } } diff --git a/tests/test_check_missing_modifiers.py b/tests/test_check_missing_modifiers.py new file mode 100644 index 00000000..fd58384d --- /dev/null +++ b/tests/test_check_missing_modifiers.py @@ -0,0 +1,47 @@ +import json + +path_to_config = "Config\\modifiers.cwt" +path_to_documentation = "Config\\script_documentation.json" + +# FALSE_POSITIVES = [ +# 'career_profile_step_missiolini', +# 'reseed_division_commander', +# ] + +# 1 Extract effects from documentation +documentation_dict = json.load(open(path_to_documentation)) +documentation = [i for i in documentation_dict['modifiers']] +modifiers_dict = {} +results = [] + +for modifier in documentation: + # Static modifier + if "name" in modifier.keys(): + modifiers_dict[modifier['name']] = modifier['categories'] + # Dynamic modifier + elif "groupname" in modifier.keys(): + pass + +# # 2 Extract effects from config files +with open(path_to_config, 'r') as text_file: + config_file = text_file.read() + + for key, values in modifiers_dict.items(): + for value in values: + if f'{key} = {value}\n' not in config_file: + results.append(f'{key} = {value}') + +raise_error = False +if len(results) > 0: + # Strip and split each line into (key, value) tuples + key_value_pairs = [line.split(" = ") for line in results] + # Sort first by value and then by key, both alphabetically + sorted_pairs = sorted(key_value_pairs, key=lambda x: (x[1], x[0])) + for i in sorted_pairs: + print(f'- [] - {i[0]} = {i[1]}') + raise_error = True + if raise_error: + raise Exception("There are effects in documentation file that are not present in .cwt files") + +if not raise_error: + print("No missing effects found. Good job!") diff --git a/tests/test_generate_modifiers_enum.py b/tests/test_generate_modifiers_enum.py new file mode 100644 index 00000000..bf8ee342 --- /dev/null +++ b/tests/test_generate_modifiers_enum.py @@ -0,0 +1,41 @@ +import re + + +path_to_modifiers = "Config\\modifiers.cwt" + +with open(path_to_modifiers, 'r') as text_file: + config_file = text_file.read() + modifiers = re.findall(r'\t([^ #]+) = (\w.*)', config_file) + + general_modifiers = [] + leader_modifiers = [] + unit_modifiers = [] + + for i in modifiers: + mod = i[0] + category = i[1] + + if category == 'unit_leader': + leader_modifiers.append(mod) + + elif category == 'army': + unit_modifiers.append(mod) + + else: + general_modifiers.append(mod) + + general_modifiers_enum = re.findall(r'\tenum\[general_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_general_modifiers_enum = '\tenum[general_modifiers_enum] = {\n\t\t' + "\n\t\t".join(general_modifiers) + '\n\t}' + new_config_file = config_file.replace(general_modifiers_enum, new_general_modifiers_enum) + + leader_modifiers_enum = re.findall(r'\tenum\[leader_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_leader_modifiers_enum = '\tenum[leader_modifiers_enum] = {\n\t\t' + "\n\t\t".join(leader_modifiers) + '\n\t}' + new_config_file = new_config_file.replace(leader_modifiers_enum, new_leader_modifiers_enum) + + unit_modifiers_enum = re.findall(r'\tenum\[unit_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_unit_modifiers_enum = '\tenum[unit_modifiers_enum] = {\n\t\t' + "\n\t\t".join(unit_modifiers) + '\n\t}' + new_config_file = new_config_file.replace(unit_modifiers_enum, new_unit_modifiers_enum) + + +with open(path_to_modifiers, 'w') as text_file_write: + text_file_write.write(new_config_file) From 075412d0d98e2186e004603cf5f0e882a5f964a6 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 3 Sep 2024 23:39:20 +0400 Subject: [PATCH 12/73] Update modifier enums --- Config/modifiers.cwt | 115 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/Config/modifiers.cwt b/Config/modifiers.cwt index db9195d2..6378e0a4 100644 --- a/Config/modifiers.cwt +++ b/Config/modifiers.cwt @@ -1152,12 +1152,14 @@ enums = { breakthrough_factor carrier_capacity_penalty_reduction carrier_traffic + carrier_sortie_hours_delay cavalry_attack_factor combat_width_factor convoy_raiding_efficiency_factor coordination_bonus decryption decryption_factor + enemy_attrition enemy_declare_war_tension enemy_justify_war_goal_time fighter_sortie_efficiency @@ -1179,8 +1181,10 @@ enums = { naval_enemy_positioning_in_initial_attack naval_has_potf_in_combat_attack naval_has_potf_in_combat_defense + naval_heavy_gun_hit_chance_factor naval_hit_chance naval_invasion_planning_bonus_speed + naval_light_gun_hit_chance_factor naval_night_attack naval_strike naval_torpedo_cooldown_factor @@ -1299,6 +1303,7 @@ enums = { mic_to_overlord_factor overlord_trade_cost_factor subjects_autonomy_gain + additional_brigade_column_size agency_upgrade_time air_doctrine_cost_factor air_equipment_upgrade_xp_cost @@ -1314,6 +1319,7 @@ enums = { civil_war_involvement_tension civilian_factory_use civilian_intel_to_others + coastal_bunker_effectiveness_factor command_abilities_cost_factor command_power_gain command_power_gain_mult @@ -1346,6 +1352,7 @@ enums = { enemy_operative_harmed_time_factor enemy_operative_intel_extraction_rate enemy_spy_negative_status_factor + embargo_cost_factor embargo_threshold_factor equipment_capture equipment_capture_factor @@ -1355,10 +1362,12 @@ enums = { experience_loss_factor extra_trade_to_target_factor faction_trade_opinion_factor + female_divisional_commander_chance female_random_admiral_chance female_random_army_leader_chance female_random_country_leader_chance female_random_operative_chance + field_officer_promotion_penalty floating_harbor_duration floating_harbor_range floating_harbor_supply @@ -1373,6 +1382,7 @@ enums = { generate_wargoal_tension_against global_building_slots global_building_slots_factor + grant_medal_cost_factor guarantee_cost guarantee_tension improve_relations_maintain_cost_factor @@ -1388,10 +1398,12 @@ enums = { join_faction_tension justify_war_goal_time justify_war_goal_when_in_major_war_time + land_bunker_effectiveness_factor land_doctrine_cost_factor land_equipment_upgrade_xp_cost land_reinforce_rate lend_lease_tension + lend_lease_tension_with_overlord license_air_purchase_cost license_anti_tank_eq_cost_factor license_anti_tank_eq_production_speed_factor @@ -1443,10 +1455,15 @@ enums = { own_operative_forced_into_hiding_time_factor own_operative_harmed_time_factor own_operative_intel_extraction_rate + paradrop_organization_factor + paratrooper_aa_defense + paratrooper_weight_factor party_popularity_stability_factor political_power_cost political_power_factor political_power_gain + power_balance_daily + power_balance_weekly production_factory_efficiency_gain_factor production_factory_max_efficiency_factor production_factory_start_efficiency_factor @@ -1529,6 +1546,7 @@ enums = { dont_lose_dig_in_on_attack encryption encryption_factor + enemy_attrition guarantee_tension local_intel_to_enemies max_dig_in @@ -1539,6 +1557,8 @@ enums = { naval_retreat_chance_after_initial_combat naval_retreat_speed naval_retreat_speed_after_initial_combat + naval_torpedo_damage_reduction_factor + naval_torpedo_enemy_critical_chance_factor navy_capital_ship_defence_factor navy_screen_defence_factor navy_submarine_defence_factor @@ -1605,6 +1625,7 @@ enums = { amphibious_invasion_defence assign_navy_leader_cp_cost carrier_capacity_penalty_reduction + carrier_sortie_hours_delay carrier_traffic convoy_escort_efficiency convoy_raiding_efficiency_factor @@ -1632,9 +1653,11 @@ enums = { naval_enemy_retreat_chance naval_has_potf_in_combat_attack naval_has_potf_in_combat_defense + naval_heavy_gun_hit_chance_factor naval_hit_chance naval_invasion_capacity naval_invasion_penalty + naval_light_gun_hit_chance_factor naval_mine_hit_chance naval_mines_damage_factor naval_mines_effect_reduction @@ -1648,6 +1671,8 @@ enums = { naval_speed_factor naval_strike naval_torpedo_cooldown_factor + naval_torpedo_damage_reduction_factor + naval_torpedo_enemy_critical_chance_factor naval_torpedo_hit_chance_factor naval_torpedo_reveal_chance_factor naval_torpedo_screen_penetration_factor @@ -1687,12 +1712,17 @@ enums = { terrain_trait_xp_gain_factor transport_capacity annex_cost_factor + peace_score_ratio_transferred_to_overlord + peace_score_ratio_transferred_to_players puppet_cost_factor drift_defence_factor + embargo_cost_factor + embargo_threshold_factor guarantee_cost master_ideology_drift power_balance_weekly army_speed_factor_for_controller + coastal_bunker_effectiveness_factor compliance_gain compliance_growth compliance_growth_on_our_occupied_states @@ -1704,9 +1734,11 @@ enums = { enemy_local_supplies enemy_spy_negative_status_factor enemy_truck_attrition_factor + equipment_capture_factor_for_controller equipment_capture_for_controller intel_network_gain intel_network_gain_factor + land_bunker_effectiveness_factor local_building_slots local_building_slots_factor local_factories @@ -1746,12 +1778,16 @@ enums = { supply_factor truck_attrition truck_attrition_factor + cic_construction_boost + cic_construction_boost_factor civilian_factory_use conscription conscription_factor + consumer_goods_expected_value consumer_goods_factor conversion_cost_civ_to_mil_factor conversion_cost_mil_to_civ_factor + enemy_local_supplies equipment_conversion_speed exiled_government_weekly_manpower faction_trade_opinion_factor @@ -1774,6 +1810,15 @@ enums = { local_supplies local_supplies_for_controller min_export + military_industrial_organization_design_team_assign_cost + military_industrial_organization_design_team_change_cost + military_industrial_organization_funds_gain + military_industrial_organization_industrial_manufacturer_assign_cost + military_industrial_organization_policy_cooldown + military_industrial_organization_policy_cost + military_industrial_organization_research_bonus + military_industrial_organization_size_up_requirement + military_industrial_organization_task_capacity minimum_training_level mobilization_speed monthly_population @@ -1905,6 +1950,7 @@ enums = { army_leader_start_planning_level cannot_use_abilities carrier_capacity_penalty_reduction + carrier_sortie_hours_delay carrier_traffic convoy_escort_efficiency convoy_raiding_efficiency_factor @@ -1945,9 +1991,11 @@ enums = { naval_enemy_retreat_chance naval_has_potf_in_combat_attack naval_has_potf_in_combat_defense + naval_heavy_gun_hit_chance_factor naval_hit_chance naval_invasion_penalty naval_invasion_prep_speed + naval_light_gun_hit_chance_factor naval_morale naval_morale_factor naval_retreat_chance @@ -1957,6 +2005,8 @@ enums = { naval_speed_factor naval_strike naval_torpedo_cooldown_factor + naval_torpedo_damage_reduction_factor + naval_torpedo_enemy_critical_chance_factor naval_torpedo_hit_chance_factor naval_torpedo_reveal_chance_factor naval_torpedo_screen_penetration_factor @@ -1993,6 +2043,7 @@ enums = { paradrop_organization_factor paratrooper_aa_defense paratrooper_count_per_plane + paratrooper_weight_factor port_strike positioning promote_cost_factor @@ -2056,6 +2107,9 @@ enums = { cavalry_defence_factor combat_width_factor coastal_bunker_effectiveness_factor + command_abilities_cost_factor + command_power_gain + command_power_gain_mult coordination_bonus defence defense_bonus_against @@ -2064,6 +2118,8 @@ enums = { disable_strategic_redeployment disable_strategic_redeployment_for_controller dont_lose_dig_in_on_attack + enemy_army_speed_factor + enemy_attrition experience_gain_army experience_gain_army_factor experience_gain_army_unit @@ -2076,6 +2132,9 @@ enums = { land_bunker_effectiveness_factor land_night_attack local_org_regain + marines_special_forces_contribution_factor + max_command_power + max_command_power_mult max_commander_army_size max_dig_in max_dig_in_factor @@ -2084,14 +2143,69 @@ enums = { max_training mechanized_attack_factor mechanized_defence_factor + modifier_army_sub_unit_armored_car_attack_factor + modifier_army_sub_unit_armored_car_defence_factor + modifier_army_sub_unit_armored_car_max_org_factor + modifier_army_sub_unit_armored_car_recon_attack_factor + modifier_army_sub_unit_armored_car_recon_defence_factor + modifier_army_sub_unit_armored_car_recon_max_org_factor + modifier_army_sub_unit_armored_car_recon_speed_factor + modifier_army_sub_unit_armored_car_speed_factor + modifier_army_sub_unit_blackshirt_assault_battalion_attack_factor + modifier_army_sub_unit_blackshirt_assault_battalion_defence_factor + modifier_army_sub_unit_blackshirt_assault_battalion_max_org_factor + modifier_army_sub_unit_blackshirt_assault_battalion_speed_factor + modifier_army_sub_unit_camelry_attack_factor + modifier_army_sub_unit_camelry_defence_factor + modifier_army_sub_unit_camelry_speed_factor + modifier_army_sub_unit_category_special_forces_max_org_factor + modifier_army_sub_unit_cavalry_attack_factor + modifier_army_sub_unit_cavalry_defence_factor + modifier_army_sub_unit_cavalry_speed_factor + modifier_army_sub_unit_infantry_attack_factor + modifier_army_sub_unit_infantry_defence_factor + modifier_army_sub_unit_infantry_speed_factor + modifier_army_sub_unit_irregular_infantry_attack_factor + modifier_army_sub_unit_irregular_infantry_defence_factor + modifier_army_sub_unit_irregular_infantry_max_org_factor + modifier_army_sub_unit_irregular_infantry_speed_factor + modifier_army_sub_unit_light_tank_recon_attack_factor + modifier_army_sub_unit_light_tank_recon_defence_factor + modifier_army_sub_unit_light_tank_recon_max_org_factor + modifier_army_sub_unit_light_tank_recon_speed_factor + modifier_army_sub_unit_long_range_patrol_support_attack_factor + modifier_army_sub_unit_long_range_patrol_support_defence_factor + modifier_army_sub_unit_marines_attack_factor + modifier_army_sub_unit_marines_defence_factor + modifier_army_sub_unit_marines_max_org_factor + modifier_army_sub_unit_marines_speed_factor + modifier_army_sub_unit_military_police_attack_factor + modifier_army_sub_unit_military_police_defence_factor + modifier_army_sub_unit_military_police_max_org_factor + modifier_army_sub_unit_military_police_speed_factor + modifier_army_sub_unit_militia_attack_factor + modifier_army_sub_unit_militia_defence_factor + modifier_army_sub_unit_militia_max_org_factor + modifier_army_sub_unit_militia_org_recovery_cap_factor + modifier_army_sub_unit_militia_speed_factor + modifier_army_sub_unit_mountaineers_attack_factor + modifier_army_sub_unit_mountaineers_defence_factor + modifier_army_sub_unit_mountaineers_max_org_factor + modifier_army_sub_unit_mountaineers_speed_factor + modifier_army_sub_unit_paratrooper_attack_factor + modifier_army_sub_unit_paratrooper_defence_factor + modifier_army_sub_unit_paratrooper_max_org_factor + modifier_army_sub_unit_paratrooper_speed_factor motorized_attack_factor motorized_defence_factor + mountaineers_special_forces_contribution_factor naval_invasion_planning_bonus_speed no_supply_grace offence org_loss_at_low_org_factor org_loss_when_moving out_of_supply_factor + paratroopers_special_forces_contribution_factor planning_speed pocket_penalty recon_factor @@ -2100,6 +2214,7 @@ enums = { shore_bombardment_bonus special_forces_attack_factor special_forces_cap + special_forces_cap_flat special_forces_defence_factor special_forces_min special_forces_no_supply_grace From 9db52fc881eb1d53ba7ffac9e7fcbca813a5c7e2 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Thu, 5 Sep 2024 17:30:58 +0400 Subject: [PATCH 13/73] Format .py test files and add documentation --- tests/test_check_missing_effects.py | 73 +++++++++++-------- tests/test_check_missing_modifiers.py | 91 ++++++++++++----------- tests/test_check_missing_triggers.py | 73 +++++++++++-------- tests/test_check_missing_variables.py | 101 ++++++++++++++------------ tests/test_generate_modifiers_enum.py | 63 +++++++++------- 5 files changed, 225 insertions(+), 176 deletions(-) diff --git a/tests/test_check_missing_effects.py b/tests/test_check_missing_effects.py index ebc1857a..5d2930d8 100644 --- a/tests/test_check_missing_effects.py +++ b/tests/test_check_missing_effects.py @@ -10,35 +10,46 @@ 'reseed_division_commander', ] -# 1 Extract effects from documentation -documentation_dict = json.load(open(path_to_documentation)) -list_with_effects_documentation = [i for i in documentation_dict['effects'].keys()] - -# 2 Extract effects from config files -list_with_effects_config = [] -effect_pattern = r'alias\[effect:(.*?)\]' -for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): - with open(filename, 'r') as text_file: - config_file = text_file.read() - - if 'alias[effect:' in config_file: - pattern_matches = re.findall(effect_pattern, config_file) - if len(pattern_matches) > 0: - for match in pattern_matches: - list_with_effects_config.append(match) - -# 3 Perform a comparison -list_with_effects_config = set(list_with_effects_config) -results_missing_effects = [i for i in list_with_effects_documentation if i not in list_with_effects_config] - -raise_error = False -if len(results_missing_effects) > 0: - for i in results_missing_effects: - if [_ for _ in FALSE_POSITIVES if _ in i] == []: - print(f'- [] - {i}') - raise_error = True - if raise_error: - raise Exception("There are effects in documentation file that are not present in .cwt files") - -if not raise_error: + +def check_missing_effects(): + ''' + Validate .cwt files with effects against documentation file (script_documentation.json)\n + Effects are defined in .cwt files with 'alias[effect:xxx]' syntax\n + Script will print effects that are defined in documentation but not in .cwt files\n + Effects can be added to ignore by including them into FALSE_POSITIVES list + ''' + # 1 Extract effects from documentation + documentation_dict = json.load(open(path_to_documentation)) + list_with_effects_documentation = [i for i in documentation_dict['effects'].keys()] + + # 2 Extract effects from config files + list_with_effects_config = [] + effect_pattern = r'alias\[effect:(.*?)\]' + for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): + with open(filename, 'r') as text_file: + config_file = text_file.read() + + if 'alias[effect:' in config_file: + pattern_matches = re.findall(effect_pattern, config_file) + if len(pattern_matches) > 0: + for match in pattern_matches: + list_with_effects_config.append(match) + + # 3 Perform a comparison + list_with_effects_config = set(list_with_effects_config) + results_missing_effects = [i for i in list_with_effects_documentation if i not in list_with_effects_config] + + raise_error = False + if len(results_missing_effects) > 0: + for i in results_missing_effects: + if [_ for _ in FALSE_POSITIVES if _ in i] == []: + print(f'- [] - {i}') + raise_error = True + if raise_error: + raise Exception("There are effects in documentation file that are not present in .cwt files") + print("No missing effects found. Good job!") + + +if __name__ == '__main__': + check_missing_effects() diff --git a/tests/test_check_missing_modifiers.py b/tests/test_check_missing_modifiers.py index fd58384d..956d9e06 100644 --- a/tests/test_check_missing_modifiers.py +++ b/tests/test_check_missing_modifiers.py @@ -3,45 +3,52 @@ path_to_config = "Config\\modifiers.cwt" path_to_documentation = "Config\\script_documentation.json" -# FALSE_POSITIVES = [ -# 'career_profile_step_missiolini', -# 'reseed_division_commander', -# ] - -# 1 Extract effects from documentation -documentation_dict = json.load(open(path_to_documentation)) -documentation = [i for i in documentation_dict['modifiers']] -modifiers_dict = {} -results = [] - -for modifier in documentation: - # Static modifier - if "name" in modifier.keys(): - modifiers_dict[modifier['name']] = modifier['categories'] - # Dynamic modifier - elif "groupname" in modifier.keys(): - pass - -# # 2 Extract effects from config files -with open(path_to_config, 'r') as text_file: - config_file = text_file.read() - - for key, values in modifiers_dict.items(): - for value in values: - if f'{key} = {value}\n' not in config_file: - results.append(f'{key} = {value}') - -raise_error = False -if len(results) > 0: - # Strip and split each line into (key, value) tuples - key_value_pairs = [line.split(" = ") for line in results] - # Sort first by value and then by key, both alphabetically - sorted_pairs = sorted(key_value_pairs, key=lambda x: (x[1], x[0])) - for i in sorted_pairs: - print(f'- [] - {i[0]} = {i[1]}') - raise_error = True - if raise_error: - raise Exception("There are effects in documentation file that are not present in .cwt files") - -if not raise_error: - print("No missing effects found. Good job!") + +def check_missing_modifiers(): + ''' + Validate .cwt files with modifiers against documentation file (script_documentation.json)\n + Modifiers are defined in modifier.cwt files with 'xxx = category' syntax\n + Script will print modifiers that are defined in documentation but not in .cwt files\n + ''' + # 1 Extract static modifiers from documentation + documentation_dict = json.load(open(path_to_documentation)) + documentation = [i for i in documentation_dict['modifiers']] + modifiers_dict = {} + results = [] + + for modifier in documentation: + # Static modifier + if "name" in modifier.keys(): + modifiers_dict[modifier['name']] = modifier['categories'] + # Dynamic modifier + elif "groupname" in modifier.keys(): + pass + + # 2 Extract modifiers from config files + with open(path_to_config, 'r') as text_file: + config_file = text_file.read() + + # 3 Compare documentation and config + for key, values in modifiers_dict.items(): + for value in values: + if f'{key} = {value}\n' not in config_file: + results.append(f'{key} = {value}') + + # 4 Format the results + raise_error = False + if len(results) > 0: + # Strip and split each line into (key, value) tuples + key_value_pairs = [line.split(" = ") for line in results] + # Sort first by value and then by key, both alphabetically + sorted_pairs = sorted(key_value_pairs, key=lambda x: (x[1], x[0])) + for i in sorted_pairs: + print(f'- [] - {i[0]} = {i[1]}') + raise_error = True + if raise_error: + raise Exception("There are modifiers in documentation file that are not present in .cwt files") + + print("No missing modifiers found. Good job!") + + +if __name__ == '__main__': + check_missing_modifiers() diff --git a/tests/test_check_missing_triggers.py b/tests/test_check_missing_triggers.py index 198c0c1a..d93da120 100644 --- a/tests/test_check_missing_triggers.py +++ b/tests/test_check_missing_triggers.py @@ -12,35 +12,46 @@ 'ideology_support_trigger', ] -# 1 Extract triggers from documentation -documentation_dict = json.load(open(path_to_documentation)) -list_with_triggers_documentation = [i for i in documentation_dict['triggers'].keys()] - -# 2 Extract triggers from config files -list_with_triggers_config = [] -effect_pattern = r'alias\[trigger:(.*?)\]' -for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): - with open(filename, 'r') as text_file: - config_file = text_file.read() - - if 'alias[trigger:' in config_file: - pattern_matches = re.findall(effect_pattern, config_file) - if len(pattern_matches) > 0: - for match in pattern_matches: - list_with_triggers_config.append(match) - -# 3 Perform a comparison -list_with_triggers_config = set(list_with_triggers_config) -results_missing_triggers = [i for i in list_with_triggers_documentation if i not in list_with_triggers_config] - -raise_error = False -if len(results_missing_triggers) > 0: - for i in results_missing_triggers: - if [_ for _ in FALSE_POSITIVES if _ in i] == []: - print(f'- [] - {i}') - raise_error = True - if raise_error: - raise Exception("There are triggers in documentation file that are not present in .cwt files") - -if not raise_error: + +def check_missing_triggers(): + ''' + Validate .cwt files with triggers against documentation file (script_documentation.json)\n + Triggers are defined in .cwt files with 'alias[trigger:xxx]' syntax\n + Script will print triggers that are defined in documentation but not in .cwt files\n + Triggers can be added to ignore by including them into FALSE_POSITIVES list + ''' + # 1 Extract triggers from documentation + documentation_dict = json.load(open(path_to_documentation)) + list_with_triggers_documentation = [i for i in documentation_dict['triggers'].keys()] + + # 2 Extract triggers from config files + list_with_triggers_config = [] + effect_pattern = r'alias\[trigger:(.*?)\]' + for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): + with open(filename, 'r') as text_file: + config_file = text_file.read() + + if 'alias[trigger:' in config_file: + pattern_matches = re.findall(effect_pattern, config_file) + if len(pattern_matches) > 0: + for match in pattern_matches: + list_with_triggers_config.append(match) + + # 3 Perform a comparison + list_with_triggers_config = set(list_with_triggers_config) + results_missing_triggers = [i for i in list_with_triggers_documentation if i not in list_with_triggers_config] + + raise_error = False + if len(results_missing_triggers) > 0: + for i in results_missing_triggers: + if [_ for _ in FALSE_POSITIVES if _ in i] == []: + print(f'- [] - {i}') + raise_error = True + if raise_error: + raise Exception("There are triggers in documentation file that are not present in .cwt files") + print("No missing triggers found. Good job!") + + +if __name__ == '__main__': + check_missing_triggers() diff --git a/tests/test_check_missing_variables.py b/tests/test_check_missing_variables.py index dee2e6e9..874cfb84 100644 --- a/tests/test_check_missing_variables.py +++ b/tests/test_check_missing_variables.py @@ -5,48 +5,59 @@ path_to_config = "Config\\" path_to_documentation = "Config\\script_documentation.json" -# 1 Extract variables from documentation -documentation_dict = json.load(open(path_to_documentation)) -variables_dict_doc = {i: documentation_dict['dynamic_variables'][i].keys() for i in documentation_dict['dynamic_variables']} -variables_list_doc = [] -# Create a single list with all variables -for value in variables_dict_doc.values(): - for i in value: - variables_list_doc.append(i) - -# 2 Extract variables from config files -variables_list_config = [] -variable_block_pattern = r'value\[variable\] = \{.*?\}' -variable_pattern = r'\t\t([^#\n\t]+)' -for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): - with open(filename, 'r') as text_file: - config_file = text_file.read() - - if 'value[variable] = {' in config_file and 'values = {' in config_file: - variable_block = re.findall(variable_block_pattern, config_file, flags=re.DOTALL | re.MULTILINE)[0] - pattern_matches = re.findall(variable_pattern, variable_block) - if len(variable_block) > 0: - for match in pattern_matches: - variables_list_config.append(match) - -# 3 Perform a comparison -results_missing_variables = [] -for var in variables_list_doc: - var_encountered = False - # Check direct match - if var in variables_list_config: - var_encountered = True - continue - # Check if there is a variable with target - else: - for i in variables_list_config: - if i.startswith(f'{var}@'): - var_encountered = True - break - if var_encountered is False: - results_missing_variables.append(var) - -if len(results_missing_variables) > 0: - for i in results_missing_variables: - print(f'- [] - {i}') - raise Exception("There are variables in documentation file that are not present in .cwt files") + +def check_missing_variables(): + ''' + Validate .cwt files with variables against documentation file (script_documentation.json)\n + Variables are defined in .cwt files inside 'value[variable]' block\n + Script will print variables that are defined in documentation but not in .cwt files\n + ''' + # 1 Extract variables from documentation + documentation_dict = json.load(open(path_to_documentation)) + variables_dict_doc = {i: documentation_dict['dynamic_variables'][i].keys() for i in documentation_dict['dynamic_variables']} + variables_list_doc = [] + # Create a single list with all variables + for value in variables_dict_doc.values(): + for i in value: + variables_list_doc.append(i) + + # 2 Extract variables from config files + variables_list_config = [] + variable_block_pattern = r'value\[variable\] = \{.*?\}' + variable_pattern = r'\t\t([^#\n\t]+)' + for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): + with open(filename, 'r') as text_file: + config_file = text_file.read() + + if 'value[variable] = {' in config_file and 'values = {' in config_file: + variable_block = re.findall(variable_block_pattern, config_file, flags=re.DOTALL | re.MULTILINE)[0] + pattern_matches = re.findall(variable_pattern, variable_block) + if len(variable_block) > 0: + for match in pattern_matches: + variables_list_config.append(match) + + # 3 Perform a comparison + results_missing_variables = [] + for var in variables_list_doc: + var_encountered = False + # Check direct match + if var in variables_list_config: + var_encountered = True + continue + # Check if there is a variable with target + else: + for i in variables_list_config: + if i.startswith(f'{var}@'): + var_encountered = True + break + if var_encountered is False: + results_missing_variables.append(var) + + if len(results_missing_variables) > 0: + for i in results_missing_variables: + print(f'- [] - {i}') + raise Exception("There are variables in documentation file that are not present in .cwt files") + + +if __name__ == '__main__': + check_missing_variables() diff --git a/tests/test_generate_modifiers_enum.py b/tests/test_generate_modifiers_enum.py index bf8ee342..78480a0b 100644 --- a/tests/test_generate_modifiers_enum.py +++ b/tests/test_generate_modifiers_enum.py @@ -1,41 +1,50 @@ import re - path_to_modifiers = "Config\\modifiers.cwt" -with open(path_to_modifiers, 'r') as text_file: - config_file = text_file.read() - modifiers = re.findall(r'\t([^ #]+) = (\w.*)', config_file) - general_modifiers = [] - leader_modifiers = [] - unit_modifiers = [] +def generate_variables_enums(): + ''' + Extract modifiers from modifiers.cwt file and add them to enums based on their categories\n + Separate enums for unit_leader modifiers, unit modifiers and everything else\n + These enums are needed to add their support to modifier@modifier, leader_modifier@modifier and unit_modifier@modifier syntax\n + ''' + with open(path_to_modifiers, 'r') as text_file: + config_file = text_file.read() + modifiers = re.findall(r'\t([^ #]+) = (\w.*)', config_file) + + general_modifiers = [] + leader_modifiers = [] + unit_modifiers = [] + + for i in modifiers: + mod = i[0] + category = i[1] - for i in modifiers: - mod = i[0] - category = i[1] + if category == 'unit_leader': + leader_modifiers.append(mod) - if category == 'unit_leader': - leader_modifiers.append(mod) + elif category == 'army': + unit_modifiers.append(mod) - elif category == 'army': - unit_modifiers.append(mod) + else: + general_modifiers.append(mod) - else: - general_modifiers.append(mod) + general_modifiers_enum = re.findall(r'\tenum\[general_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_general_modifiers_enum = '\tenum[general_modifiers_enum] = {\n\t\t' + "\n\t\t".join(general_modifiers) + '\n\t}' + new_config_file = config_file.replace(general_modifiers_enum, new_general_modifiers_enum) - general_modifiers_enum = re.findall(r'\tenum\[general_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] - new_general_modifiers_enum = '\tenum[general_modifiers_enum] = {\n\t\t' + "\n\t\t".join(general_modifiers) + '\n\t}' - new_config_file = config_file.replace(general_modifiers_enum, new_general_modifiers_enum) + leader_modifiers_enum = re.findall(r'\tenum\[leader_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_leader_modifiers_enum = '\tenum[leader_modifiers_enum] = {\n\t\t' + "\n\t\t".join(leader_modifiers) + '\n\t}' + new_config_file = new_config_file.replace(leader_modifiers_enum, new_leader_modifiers_enum) - leader_modifiers_enum = re.findall(r'\tenum\[leader_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] - new_leader_modifiers_enum = '\tenum[leader_modifiers_enum] = {\n\t\t' + "\n\t\t".join(leader_modifiers) + '\n\t}' - new_config_file = new_config_file.replace(leader_modifiers_enum, new_leader_modifiers_enum) + unit_modifiers_enum = re.findall(r'\tenum\[unit_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] + new_unit_modifiers_enum = '\tenum[unit_modifiers_enum] = {\n\t\t' + "\n\t\t".join(unit_modifiers) + '\n\t}' + new_config_file = new_config_file.replace(unit_modifiers_enum, new_unit_modifiers_enum) - unit_modifiers_enum = re.findall(r'\tenum\[unit_modifiers_enum\] = \{.*?\}', config_file, flags=re.DOTALL | re.MULTILINE)[0] - new_unit_modifiers_enum = '\tenum[unit_modifiers_enum] = {\n\t\t' + "\n\t\t".join(unit_modifiers) + '\n\t}' - new_config_file = new_config_file.replace(unit_modifiers_enum, new_unit_modifiers_enum) + with open(path_to_modifiers, 'w') as text_file_write: + text_file_write.write(new_config_file) -with open(path_to_modifiers, 'w') as text_file_write: - text_file_write.write(new_config_file) +if __name__ == '__main__': + generate_variables_enums() From dc5b82756725543605489e6649cbc79f971feac4 Mon Sep 17 00:00:00 2001 From: AngriestBird Date: Mon, 30 Sep 2024 13:11:15 -0400 Subject: [PATCH 14/73] Fixed two unexpected tokens --- Config/common/scripted_guis.cwt | 4 ++++ Config/effects.cwt | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Config/common/scripted_guis.cwt b/Config/common/scripted_guis.cwt index a69901c4..1fe01911 100644 --- a/Config/common/scripted_guis.cwt +++ b/Config/common/scripted_guis.cwt @@ -58,6 +58,10 @@ scripted_gui = { ## cardinality = 0..1 parent_window_token = enum[parent_window_token] + ## cardinality = 0..1 + ### Define any scripted gui as the parent gui. This is more performant than using something like parent_window_token/parent_window_name for nested GUIs. + parent_scripted_gui = + ## cardinality = 0..1 ### Any GUI container name. Use only if parent_window_token doesn't have a corresponding token. parent_window_name = diff --git a/Config/effects.cwt b/Config/effects.cwt index 8d47e8dd..19df36a3 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -399,15 +399,19 @@ alias[effect:set_variable] = { tooltip = localisation } -### A random effect. +### A possible random effect that can occur. ## scope = any alias[effect:random] = { + ## cardinality = 1..2 chance = variable_field + ## cardinality = 1..2 + chance = int + alias_name[modifier_rule] = alias_match_left[modifier_rule] alias_name[effect] = alias_match_left[effect] } -### A random effect. +### A list of possible random effects to trigger in this effect. ## scope = any alias[effect:random_list] = { ## cardinality = 0..1 @@ -754,7 +758,7 @@ alias[effect:remove_ideas] = { enum[idea_name] ## cardinality = 0..inf value[advisor_token] - ## cardinality = 0..inf + ## cardinality = 0..inf value[variable] } @@ -2319,7 +2323,7 @@ alias[effect:set_war_support] = variable_field[0..1] ### Executes children effects on random unit leader that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = unit_leader alias[effect:random_unit_leader] = { ## cardinality = 0..1 limit = { From 60fbe1c7b48c315dc6752735c3beed2905bbe5d5 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Wed, 2 Oct 2024 20:54:51 +0400 Subject: [PATCH 15/73] Add some unmerged modifiers --- Config/modifiers.cwt | 6 ++++++ tests/test_check_missing_modifiers.py | 28 +++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/Config/modifiers.cwt b/Config/modifiers.cwt index 6378e0a4..f9efd08e 100644 --- a/Config/modifiers.cwt +++ b/Config/modifiers.cwt @@ -290,6 +290,7 @@ modifiers = { modifier_army_sub_unit_paratrooper_defence_factor = army modifier_army_sub_unit_paratrooper_max_org_factor = army modifier_army_sub_unit_paratrooper_speed_factor = army + module__design_cost_factor = army motorized_attack_factor = army motorized_defence_factor = army mountaineers_special_forces_contribution_factor = army @@ -347,6 +348,7 @@ modifiers = { subjects_autonomy_gain = autonomy # country + enum[equipment_bonus_type]_design_cost_factor = country additional_brigade_column_size = country agency_upgrade_time = country air_doctrine_cost_factor = country @@ -478,6 +480,7 @@ modifiers = { min_export = country minimum_training_level = country modifier_enemy_port_superiority_limit = country + module__design_cost_factor = army monthly_population = country naval_doctrine_cost_factor = country naval_equipment_upgrade_xp_cost = country @@ -514,6 +517,7 @@ modifiers = { production_lack_of_resource_penalty_factor = country production_oil_factor = country production_speed_buildings_factor = country + production_speed__factor = country railway_gun_bombardment_factor = country refit_ic_cost = country refit_speed = country @@ -694,6 +698,7 @@ modifiers = { invasion_preparation = naval mines_planting_by_fleets_factor = naval mines_sweeping_by_fleets_factor = naval + module__design_cost_factor = army naval_accidents_chance = naval naval_attrition = naval naval_coordination = naval @@ -773,6 +778,7 @@ modifiers = { puppet_cost_factor = peace # politics + _drift = politics drift_defence_factor = politics embargo_cost_factor = politics embargo_threshold_factor = politics diff --git a/tests/test_check_missing_modifiers.py b/tests/test_check_missing_modifiers.py index 956d9e06..a3235988 100644 --- a/tests/test_check_missing_modifiers.py +++ b/tests/test_check_missing_modifiers.py @@ -1,4 +1,5 @@ import json +import re path_to_config = "Config\\modifiers.cwt" path_to_documentation = "Config\\script_documentation.json" @@ -22,7 +23,7 @@ def check_missing_modifiers(): modifiers_dict[modifier['name']] = modifier['categories'] # Dynamic modifier elif "groupname" in modifier.keys(): - pass + modifiers_dict[modifier['groupname']] = modifier['categories'] # 2 Extract modifiers from config files with open(path_to_config, 'r') as text_file: @@ -31,7 +32,30 @@ def check_missing_modifiers(): # 3 Compare documentation and config for key, values in modifiers_dict.items(): for value in values: - if f'{key} = {value}\n' not in config_file: + # Dynamic modifier + if "<" in key: + # Modifier starts with the token + if key[0] == '<': + stripped_key = key[key.index('>')+1:] + if f'{stripped_key} = {value}\n' not in config_file: + results.append(f'{key} = {value}') + # Modifier ends with the token + elif key[-1] == '>': + stripped_key = key[:key.index('<')] + pattern = stripped_key + r'.*? = ' + value + pattern_matches = re.findall(pattern, config_file) + if pattern_matches == []: + results.append(f'{key} = {value}') + # Token is somewhere in the middle of the modifier + else: + splitted_key = key.split('<') + key1 = splitted_key[0] + key2 = splitted_key[1][splitted_key[1].index('>')+1:] + pattern = key1 + r'.*?' + key2 + r' = ' + value + pattern_matches = re.findall(pattern, config_file) + if pattern_matches == []: + results.append(f'{key} = {value}') + elif f'{key} = {value}\n' not in config_file: results.append(f'{key} = {value}') # 4 Format the results From 414b0516057694609b5dfeb078e5e22797c56f57 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:13:38 +0100 Subject: [PATCH 16/73] Adding new additions from GTD --- Config/common/ai_strategy.cwt | 88 +++- Config/common/buildings.cwt | 149 ++++++- Config/common/characters.cwt | 49 +++ Config/common/consolidated_ai.cwt | 140 +++---- Config/common/countries.cwt | 2 + Config/common/ideologies.cwt | 1 + Config/common/raids.cwt | 431 +++++++++++++++++++ Config/common/script_constants.cwt | 81 ++++ Config/common/special_projects.cwt | 581 ++++++++++++++++++++++++++ Config/common/traits.cwt | 42 ++ Config/effects_gtd.cwt | 473 +++++++++++++++++++++ Config/interface/gfx.cwt | 9 + Config/interface/gui.cwt | 69 ++- Config/modifier_categories.cwt | 6 + Config/modifiers.cwt | 168 ++++++++ Config/on_actions.cwt | 13 + Config/portraits.cwt | 2 + Config/scopes.cwt | 6 + Config/shared_enums.cwt | 6 + Config/temp_modifiers.cwt | 21 +- Config/triggers_gtd.cwt | 254 +++++++++++ Config/variables.cwt | 139 +++++- tests/test_check_missing_variables.py | 2 +- 23 files changed, 2600 insertions(+), 132 deletions(-) create mode 100644 Config/common/raids.cwt create mode 100644 Config/common/script_constants.cwt create mode 100644 Config/common/special_projects.cwt create mode 100644 Config/effects_gtd.cwt create mode 100644 Config/triggers_gtd.cwt diff --git a/Config/common/ai_strategy.cwt b/Config/common/ai_strategy.cwt index e746d560..fac887f4 100644 --- a/Config/common/ai_strategy.cwt +++ b/Config/common/ai_strategy.cwt @@ -119,15 +119,27 @@ alias[ai_strategy_rule:ai_strategy] = { alias[ai_strategy_rule:ai_strategy] = { type = enum[unit_strats] id = - id = enum[unit_types] + id = enum[equipment_category] id = value[ai_template_roles] id = value[ai_equipment_roles] value = int } + +alias[ai_strategy_rule:ai_strategy] = { + type = equipment_production_min_factories + id = enum[equipment_category] + value = int +} +alias[ai_strategy_rule:ai_strategy] = { + type = equipment_production_min_factories_archetype + id = + value = int +} alias[ai_strategy_rule:ai_strategy] = { type = enum[equipment_strats] id = - id = enum[unit_types] + id = enum[allowed_ai_type_planes] + id = enum[equipment_category] value = int } alias[ai_strategy_rule:ai_strategy] = { @@ -166,6 +178,11 @@ alias[ai_strategy_rule:ai_strategy] = { target = value = int } +alias[ai_strategy_rule:ai_strategy] = { + type = recruit_scientist + id = + value = int +} alias[ai_strategy_rule:ai_strategy] = { type = dont_join_wars_with id = enum[country_tags] @@ -202,6 +219,7 @@ alias[ai_strategy_rule:ai_strategy] = { alias[ai_strategy_rule:ai_strategy] = { type = enum[state_strats_with_id] id = + ## cardinality = 0..1 target = int value = int } @@ -356,6 +374,68 @@ alias[ai_strategy_rule:ai_strategy] = { value = int } +alias[ai_strategy_rule:ai_strategy] = { + type = force_concentration_front_factor + ### Target a specific country. Can specify multiple. + ## cardinality = 0..inf + tag = scope[country] + ### Target a state. Can specify multiple. + ## cardinality = 0..inf + state = + ### Target a strategic region. Can specify multiple. + ## cardinality = 0..inf + strategic_region = + ### Target a specific ai area. Can specify multiple. + area = + ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. + ## replace_scope = { this = country root = country from = country } + country_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ### # Trigger to check against a state. Scope is state. FROM scope is enemy country FROM.FROM scope is our country. + ## cardinality = 0..1 + ## replace_scope = { this = state from = country fromfrom = country } + state_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ### The strategy is enabled only if ratio of the front covered by this strategy's targets is greater than this ratio. + ratio = float + ### Factor for the normal priority. 40 means +40 %, -60 means -60 %. + value = int +} + +alias[ai_strategy_rule:ai_strategy] = { + type = force_concentration_target_weight + ### Target a specific country. Can specify multiple. + ## cardinality = 0..inf + tag = scope[country] + ### Target a state. Can specify multiple. + ## cardinality = 0..inf + state = + ### Target a strategic region. Can specify multiple. + ## cardinality = 0..inf + strategic_region = + ### Target a specific ai area. Can specify multiple. + area = + ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. + ## replace_scope = { this = country root = country from = country } + country_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ### # Trigger to check against a state. Scope is state. FROM scope is enemy country FROM.FROM scope is our country. + ## cardinality = 0..1 + ## replace_scope = { this = state from = country fromfrom = country } + state_trigger = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ### Factor for the normal priority. 40 means +40 %, -60 means -60 %. + value = int +} + enums = { enum[ai_diplo_strats] = { alliance @@ -373,6 +453,7 @@ enums = { dont_join_wars_with equipment_market_trade_desire force_defend_ally_borders + force_concentration_factor front_armor_score ignore ignore_claim @@ -422,6 +503,8 @@ enums = { wanted_supply_trains ai_wanted_divisions_factor equipment_market_spend_factories + force_concentration_factor + raid_target_country } enum[pp_strats] = { pp_spend_amount @@ -441,7 +524,6 @@ enums = { } enum[unit_strats] = { equipment_production_factor - equipment_production_min_factories template_prio unit_ratio } diff --git a/Config/common/buildings.cwt b/Config/common/buildings.cwt index dc045761..827a241c 100644 --- a/Config/common/buildings.cwt +++ b/Config/common/buildings.cwt @@ -9,25 +9,32 @@ types = { desc = "$_desc" } subtype[provincial] = { - provincial = yes - } - subtype[state] = { - provincial = no + level_cap = { + ## cardinality = 1..inf + province_max = scalar + } } subtype[state] = { } } + type[spawn_point] = { + path = "game/common/buildings" + skip_root_key = spawn_points + } } building = { base_cost = int ## cardinality = 0..1 + per_controlled_building_extra_cost = int + ## cardinality = 0..1 base_cost_conversion = int ## cardinality = 0..1 per_level_extra_cost = int ## cardinality = 0..1 - max_level = int + missing_tech_loc = single_alias_right[bindable_loc] + ## cardinality = 0..1 value = int @@ -40,7 +47,12 @@ building = { always_shown = bool ## cardinality = 0..1 has_destroyed_mesh = bool - + ## cardinality = 0..1 + dlc_allowed = { + ## cardinality = 0..1 + has_dlc = enum[dlc] + } + ## cardinality = 0..1 allied_build = bool ## cardinality = 0..1 @@ -48,13 +60,9 @@ building = { ## cardinality = 0..1 supply_node = bool - ## cardinality = 0..1 - shares_slots = bool ## cardinality = 0..1 infrastructure_construction_effect = bool ## cardinality = 0..1 - provincial = bool - ## cardinality = 0..1 damage_factor = float ## cardinality = 0..1 @@ -95,17 +103,128 @@ building = { rocket_launch_capacity = int ## cardinality = 0..1 air_defence = int + ## cardinality = 0..1 + gun_emplacement = yes + + # Yes is default + ## cardinality = 0..1 + is_buildable = bool + + # no is default + ## cardinality = 0..1 + only_display_if_exists = bool + # no is default + ## cardinality = 0..1 + need_supply = bool + # no is default + ## cardinality = 0..1 + need_detection = bool + + ## cardinality = 0..1 + detecting_intel_type = enum[intel_types] + + ## cardinality = 0..1 + show_modifier = yes + ## cardinality = 0..1 + fuel_silo = yes + + level_cap = { + ## cardinality = 0..1 + state_max = int + ## cardinality = 0..1 + province_max = int + ## cardinality = 0..1 + shares_slots = bool + ## cardinality = 0..1 + group_by = enum[building_group] + ## cardinality = 0..1 + exclusive_with = + } + ## cardinality = 0..1 + country_modifiers = { + ## cardinality = 0..1 + enable_for_controllers = { + ## cardinality = ~1..inf + enum[country_tags] + } + modifiers = { + ## cardinality = ~1..inf + alias_name[modifier] = alias_match_left[modifier] + } + } + + ## cardinality = 0..inf + local_resources_ = int - subtype[state] = { + ## cardinality = 0..1 + state_modifiers = { + ## cardinality = ~1..inf alias_name[modifier] = alias_match_left[modifier] } + ## cardinality = 0..1 + state_damage_modifier = { + ## cardinality = ~1..inf + + } + ## cardinality = 0..1 + province_damage_modifiers = { + ## cardinality = ~1..inf + + } + # no is default + ## cardinality = 0..1 + hide_if_missing_tech = bool ## cardinality = 0..1 - show_modifier = yes + spawn_point = + ## cardinality = 0..1 - max_fuel_building = float + special_icon = + ## cardinality = 0..1 - fuel_silo = yes + tags = { + ## cardinality = ~1..inf + value_set[building_tag] + } + + ## cardinality = 0..1 + specialization = { + + } ## cardinality = 0..1 - fuel_gain_from_states = float + repair_speed_factor = variable_field + + ## cardinality = 0..1 + construction_speed_factor = { + trigger = { + alias_name[trigger] = alias_match_left[trigger] + } + factor = float + } + + # No is default + ## cardinality = 0..1 + disable_grow_animation = bool +} + +spawn_point = { + type = enum[state_prov] + max = int + # No is default + ## cardinality = 0..1 + only_costal = bool + # No is default + ## cardinality = 0..1 + disable_auto_nudging = bool +} + +enums = { + enum[building_group] = { + reactors + special_project_facility + } + enum[state_prov] = { + state + province + } } diff --git a/Config/common/characters.cwt b/Config/common/characters.cwt index 95c4b826..cddd8b03 100644 --- a/Config/common/characters.cwt +++ b/Config/common/characters.cwt @@ -77,6 +77,12 @@ types = { } } + subtype[scientist] = { + ## cardinality = 1..inf + scientist = { + + } + } subtype[advisor] = { ## cardinality = ~2..inf instance = { @@ -319,6 +325,28 @@ character = { can_be_fired = bool } } + subtype[scientist] = { + ## cardinality = 1..inf + scientist = { + ## cardinality = 0..1 + desc = localisation + ## replace_scope = { this = character root = country } + ## cardinality = 0..1 + visible = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + traits = { + ## cardinality = ~1..inf + + } + ## cardinality = 1..1 + skills = { + ## cardinality = 1..1 + = int + } + } + } subtype[instanced] = { ### Character instance, for use on startup checks (i.e. has_dlc, and similar) to create alternate versions of a character, usually two ## cardinality = ~2..inf @@ -551,6 +579,27 @@ character = { ## cardinality = 0..1 can_be_fired = bool } + ### Scientist subtype + ## cardinality = 0..inf + scientist = { + ## cardinality = 0..1 + desc = localisation + ## replace_scope = { this = character root = country } + ## cardinality = 0..1 + visible = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + traits = { + ## cardinality = ~1..inf + + } + ## cardinality = 1..1 + skills = { + ## cardinality = 1..1 + = int + } + } } } } diff --git a/Config/common/consolidated_ai.cwt b/Config/common/consolidated_ai.cwt index fd5d51a3..6b8200c5 100644 --- a/Config/common/consolidated_ai.cwt +++ b/Config/common/consolidated_ai.cwt @@ -150,133 +150,105 @@ ai_peace = { } ai_template = { - ### The role token that this role-level template entry targets. These tokens are defined by script and are targeted by the 'role_ratio' AI strategy. (This is technically a list but AI is bad at handling AI templates that target multiple roles, so sticking to just one is recommended.) - roles = { - ## cardinality = ~1..inf - value_set[ai_template_roles] - } - # Restricts the template to only the specified tags. Optional. + + # Determines which countries will use this role-level template entry. Both 'blocked_for' and 'available_for' are possible to use. Use one or the other, if you use neither or both, the resulting behavior is undefined. (These two may be replaced by 'allowed' or something similar in the future.) + # Generally you want to make sure that each country has max one role-level template entry targeting a role. So if you add custom AI templates for e.g. Germany you should make sure that only Germany is allowed for it, and you should also block Germany from using the generic AI templates for the same role. ## cardinality = 0..1 - available_for = { + blocked_for = { ## cardinality = ~1..inf enum[country_tags] } - - # Blocks the template for the specified tags. Optional. ## cardinality = 0..1 - blocked_for = { + available_for = { ## cardinality = ~1..inf enum[country_tags] } - ### Deprecated but currently necessary. This parameter has no significant effect, but hasn't been removed yet. - match_to_count = float - - ### The role-level upgrade prio is used for weighted-random selection when the AI chooses which role to upgrade templates for. Set it to zero to prevent the AI from spending XP on upgrading templates for this role. - ### Example: If three role-level templates [A, B, C] have upgrade prio [1, 2, 1] respectively, then the probabilities for upgrading each template is [25%, 50%, 25%] respectively. + # The role token that this role-level template entry targets. These tokens are defined by script and are targeted by the 'role_ratio' AI strategy. + role = value_set[ai_template_roles] + + # The role-level upgrade prio is used for weighted-random selection when the AI chooses which role to upgrade templates for. Set it to zero to prevent the AI from spending XP on upgrading templates for this role. + # Example: If three role-level templates [A, B, C] have upgrade prio [1, 2, 1] respectively, then the probabilities for upgrading each template is [25%, 50%, 25%] respectively. upgrade_prio = { enum[base_factor] = float alias_name[modifier_rule] = alias_match_left[modifier_rule] } - ## cardinality = 1..10 + ## Below are the actual target templates belonging to this role ## + # In this example, the AI will first try to reach a 6-inf (+support) template, before upgrading it to a 9-inf 2-arty (+support) template. + # Since the 'upgrade_prio' is higher for the first template, that one will be targeted. And when the match score is good enough it will use the 'replace_with' to switch over to the larger template. + # If two target templates have the same 'upgrade_prio', the first one will be preferred (so order matters in those cases). + + # Target template 1 (the smaller infantry template) + ## cardinality = 0..inf scalar = { - upgrade_prio = { - enum[base_factor] = float - alias_name[modifier_rule] = alias_match_left[modifier_rule] - } - ## cardinality = 0..1 - production_prio = { - enum[base_factor] = float - alias_name[modifier_rule] = alias_match_left[modifier_rule] - } + + # Optional: Determines the reinforcement prio of the resulting template. For example, garrison templates should use 0 (low prio) while elite templates should use 2 (high prio). Default 1 (normal prio). ## cardinality = 0..1 - can_upgrade_in_field = { - alias_name[trigger] = alias_match_left[trigger] - } + reinforce_prio = int + + # Optional: Determines whether to use a custom icon for resulting template. ## cardinality = 0..1 custom_icon = int + + # Optional: Specifies the division name group to use. By default uses the name group of the template "branched off" from. ## cardinality = 0..1 - reinforce_prio = int + division_names_group = - target_width = float - width_weight = float - column_swap_factor = float + # The priority of this target template. This is used to determine (deterministically, no randomness involved) which of the target templates is the "currently targeted template". + upgrade_prio = { + enum[base_factor] = float + alias_name[modifier_rule] = alias_match_left[modifier_rule] + } - ### List of triggers that must all be true for the template to be usable; true by default if empty or missing. + # Optional: Whether to evaluate this target template at all. Trigger with country scope. If false, the AI will pretend this target template doesn't exist. ## cardinality = 0..1 + ## replace_scope = { this = country root = country } enable = { alias_name[trigger] = alias_match_left[trigger] } + # Optional: Whether to allow upgrading divisions in the field. Trigger with country scope. If false, the AI will not field-upgrade divisions matching this target template. If true, the AI will consider field-upgrading divisions matching this target template to the target template defined by 'replace_with' (assuming they have enough manpower and equipment for it). ## cardinality = 0..1 - stat_weights = { - ## cardinality = 33..33 - float - - # #-- default_morale - # #-- defense - # #-- breakthrough - # #-- hardness - # #-- soft_attack - # #-- hard_attack - # #-- recon - # #-- entrenchment - # #-- initiative - # #-- casualty_trickleback - # #-- supply_consumption_factor - # #-- supply_consumption - # #-- suppression - # #-- suppression_factor - # #-- experience_loss_factor - # #-- equipment_capture_factor - # #-- fuel_capacity - - #-- Air Values - # #-- air_attack - - #-- Common Values - # #-- max_organisation - # #-- max_strength - # #-- maximum_speed - # #-- armor_value - # #-- ap_attack - # #-- reliability - # #-- reliability_factor - # #-- weight - # #-- fuel_consumption - # #-- fuel_consumption_factor - # #-- strat_attack - # #-- carrier_size - # #-- acc_hot_gain - # #-- acc_cold_gain - # #-- build_cost_ic + can_upgrade_in_field = { + ## replace_scope = { this = country root = country } + alias_name[trigger] = alias_match_left[trigger] } + + # The "meat" of the target template: the actual template contents. target_template = { - weight = float - match_value = float - regiments = { - ## cardinality = 1..25 - = int[0..25] - } + # The desired support companies. The AI will try to add them to the template if allowed by research etc. ## cardinality = 0..1 support = { ## cardinality = 0..5 = int[0..4] } + + # The desired line regiments. The AI will try to add them to the template if allowed by research etc. + regiments = { + ## cardinality = 1..25 + = int[0..25] + } + } - allowed_types = { - ## cardinality = ~1..inf - - } + + + ## Optional replace-with chain: If the match score is at least 'replace_at_match', then replace the currently targeted template with 'replace_with', as long as the match score between best matching template and the next target template is at least 'target_min_match'. + + # Optional: Match score of this target template. ## cardinality = 0..1 replace_at_match = float + + # Optional: Other target template to replace currently targeted template with. Also affects fielded divisions when upgrading in the field. ## cardinality = 0..1 replace_with = enum[ai_templates] + + # Optional: Match score between the best matching template and the target template defined by 'replace_with' has to be at least this high in order for the switch to happen. Might be deprecated/changed in the future. ## cardinality = 0..1 target_min_match = float } + } ai_equipment_design_group = { diff --git a/Config/common/countries.cwt b/Config/common/countries.cwt index fccf44aa..146c96d0 100644 --- a/Config/common/countries.cwt +++ b/Config/common/countries.cwt @@ -33,6 +33,8 @@ country_tag_file = { country_file = { subtype[country] = { + ## cardinality = 0..inf + use_legacy_ai_pp_spend = bool ## cardinality = 0..inf graphical_culture = scalar ## cardinality = 0..inf diff --git a/Config/common/ideologies.cwt b/Config/common/ideologies.cwt index c1d0779f..803bbd3d 100644 --- a/Config/common/ideologies.cwt +++ b/Config/common/ideologies.cwt @@ -117,6 +117,7 @@ enums = { can_generate_female_unit_leaders can_generate_female_country_leaders can_access_market + can_use_underway_replenishment } enum[ai_ideology] = { diff --git a/Config/common/raids.cwt b/Config/common/raids.cwt new file mode 100644 index 00000000..d1e97b8e --- /dev/null +++ b/Config/common/raids.cwt @@ -0,0 +1,431 @@ +types = { + type[raid_category] = { + path = "game/common/raids/categories" + skip_root_key = categories + } + type[raid] = { + path = "game/common/raids" + skip_root_key = types + } + +} + +raid_category = { + ## cardinality = 0..1 + ## replace_scope = { this = country root = country } + available = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + ## replace_scope = { this = country root = country } + visible = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 1..1 + intel_source = enum[intel_types] + # default is no + ## cardinality = 0..1 + free_targeting = bool +} + +raid = { + category = + + ## cardinality = 0..1 + custom_map_icon = + + ## cardinality = 0..1 + unit_icon = + ## cardinality = 0..1 + target_icon = + ## cardinality = 0..1 + target_loc_key = localisation + ## cardinality = 0..1 + equipment_icon = + ## cardinality = 0..1 + launch_sound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files + + command_power = int # command power allocation cost + + arrow = { + type = enum[arrow_type] # arrow type: line, ballistic, air or naval + } + + unit_model = { + # equipment, transport or convoy + type = enum[raid_unit_model] # (will use the majority equipment type of the airwing) + ## cardinality = 0..1 + scale = 0.5 # scale of the entity, is also multiplied by the global RAID_UNIT_ENTITY_BASE_SCALE define + } + + ## replace_scope = { this = country root = country FROM = country } + ## cardinality = 0..1 + ai_will_do = { + # AI only wants to do raids if resulting AI weight is > 0 + # FROM refers to the target country + # var:target_state and var:target_province can also be used when applicable + + base = float + ## cardinality = 0..inf + modifier = { + factor = float + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + } + + ## cardinality = 0..1 + fire_only_once = bool # if the raid can only be executed once + ## cardinality = 0..1 + days_re_enable = int # How many days before the raid can be created again against the same target. + # There is RAID_DEFAULT_TARGET_COOLDOWN_DAYS define which is used if no value is specified in script. + # Set to 0 if you don't want any cooldown. + + days_to_prepare = int + ## cardinality = 0..1 + speed_multiplier = float # optional unit speed multiplier, default = 1 (see also: RAID_UNIT_SPEED_MULTIPLIER in defines.lua) + + ## replace_scope = { this = country root = country FROM = country } + allowed = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + # Mainly for Country Specific Raids and for dlc locks + } + + # Whether the raid type should be visible or not, before considering potential targets + ## replace_scope = { this = country root = country FROM = country } + visible = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + # Keep these triggers simple for performance reasons + } + + # Whether the raid type should be visible for a specific target + ## replace_scope = { this = country root = country FROM = country } + show_target = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + # Keep these triggers simple for performance reasons + # Use FROM to refer to the target country, e.g. to prevent targeting allies + # var:target_state and var:target_province can also be used when applicable + } + + # Available represents being able to prepare a raid + ## replace_scope = { this = country root = country FROM = country } + available = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + # Keep these triggers simple for performance reasons + # Use FROM to refer to the target country, e.g. to prevent targeting allies + # var:target_state and var:target_province can also be used when applicable + } + + # Available represents being able to start a raid + ## replace_scope = { this = country root = country FROM = country } + ## cardinality = 0..1 + launchable = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + # Use FROM to refer to the target country, e.g. to require being at war + # var:target_state and var:target_province can also be used when applicable + } + + target_type = { + # target type tokens: + ## cardinality = 0..1 + province = enum[provinces] + ## cardinality = 0..1 + province = value[variable] + ## cardinality = 0..1 + building = { + ## cardinality = 0..1 + type = + ## cardinality = 0..1 + tags = value[building_tag] + ## cardinality = 0..1 + level = { + ## cardinality = 0..1 + min = int + ## cardinality = 0..1 + max = int + } # Optional. Max can also be omitted + ## cardinality = 0..1 + is_coastal = bool # Optional + } + ## cardinality = 0..1 + ## replace_scope = { this = state root = state } + state = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + + } + } + + # Conditions on the starting point: + starting_point = { + types = { + ## cardinality = ~1..inf + enum[raid_starting_point] + } + } + + ## replace_scope = { this = country root = country } + show_target = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + + ## cardinality = 0..1 + preparation_time = int # number of days + ## cardinality = 0..1 + cost = int # Command Power Allocation + + ## cardinality = 0..1 + target_requirements = { + ## cardinality = 0..1 + air_superiority = float + ## cardinality = 0..1 + naval_supremacy = float + } # air_superiority = percentage / naval_supremacy = percentage (in air region over target / adjacent sea zone) Defaults to NONE + + ## cardinality = 0..1 + target_requirement_time = int # Number of days + + ## cardinality = 0..inf + unit_requirements = { + # Battalions... + ## cardinality = 0..inf + battalion_types = { # Optional + ## cardinality = ~1..inf + = { + ## cardinality = 0..1 + min = int + ## cardinality = 0..1 + max = int + } + } + + # ... or equipment... + ## cardinality = 0..inf + equipment = { # Optional + type = { + ## cardinality = 0..inf + + ## cardinality = 0..inf + enum[equipment_category] + } + ## cardinality = 0..1 + modules = { } # Optional + ## cardinality = 0..1 + amount = { + ## cardinality = 0..1 + min = int + ## cardinality = 0..1 + max = int + } # Optional + } + ## cardinality = 0..1 + experience = { + ## cardinality = 0..1 + min = int + ## cardinality = 0..1 + max = int + } # Optional + } + + # NOTE : unit_requirements can occur multiple times in a script + # any unit matching at least one of the unit_requirements blocks will be allowed to participate in the raid + + ## cardinality = 0..1 + essential_equipment = { + # list of equipment archetypes and numbers + # Having this equipment (in stockpile) is a precondition for *creating* the raid, and + # will be collected after a raid is created + ## cardinality = 0..1 + = int + + ## cardinality = 0..1 + nukes = int # number of nukes (if using nukes) + } + + ## cardinality = 0..1 + additional_equipment = { + # list of equipment archetypes and numbers + # This equipment is collected after a raid is created (not needed for creating the raid) + # Note: essential_equipment and additional_equipment are not additive, instead the max of both is used + # Note: ships (ship hulls) can also be used, and will be primarily be collected from existing fleets + ## cardinality = 0..1 + = int + + ## cardinality = 0..1 + nukes = int # number of nukes (if using nukes) + } + + ## cardinality = 0..1 + nuke_type = enum[nuke_type] # type of nuke to use: nuclear_bomb or thermonuclear_bomb + + # Intel requirements + ## cardinality = 0..1 + intel_levels = { + ## cardinality = ~1..1 + launch = int # minimum intel level to launch the raid + } + + # What happens depending on which level of access is achieved + success_levels = { + failure = single_alias_right[raid_outcome] + limited_success = single_alias_right[raid_outcome] + success = single_alias_right[raid_outcome] + critical_success = single_alias_right[raid_outcome] + } + + # What determines the probability of different outcomes + success_factors = { + success = single_alias_right[raid_factors] + + ## cardinality = 0..1 + critical = single_alias_right[raid_factors] + + ## cardinality = 0..1 + disaster = single_alias_right[raid_factors] + } + +} + +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 + visual_effect = { + entity = + animation = + } + + # Effects that should be listed as affecting the raiding country + # Raid instance scope + ## replace_scope = { this = raid root = raid } + ## cardinality = 0..1 + actor_effects = { + # Can run raid instance scope effects + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + + # And also use the dynamic variables to change scope (see the variable list below) + ## push_scope = { country } + ## cardinality = 0..1 + var:actor_country = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + } + + # Effects that should be listed as affecting the raided country + # Raid instance scope + ## replace_scope = { this = raid root = raid } + ## cardinality = 0..1 + victim_effects = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + + ## push_scope = { country } + ## cardinality = 0..1 + var:victim_country = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + + ## push_scope = { state } + ## cardinality = 0..1 + var:target_state = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + } + + # Division (unit) scope + ## cardinality = 0..1 + ## replace_scope = { this = unit root = unit } + division_effects = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + + # The percentage of additional equipment that gets destroyed + # Default is 100% + ## cardinality = 0..1 + destroy_additional_equipment = float + + ## cardinality = 0..1 + outcome_description = localisation #[Optional] Custom description of the outcome + ## cardinality = 0..1 + outcome_description_attacker = localisation #[Optional] Custom description for attacker + ## cardinality = 0..1 + outcome_description_defender = localisation #[Optional] Custom description for defender +} +single_alias[raid_factors] = { + ## cardinality = 0..1 + base = float # [Optional] A base chance of the outcome (default is 0.0) + + # Optional modifiers + ## cardinality = 0..inf + enum[raid_chance_modifier] = { + weight = float # [Required] The maximum probability change applied by the modifier (positive or negative, additive) + ## cardinality = 0..1 + reference = float # [Optional] The value of the backing property at which the modifier will have full weight. Default is 1.0 + ## cardinality = 0..1 + start_weight = float # [Optional] The weight of the modifier when the backing property is at 0.0 (or, instead, at start_reference if defined). Default is 0.0 + ## cardinality = 0..1 + start_reference = float # [Optional] The value of the backing property at which the modifier will have 0 weight (or, instead, start_weight if defined). + } +} + +enums = { + enum[raid_unit_model] = { + equipment + transport + convoy + } + enum[raid_starting_point] = { + air_base + naval_base + rocket_site + carrier + submarine + } + enum[arrow_type] = { + line + ballistic + air + naval + } + enum[nuke_type] = { + nuclear_bomb + thermonuclear_bomb + } + enum[raid_chance_modifier] = { + prep_time #The preparation progress. Reference values from 0.0 (no preparation) to 1.0 (full preparation). + experience #The experience of the unit assigned to the raid. Reference values from 0.0-1.0 if land unit, or 0-1000 if air wing. + anti_air #The anti-air defense value of the target state. Reference values e.g. from 0 to 5 (meaning 5 basic AA buildings) + resistance #The amount of resistance in the target state. Reference values from 0 to 100 + enemy_units #The number of enemy divisions in the target province. For province-target missions ONLY. + air_superiority #The air superiority score (fraction) of the actor country in the target region. Reference values from 0.0 to 1.0 + naval_supremacy #The naval supremacy score (fraction) of the actor country in the target sea zone. Reference values from 0.0 to 1.0 + interception #The number of enemy planes executing interception missions in the target region. + radar + intel #The amount of intel the actor country has on the target. Reference values depend on defines. + + #### Air Units Only: + air_defence #The air defense value of the air unit assigned to the raid. Typical reference values from 0 to 50 + air_agility #The air agility value of the air unit assigned to the raid. Typical reference values from 0 to 50 + strategic_bomber #The strategic bombing value of the air unit assigned to the raid. Reference values from 0 to 1 + reliability #The reliability (fraction) of the air unit assigned to the raid. Reference values from 0 to 1 + + #### Land Units Only: + recon #The recon level of the land unit assigned to the raid, if there is one. Typical reference values from 0 to 10 + organisation #The organisation (absolute) of the land unit assigned to the raid, if there is one. Reference values from 0 to 100+ + strength #The strength (factor) of the land unit assigned to the raid, if there is one. Reference values from 0.0 to 1.0 + } +} \ No newline at end of file diff --git a/Config/common/script_constants.cwt b/Config/common/script_constants.cwt new file mode 100644 index 00000000..f8d6b553 --- /dev/null +++ b/Config/common/script_constants.cwt @@ -0,0 +1,81 @@ + +types = { + type[script_constant] = { + path = "game/common/script_constants" + } + ## type_key_filter <> schema + type[constant_one] = { + path = "game/common/script_constants" + skip_root_key = yes + } + ## type_key_filter <> { any_key key data } + type[constant_two] = { + path = "game/common/script_constants" + skip_root_key = { any any } + } +} + +#script_constant = { +# # Mandatory to be the first entr +# schema = { +# # specific name of the key mutually exclusive with any_key +# ## cardinality = 0..1 +# key = scalar +# # Accept any key of alphabetic characters (no dots), mutually exclusive with key +# ## cardinality = 0..1 +# any_key = yes +# +# # The data sepecification +# data = int # integer +# data = float # floating point +# data = { +# } # complex schema entry +# } +# +# # All the data entries that matches the specified schema. +# ## cardinality = 0..inf +# scalar = scalar +# ## cardinality = 0..inf +# scalar = { +# ## cardinality = 0..inf +# scalar = scalar +# } +#} + +enums = { + complex_enum[constant_one] = { + start_from_root = yes + path = "game/common/script_constants" + name = { + scalar = { + schema = { + + } + enum_name = scalar + enum_name = { + + } + } + } + } + complex_enum[constant_two] = { + start_from_root = yes + path = "game/common/script_constants" + name = { + scalar = { + schema = { + + } + scalar = scalar + scalar = { + enum_name = scalar + } + } + } + } + enum[constant_hack] = { + + + + } +} \ No newline at end of file diff --git a/Config/common/special_projects.cwt b/Config/common/special_projects.cwt new file mode 100644 index 00000000..2cc5f92d --- /dev/null +++ b/Config/common/special_projects.cwt @@ -0,0 +1,581 @@ +types = { + type[special_project] = { + path = "game/common/special_projects/projects" + } + type[sp_prototype_reward] = { + path = "game/common/special_projects/prototype_rewards" + } + + type[specialization] = { + path = "game/common/special_projects/specialization" + } +} + +special_project = { + # Mandatory + # Category of Special Projects containing this project + specialization = + + # Optional + # Trigger evaluated at startup for every countries to fill the pool of potential projects + # if triggers returns true, an instance of this Project is created for this country + # scope: country. only tag, original_tag and has_dlc allowed. + ## replace_scope = { root = country this = country } + ## cardinality = 0..1 + allowed = { + ## cardinality = 0..1 + always = bool + ## cardinality = 0..inf + tag = scope[country] + ## cardinality = 0..inf + original_tag = scope[country] + ## cardinality = 0..inf + has_dlc = enum[dlc] + ## cardinality = 0..inf + NOT = { + ## cardinality = 0..inf + tag = scope[country] + ## cardinality = 0..inf + original_tag = scope[country] + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + ## cardinality = 0..inf + AND = { + ## cardinality = 0..inf + tag = scope[country] + ## cardinality = 0..inf + original_tag = scope[country] + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + } + + # Optional + # Trigger evaluated when displaying the Project + # if trigger returns false, the project is disabled and greyed-out + # scope: project. FROM: country + ## replace_scope = { ROOT = project this = project from = country} + ## cardinality = 0..1 + available = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + + # Optional + # Trigger evaluated when displaying the Project + # if trigger returns false, the project is hidden + # scope: project. FROM: country + ## replace_scope = { ROOT = project this = project from = country} + ## cardinality = 0..1 + visible = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + + # Optional + # Cost of breakthrough points to start project. + # Can consist of several breakthrough points from different specializations. + # If omitted it will default to 0 for the project specialization. + # Can also add script to modify the value (Country Scope). + ## cardinality = 0..1 + breakthrough_cost = { + ## cardinality = 0..inf + = int + ## cardinality = 0..inf + specialization = { + base = int + ## replace_scope = { ROOT = country this = project from = country} + ## cardinality = ~1..inf + modifier = { + add = int + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + } + } + + # for AI and script, a Project is considered enabled if it is both visible and available + + # Optional + ## cardinality = 0..1 + narrative = { + # Optional + # Localization key used for the name of the Project + # The localization key is localized with the following localization scope objects: + # * Country: The country that owns the project. + ## cardinality = 0..1 + name = localisation + # if name provided, use TAG_name_loc_key if it exists. if not use name_loc_key (where TAG is the tag of the project owner) + # if localization key TAG_my_project_token exists, use it + # else use loc key my_project_token + + # Optional + # Localization key used for the long description of the Project + # The localization key is localized with the following localization scope objects: + # * SpecialProjet: The project. + # * Country: The country that owns the project + ## cardinality = 0..1 + desc = localisation + # if name provided, use TAG_desc_loc_key if it exists. if not use desc_loc_key (where TAG is the tag of the project owner) + # if localization key TAG_my_project_token_desc exists, use it (!! Note the _desc suffix) + # else use loc key my_project_token_desc + } + + # Optional + # GFX key of the icon used to illustrate the Project + ## cardinality = 0..1 + icon = + # if icon provided, use GFX_icon + # if gfx key GFX_TAG_my_project_token exists, use it + # if gfx key GFX_my_project_token exists, use it + # else use GFX_PLACEHOLDER_sp_project_icon + + ## cardinality = 0..1 + project_tags = enum[project_tag] + ## cardinality = 0..1 + project_tags = { + ## cardinality = 0..inf + enum[project_tag] + } + + # Optional + # GFX key of the background texture of the project when it is being researched + # overrides the one set at Specialization level + ## cardinality = 0..1 + blueprint_image = + + # At least 1 is Mandatory (and not 0) + # Number of days needed to complete each phase + # default is 0 + ## cardinality = 0..1 + prototype_time = int[1..inf] + prototype_time = scalar # can take script_constant get support at some point? + + # Optional + # Resources drained during basic research & prototyping phases + # If not enough resources, research speed will be slowed down + # special project cost is always evaluated AFTER production lines resource cost + # Oil is not allowed here. + ## cardinality = 0..1 + resource_cost = { + resources = { + ## cardinality = 0..inf + = int + } + } + + # Optional: Defaults to defined default, if set to 0 a log error is produced and complexity is set to default. + # Amount of progress gained each prototype iteration. + ## cardinality = 0..1 + complexity = int + complexity = scalar # can take script_constant get support at some point? + + # Optional + # The weight for the probability of the reward being empty + # default is set by define NProject::DEFAULT_EMPTY_REWARD_WEIGHT + # scriptable weight similar to ai_will_do + # ROOT is the project + # FROM is the Country + # var:facility_state is the State where the facility is (ensured to be set in this case) + # var:facility_province_id is the province ID where the facility is (ensured to be set in this case) + # var:scientist is the Scientist (ensured to be set in this case) + ## replace_scope = { ROOT = project this = project from = country} + ## cardinality = 0..1 + empty_reward_weight = { + base = float + ## cardinality = 0..inf + modifier = { + ## cardinality = 0..1 + factor = float + ## cardinality = 0..1 + add = float + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + } + + # Optional + # AI weight modifier for this project + # Default value is 1 + # current Project scope - FROM = country + # For documentation, see examples of ai_will_do throughout the content + ## replace_scope = { ROOT = country THIS = project FROM = country} + ## cardinality = 0..1 + ai_will_do = { + base = float + ## cardinality = 0..inf + modifier = { + ## cardinality = 0..1 + factor = float + ## cardinality = 0..1 + add = float + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + } + + # Optional + # Project will appear only if all parents are completed + # use other Projects' token + ## cardinality = 0..1 + special_project_parent = { + ## cardinality = 0..inf + + } + + # Optional + # Bonus given when the Project is fully researched (i.e. at the end of the last Prototyping phase) + ## cardinality = 0..1 + project_output = single_alias_right[sp_iteration_output] + + # Optional array + # Rewards for when one iteration in the prototype phase is completed + # "Unique rewards" are only reachable by the containing project. + # Specification for content for a prototype reward can be found in documentation + # for generic prototype rewards. + ## cardinality = 0..1 + unique_prototype_rewards = { + # Optional - Repeatable + # Dynamic token that identifies the reward + # Same specification as for prototype rewards. + ## cardinality = ~1..inf + scalar = single_alias_right[sp_proto_reward] + # Optional - Repeatable + # Anonymous prototype reward (not accessible except from effects) + # Same specification inside definition as for all other prototype rewards. + # { ... } + } + + # Optional array + # "Generic rewards" are coming from the prototype reward DB and can be used in several projects + # (cf. game/common/special_projects/prototype_rewards) + ## cardinality = 0..1 + generic_prototype_rewards = { + # Repeatable - Any number of generic prototype reward tokens + ## cardinality = 0..inf + + } +} + +sp_prototype_reward = single_alias_right[sp_proto_reward] + +single_alias[sp_proto_reward] = { # Dynamic token for the reward (i.e. identifier for the reward) + # Optional + ## cardinality = 0..1 + narrative = { + # Optional + # Localization key used for the name of the Project + # The localization key is localized with the following localization scope objects: + # * Country: The country that owns the project. + ## cardinality = 0..1 + name = localisation + # if name provided, use TAG_name_loc_key if it exists. if not use name_loc_key (where TAG is the tag of the project owner) + # if localization key TAG_my_reward_token exists, use it + # else use loc key my_reward_token + + # Optional + # Localization key used for the long description of the Project + # The localization key is localized with the following localization scope objects: + # * SpecialProjet: The project. + # * Character: The scientist assigned to the project. + # * State: The state that the facility belongs to. + # * Country: The country that owns the project + ## cardinality = 0..1 + desc = localisation + # if desc provided, use TAG_desc_loc_key if it exists. if not use desc_loc_key (where TAG is the tag of the project owner) + # if localization key TAG_my_reward_token_desc exists, use it (!! Note the _desc suffix) + # else use loc key my_reward_token_desc + } + + # Optional + # GFX key of the icon used to illustrate the Project + ## cardinality = 0..1 + icon = + # if icon provided, use GFX_icon + # if gfx key GFX_TAG_my_reward_token exists, use it + # if gfx key GFX_my_reward_token exists, use it + # else use GFX_PLACEHOLDER_sp_project_picture + + # Optional + # Determine if the reward can only be obtained once - or several times + # Default is no + ## cardinality = 0..1 + fire_only_once = bool + + # OPTIONAL - When this reward becomes available it will have priority. If several available rewards have this set to true, the reward will be randomly chosen based on weight. + ## cardinality = 0..1 + force_reward_if_available = bool + + # Optional + # (Min, Max]. Meaning Min value is considered inside the threshold but max is not. + # In the example below this reward would be triggered when the prototype progress is a value from 0 to and not including 60 + # default is "always eligible" + ## cardinality = 0..1 + threshold = { + min = int + max = int + } + + # Optional + # The weight for the probability of the reward being choosen + # default is set by define NProject::ITERATION_REWARD_DEFAULT_WEIGHT + # scriptable weight similar to ai_will_do + # ROOT is the project + # FROM is the Country + # var:facility_state is the State where the facility is (ensured to be set in this case) + # var:facility_province_id is the province ID where the facility is (ensured to be set in this case) + # var:scientist is the Scientist (ensured to be set in this case) + ## cardinality = 0..1 + ## replace_scope = { root = project this = project from = country } + weight = { + ## cardinality = ~1..1 + base = float + ## cardinality = 0..inf + modifier = { + ## cardinality = 0..1 + factor = float + ## cardinality = 0..1 + add = float + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + } + + # Optional + # Set an allowed trigger for the reward - Defaults to true + ## cardinality = 0..1 + ## replace_scope = { root = country this = country} + allowed = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } + + # Repeatable - at least 1 mandatory + ## cardinality = 1..inf + option = { + # Mandatory - must be unique within the same Reward + ## cardinality = 1..1 + token = value_set[proto_reward] + + # Optional + # Whether or not this option is the default one when timing out + # Only 1 option should have default = yes + # If none has it, the first one is the default one + ## cardinality = 0..1 + default = yes + + # Optional + ## cardinality = 0..1 + narrative = { + # Optional + # Localization key used for the name of the Project + # The localization key is localized with the following localization scope objects: + # * Country: The country that owns the project. + ## cardinality = 0..1 + name = localisation + # if name provided, use TAG_name_loc_key if it exists. if not use name_loc_key (where TAG is the tag of the project owner) + # if localization key TAG_my_option_token exists, use it + # else use loc key my_option_token + } + + # Optional + # Bonus given when a prototype phase ends up with this reward and this option is chosen + ## cardinality = 0..1 + iteration_output = single_alias_right[sp_iteration_output] + } +} + +specialization = { + ## cardinality = 0..1 + blueprint_image = + color = { + ## cardinality = 3..3 + int + } + ## cardinality = 0..1 + program_background = +} + +single_alias[sp_iteration_output] = { + # Country effect block + # scope: country. FROM: project + ## replace_scope = { ROOT = country this = country from = project } + ## cardinality = 0..1 + country_effects = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + + # Facility State effect block + # !Warning: if the project is completed via script, there may be no facility and this will be skipped + # scope: state. FROM: project + # var:facility_province_id : temporary variable with the province ID of the facility + ## replace_scope = { ROOT = state this = state from = project} + ## cardinality = 0..1 + facility_state_effects = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + + # Scientist effect block + # !Warning: if the project is completed via script, there may be no scientist and this will be skipped + # scope: character. FROM: project + ## replace_scope = { ROOT = character this = character from = project} + ## cardinality = 0..1 + scientist_effects = { + ## cardinality = ~1..inf + alias_name[effect] = alias_match_left[effect] + } + + # Optional array + # Enable equipment variants - cf. game/common/units/equipment + ## cardinality = 0..inf + enable_equipments = { + # Optional trigger - only accepts has_dlc + ## cardinality = 0..1 + # Only enabled if limit is empty or returns true + limit = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + ## cardinality = 0..inf + NOT = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + ## cardinality = 0..inf + AND = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + } + + ## cardinality = 0..inf + + ## cardinality = 0..inf + + ## cardinality = 0..inf + subtype[nsb_armor_tech] = { + ## cardinality = ~1..inf + value_set[nsb_armor_variants] + } + ## cardinality = 0..inf + subtype[bba_air_tech] = { + ## cardinality = ~1..inf + value_set[bba_air_variants] + } + } + + # Optional array + # Enable equipment modules - cf. game/common/units/equipment/modules + ## cardinality = 0..inf + enable_equipment_modules = { + # Only enabled if limit is empty or returns true + ## cardinality = 0..1 + limit = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + ## cardinality = 0..inf + NOT = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + ## cardinality = 0..inf + AND = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + } + ## cardinality = 0..inf + + + } + + # Optional array + # Enable sub units (aka battalion) - cf. game/common/units + ## cardinality = 0..1 + enable_subunits = { + # Only enabled if limit is empty or returns true + ## cardinality = 0..1 + limit = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + ## cardinality = 0..inf + NOT = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + ## cardinality = 0..inf + AND = { + ## cardinality = 0..inf + has_dlc = enum[dlc] + } + } + ## cardinality = ~1..inf + + } + + # Optional + # Sub-unit stat bonus + ## cardinality = 0..1 + sub_unit_bonus = { + ## cardinality = 0..inf + = { + ## cardinality = 0..inf + need = { + ## cardinality = 1..inf + = int + ## cardinality = 0..1 + value[bba_air_variants] = int + ## cardinality = 0..inf + value[nsb_armor_variants] = int + } + ## cardinality = 0..inf + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + ## cardinality = 0..inf + battalion_mult = { + ## cardinality = 1..inf + category = enum[unit_category] + ## cardinality = 1..inf + alias_name[unit_stat] = alias_match_left[unit_stat] + ## cardinality = 0..1 + add = bool + ## cardinality = 0..1 + display_as_percentage = bool + } + ## cardinality = 0..inf + enum[region_weather] = { + ## cardinality = 0..inf + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } + } + } + + # Optional + # Equipment bonus + ## cardinality = 0..1 + equipment_bonus = { + # same format as equipment_bonus in ideas + ## cardinality = 0..inf + enum[equipment_bonus_type] = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } + } +} + +enums = { + complex_enum[project_tag] = { + path = "game/common/special_projects" + name = { + enum_name + } + } +} \ No newline at end of file diff --git a/Config/common/traits.cwt b/Config/common/traits.cwt index 7346b29f..5f1747cf 100644 --- a/Config/common/traits.cwt +++ b/Config/common/traits.cwt @@ -43,6 +43,9 @@ types = { slot = value[character_advisor_slot] } } + type[scientist_trait] = { + path = "game/common/scientist_trait" + } } ## push_scope = country @@ -239,6 +242,45 @@ unit_leader_trait = { num_parents_needed = int[1..100] } } +## push_scope = project +scientist_trait = { + # Optional + # Localization key used for the name of the trait + ## cardinality = 0..1 + name = localisation + # if name provided, use it. + # else use loc key my_scientist_trait_token + + # Optional + # GFX key of the icon used to illustrate the Trait + ## cardinality = 0..1 + icon = + # if icon provided, use GFX_icon + # else use key GFX_my_scientist_trait_token + + ## cardinality = 0..1 + available = { + ## cardinality = 0..inf + alias_name[trigger] = alias_match_left[trigger] + } + + # Optional + # Modifiers that will apply to the special project the scientist with that trait is attached to + ## cardinality = 0..1 + modifier = { + ## cardinality = ~1..inf + alias_name[modifier] = alias_match_left[modifier] + } + + # Optional + # Trait limited to scientist with that specialization only. + # If not specified it will applicable to all scientist specializations + ## cardinality = 0..1 + specialization = { + ## cardinality = 0..inf + + } +} enums = { enum[unit_leader_skills] = { diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt new file mode 100644 index 00000000..fb07d062 --- /dev/null +++ b/Config/effects_gtd.cwt @@ -0,0 +1,473 @@ +### Add breakthrough points to one specialization or all for a country scope. +## scope = country +alias[effect:add_breakthrough_points] = { + specialization = + specialization = all + value = int + +} + +### Requires raid as ROOT scope. Reduce progress to the special project in state. Root scope is raid instance scope. The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1. +## scope = state +alias[effect:raid_reduce_project_progress_ratio] = float[0.0..1.0] + +### Executes children effects on random scientists that fulfills the "limit" trigger. +## scope = country +## push_scope = character +alias[effect:random_scientist] = { + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] +} +### Executes children effects on every scientist (or "random_select_amount" of random character if specified) of the country in scope, that fulfills the \\\"limit\\\" trigger. +## scope = country +## push_scope = character +alias[effect:every_scientist] = { + ### Apply the effect to this number of randomly selected entities + ## cardinality = 0..1 + random_select_amount = int[1..inf] + ## cardinality = 0..1 + display_individual_scopes = bool + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] +} + +### Create a colonial division template for overlord/owner. Available parameters are subject and division_template, where the subject parameter is the country tag for an overlords subject. And the division_template is the regular effect to create a division template. +## scope = country +alias[effect:create_colonial_division_template] = { + subject = scope[country] # Country tag + division_template = { + name = scalar + ## cardinality = 0..1 + division_names_group = + ## cardinality = 0..1 + override_model = + ## cardinality = 0..1 + template_counter = int + ## cardinality = 0..1 + is_locked = bool + ## cardinality = 0..1 + force_allow_recruiting = bool + ## cardinality = 0..1 + obsolete = bool + ## cardinality = 0..1 + division_cap = int + regiments = { + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + ## cardinality = 0..25 + = { x = int[0..4] y = int[0..4] } + } + ## cardinality = 0..1 + support = { + ## cardinality = ~1..5 + = { x = 0 y = int[0..4] } + } + ## cardinality = 0..1 + template_counter = int + ## cardinality = 0..1 + priority = int + } +} + +### Add levels to a special project specialization for a scientist character in scope. +## scope = character +alias[effect:add_scientist_level] = { + level = int_variable_field # accepts variables + specialization = +} + +### Add experience to a special project specialization for a scientist character in scope. +## scope = character +alias[effect:add_scientist_xp] = { + experience = int_variable_field # accepts variables + experience = value[variable] # accepts variables + specialization = +} + +### Add a trait to a scientist character in scope. +## scope = character +alias[effect:add_scientist_trait] = + +### set project flag. +## scope = project +alias[effect:set_project_flag] = value_set[project_flag] +### set project flag. +## scope = project +alias[effect:set_project_flag] = { + flag = value_set[project_flag] + ## cardinality = 0..1 + value = int + ## cardinality = 0..1 + days = int +} +### modify project flag. Only modifies if flag already exists. +## scope = project +alias[effect:modify_project_flag] = { + flag = value[project_flag] + ## cardinality = 0..1 + value = int + ## cardinality = 0..1 + days = int +} +### clear project flag +## scope = project +alias[effect:clr_project_flag] = value[project_flag] + +### Executes children effects on every active scientist (or "random_select_amount" of random character if specified) of the country in scope, that fulfills the "limit" trigger. +## scope = country +## push_scope = character +alias[effect:every_active_scientist] = { + ### Apply the effect to this number of randomly selected entities + ## cardinality = 0..1 + random_select_amount = int[1..inf] + ## cardinality = 0..1 + display_individual_scopes = bool + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] +} + +### Executes children effects on random scientists that fulfills the "limit" trigger. +## scope = country +## push_scope = character +alias[effect:random_active_scientist] = { + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] +} + +### Injure a scientist for x amount of days to a scientist character in scope. +## scope = character +alias[effect:injure_scientist_for_days] = int + +### Add breakthrough progress to one specialization or all for a country scope.The value can either be an absolute value or a script constant. +## scope = country +alias[effect:add_breakthrough_progress] = { + value = float + value = scalar # can take script_constant get support at some point? + specialization = + specialization = all +} + +### Forces the refresh of the hidden technologies for the scoped country +## scope = country +alias[effect:mark_technology_tree_layout_dirty] = bool + +### Add free bonus design discount to given types with a set of uses.The value for uses and cost_factor can either be an absolute value or a script constant. +## scope = country +alias[effect:add_design_template_bonus] = { + ## cardinality = 0..1 + name = localisation + uses = int + uses = scalar # can take script_constant get support at some point? + cost_factor = float + cost_factor = scalar # can take script_constant get support at some point? + ## cardinality = 1..inf + equipment = +} + +### Add history entry to a raid. +## scope = raid +alias[effect:add_raid_history_entry] = bool + +### Adds the specified equipment bonuses to the country. As description the given loc key or the name of given special project will be used. Same usage as in Ideas/National spirits +## +alias[effect:add_equipment_bonus] = { + ## cardinality = 0..1 + name = localisation + ## cardinality = 0..1 + project = scope[project] # Optional special project scope for using special project name. If not set, the name will be used. + bonus = { + ## cardinality = 0..inf + enum[equipment_bonus_type] = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } + } + +} + +### Adds a contested owner to a state. The effect can be used either from a country or a state scope and accepts the other as parameter. +## scope = state +alias[effect:add_contested_owner] = scope[country] +### Adds a contested owner to a state. The effect can be used either from a country or a state scope and accepts the other as parameter. +## scope = country +alias[effect:add_contested_owner] = scope[state] + +### Activates the shine effect on the focus with the given id. Focuses that are completed cannot have an activated shine effect. Note that tooltips for this effect are only shown in debug mode. +## scope = country +alias[effect:activate_shine_on_focus] = +### Activates the shine effect on the focus with the given id. Focuses that are completed cannot have an activated shine effect. Note that tooltips for this effect are only shown in debug mode. +## scope = country +alias[effect:activate_shine_on_focus] = +### Deactivate the shine effect on the focus with the given id. The current focus cannot have it's shine effect removed. Note that tooltips for this effect are only shown in debug mode. +## scope = country +alias[effect:deactivate_shine_on_focus] = +### Deactivate the shine effect on the focus with the given id. The current focus cannot have it's shine effect removed. Note that tooltips for this effect are only shown in debug mode. +## scope = country +alias[effect:deactivate_shine_on_focus] = + +### Complete a special project for the country in scope. This effect will not take into account the current state of the project tree and will allow you to unlock a project even if the one before is not unlocked. Since the project is not completed within a facility, the facility state and scientist effects are NOT applied. +## scope = country +alias[effect:complete_special_project] = scope[project] +### Complete a special project for the country in scope. This effect will not take into account the current state of the project tree and will allow you to unlock a project even if the one before is not unlocked. Since the project is not completed within a facility, the facility state and scientist effects are NOT applied. +## scope = country +alias[effect:complete_special_project] = value[variable] +### Complete a special project for the country in scope. This effect will not take into account the current state of the project tree and will allow you to unlock a project even if the one before is not unlocked. Since the project is not completed within a facility, the facility state and scientist effects are NOT applied. +## scope = country +alias[effect:complete_special_project] = { + # project, scientist, state accepts variables and keywords. + project = scope[project]. + project = value[variable] + ## cardinality = 0..1 + scientist = # Optional if no iteration_output, default to current scientists on the project if active otherwise to none + + ## cardinality = 0..1 + state = scope[state] # Optional if no iteration_output, default to current state of the project if active otherwise to none + ## cardinality = 0..1 + iteration_output = { # Can be a single reward or reward = option, if it contains a multiple option choice but no option specified the default will be used. The reward must be available to the project + ## cardinality = 0..inf + + } # Optional amount of iteration rewards + ## cardinality = 0..1 + show_modifiers = bool # Optional, default = yes +} + +### Generate a new character with a scientist role and recruit it in the country in scope. +## scope = country +alias[effect:generate_scientist_character] = { + ## 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 +} + + +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 + +} +### 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 + } +} + +### 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] = 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 = value[variable] + character = value[event_target] + character = value[global_event_target] + character = scope[character] +} + +### Executes children effects on a random Allied Country different from the one in scope that fulfills the `limit` trigger. +## scope = country +## push_scope = country +alias[effect:random_allied_country] = { + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] +} + +### Executes children effects on every Allied Country different from the one in scope (or `random_select_amount` of random country if specified) that fulfills the `limit` trigger. +## scope = country +## push_scope = country +alias[effect:every_allied_country] = { + ### Apply the effect to this number of randomly selected entities + ## cardinality = 0..1 + random_select_amount = int[1..inf] + ## cardinality = 0..1 + display_individual_scopes = bool + ## cardinality = 0..1 + limit = { + alias_name[trigger] = alias_match_left[trigger] + } + ## cardinality = 0..1 + tooltip = localisation + alias_name[effect] = alias_match_left[effect] + +} + +### Damage the units performing the raid in scope (the attackers inflict losses). Damage is applied to ground units while damage to plane is defined as the amount of planes lost.\nIf 'ratio = yes', then all damage / losses are applied as a fraction of the current amount. For units, damage can be defined through one value 'damage' or separately through 'org_damage' and 'str_damage' +## scope = raid +alias[effect:raid_damage_units] = { + ## cardinality = 0..1 + org_damage = float + ## cardinality = 0..1 + str_damage = float + ## cardinality = 0..1 + damage = float + ## cardinality = 0..1 + plane_loss = float + ratio = yes +} +### Damage the units performing the raid in scope (the attackers inflict losses). Damage is applied to ground units while damage to plane is defined as the amount of planes lost.\nIf 'ratio = yes', then all damage / losses are applied as a fraction of the current amount. For units, damage can be defined through one value 'damage' or separately through 'org_damage' and 'str_damage' +## scope = raid +alias[effect:raid_damage_units] = { + ## cardinality = 0..1 + plane_loss = int + ## cardinality = 0..1 + org_damage = int + ## cardinality = 0..1 + str_damage = int + ## cardinality = 0..1 + ratio = no +} + +### Give experience to the units performing the raid (raid instance scope). Will give experience to any type of unit assigned to the raid, e.g. divisions or air wings. The value defines the progress towards the max level, e.g. 0.2 = gain 20% of the experience needed to reach max level. Can use either an explicit value or a variable +## scope = raid +alias[effect:raid_add_unit_experience] = variable_field + +### Promote the officer of the division to a general +### scope = unit +alias[effect:promote_officer_to_general] = bool + +# debug/test command? +alias[effect:store_ref] = scalar + +### Removes a contested owner to a state. The effect can be used either from a country or a state scope and accepts the other as parameter. +## scope = state +alias[effect:remove_contested_owner] = scope[country] +### Removes a contested owner to a state. The effect can be used either from a country or a state scope and accepts the other as parameter. +## scope = country +alias[effect:remove_contested_owner] = scope[state] + +### Add progress to the project's prototype phase. nThe input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between -1 and 1. +## scope = project +alias[effect:add_project_progress_ratio] = float[-1.0..1.0] +### Add progress to the project's prototype phase. nThe input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between -1 and 1. +## scope = project +alias[effect:add_project_progress_ratio] = value[variable] + + + +### Executes the provided effects but with a custom tooltip surpressing all tooltips from all other effects inside this block. The custom tooltip is a [bindable localization] +## scope = any +alias[effect:custom_override_tooltip] = { + tooltip = localisation + tooltip = single_alias_right[bindable_loc] + ## cardinality = 1..inf + alias_name[effect] = alias_match_left[effect] +} +single_alias[bindable_loc] = { + localization_key = localisation + ## cardinality = 0..inf + scalar = single_alias_right[bindable_loc] + ## cardinality = 0..inf + scalar = scalar +} + +### Complete a prototype reward option for the project in scope \nThe effect will respect the fire only once and allowed property of prototype rewards. +## scope = project +alias[effect:complete_prototype_reward_option] = { + prototype_reward = + ## cardinality = 0..1 + prototype_reward_option = + ## cardinality = 0..1 + show_modifiers = bool +} + +### Adds permanent subunit and subunit category bonuses for country. +## scope = country +alias[effect:add_unit_bonus] = { + ## cardinality = 0..inf + = { + ## cardinality = 0..inf + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } + ## cardinality = 0..inf + enum[unit_category] = { + ## cardinality = 0..inf + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } +} + +### Set facility level in a random province of state and country scope. +## scope = state +alias[effect:construct_building_in_random_province] = { + = int +} diff --git a/Config/interface/gfx.cwt b/Config/interface/gfx.cwt index 8a8c5ee7..e23b1096 100644 --- a/Config/interface/gfx.cwt +++ b/Config/interface/gfx.cwt @@ -60,6 +60,8 @@ types = { subtype[pieChartType] = { } ## type_key_filter = circularProgressBarType subtype[circularProgressBarType] = { } + ## type_key_filter = LineChartType + subtype[LineChartType] = { } } } @@ -117,6 +119,7 @@ spriteType = { generate_mip_maps = bool subtype[spriteType] = { textureFile = filepath + clicksound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files } subtype[frameAnimatedSpriteType] = { textureFile = filepath @@ -129,6 +132,8 @@ spriteType = { size = { x = int y = int } ## cardinality = 0..1 animation_rate_spf = int + ## cardinality = 0..1 + allwaystransparent = bool } subtype[maskedShieldType] = { textureFile1 = scalar @@ -164,4 +169,8 @@ spriteType = { rotation = int amount = int } + subtype[LineChartType] = { + size = { x = int y = int } + linewidth = float + } } diff --git a/Config/interface/gui.cwt b/Config/interface/gui.cwt index 7fcaa8af..2c57a455 100644 --- a/Config/interface/gui.cwt +++ b/Config/interface/gui.cwt @@ -360,6 +360,8 @@ alias[gui:listBoxType] = { borderSize = { x = int y = int } ## cardinality = 0..1 offset = { x = int y = int } + ## cardinality = 0..1 + backGround = } ### Dynamic List @@ -380,6 +382,11 @@ alias[gui:smoothListBoxType] = { borderSize = { x = int y = int } ## cardinality = 0..1 offset = { x = int y = int } + ### Will remove elements outside of size bounding box + ## cardinality = 0..1 + clipping = bool + ## cardinality = 0..1 + priority = int } ###Non-clickable icon @@ -420,9 +427,6 @@ alias[gui:instantTextBoxType] = { ### Name referenced by scripted gui name = scalar ## cardinality = 0..1 - text = localisation - ## cardinality = 0..1 - text = localisation_inline ## cardinality = 0..1 font = scalar ## cardinality = 0..1 @@ -497,6 +501,8 @@ alias[gui:editBoxType] = { ### Missing Descriptiion, need testing textureFile = ## cardinality = 0..1 + textureFile = filepath + ## cardinality = 0..1 #DEBUG ### Vertical alignement in text box vertical_alignment = enum[guiTextFormatsVertical] @@ -510,6 +516,14 @@ alias[gui:editBoxType] = { text_color_code = scalar ## cardinality = 0..1 truncate = bool + ## cardinality = 0..1 + instantTextBoxType = bool + ## cardinality = 0..1 + use_special_chars = bool + ## cardinality = 0..1 + cursor = { x = int y = int } + ## cardinality = 0..1 + is_multiline = bool } ### Checkbox alias[gui:checkboxType] = { @@ -525,6 +539,30 @@ alias[gui:checkboxType] = { alias_name[gui_sound] = alias_match_left[gui_sound] alias_name[gui_localization] = alias_match_left[gui_localization] } +alias[gui:scrollbarType] = { + name = scalar + slider = scalar + track = scalar + leftbutton = scalar + rightbutton = scalar + size = {x=int y=int} + position = {x=int y=int} + priority = int + borderSize = {x=int y=int} + maxValue = int + minValue = int + stepSize = int + startValue = int + horizontal = int + ## cardinality = 4..4 + guiButtonType = { + name = scalar + quadTextureSprite = + position = {x=int y=int} + ## cardinality = 0..1 + clicksound = click_default + } +} alias[gui:extendedScrollbarType] = { name = scalar alias_name[gui_standard] = alias_match_left[gui_standard] @@ -748,11 +786,16 @@ alias[gui_localization:tooltip] = localisation #alias[gui_localization:tooltip] = localisation_inline ### Text ontop of elements alias[gui_localization:text] = localisation -#alias[gui_localization:text] = localisation_inline +alias[gui_localization:text] = localisation_inline alias[gui_localization:pdx_disabled_tooltip] = localisation -#alias[gui_localization:text] = localisation_inline alias[gui_localization:pdx_disabled_tooltip_delayed] = localisation -#alias[gui_localization:text] = localisation_inline +alias[gui_localization:bound_tooltip] = single_alias_right[bindable_loc] +alias[gui_localization:context_aware_tooltip] = localisation +alias[gui_localization:context_aware_tooltip] = single_alias_right[bindable_loc] +alias[gui_localization:tooltipText] = localisation +alias[gui_localization:delayedTooltipText] = localisation +alias[gui_localization:context_aware_text] = localisation +alias[gui_localization:context_aware_text] = single_alias_right[bindable_loc] #GUI Animation ### Position before animation in pixels @@ -824,14 +867,15 @@ alias[gui_animation:animation_type] = enum[animationTypes] alias[gui_animation:animation_time] = float alias[gui_animation:fade_time] = float alias[gui_animation:fade_type] = linear +alias[gui_animation:fade_type] = accelerated # GUI Sound -alias[gui_sound:upsound] = scalar -alias[gui_sound:downsound] = scalar -alias[gui_sound:show_sound] = scalar -alias[gui_sound:hide_sound] = scalar -alias[gui_sound:clicksound] = scalar -alias[gui_sound:oversound] = scalar +alias[gui_sound:upsound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files +alias[gui_sound:downsound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files +alias[gui_sound:show_sound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files +alias[gui_sound:hide_sound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files +alias[gui_sound:clicksound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files +alias[gui_sound:oversound] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files enums = { enum[animationTypes] = { @@ -878,6 +922,7 @@ enums = { center centre right + down } enum[guiTextFormatsVertical] = { top diff --git a/Config/modifier_categories.cwt b/Config/modifier_categories.cwt index 1414c7df..2c0adc88 100644 --- a/Config/modifier_categories.cwt +++ b/Config/modifier_categories.cwt @@ -50,4 +50,10 @@ modifier_categories = { military_industrial_organization = { supported_scopes = { military_industrial_organization } } + character = { + supported_scopes = { character } + } + scientist = { + supported_scopes = { character } + } } \ No newline at end of file diff --git a/Config/modifiers.cwt b/Config/modifiers.cwt index f9efd08e..ec7bae97 100644 --- a/Config/modifiers.cwt +++ b/Config/modifiers.cwt @@ -1028,6 +1028,112 @@ modifiers = { training_time_army_factor = war_production weekly_manpower = war_production + ### WUW patch modifiers + river_crossing_factor_against = army + scientist_breakthrough_bonus_factor = character + scientist_research_bonus_factor = character + scientist_xp_gain_factor = character + female_random_scientist_chance = country + production_speed_facility_factor = country + resource_trade_cost_bonus_per_factory = country + special_project_facility_supply_consumption_factor = country + special_project_speed_factor = country + thermonuclear_production = country + thermonuclear_production_factor = country + underway_replenishment_convoy_cost = country + underway_replenishment_range = country + naval_commando_raid_distance = naval + female_random_scientist_chance = scientist + state_production_speed_facility_factor = state + _speed_factor = country + _speed_factor = country + enum[project_tag]_speed_factor = country + _max_level_terrain_limit = country + state__max_level_terrain_limit = state + + ### sort later + _acceptance = politics + _drift = politics + state_repair_speed__factor = state + enum[tech_category]_cost_factor = country + trait__xp_gain_factor = army + trait__xp_gain_factor = naval + trait__xp_gain_factor = country + _xp_gain_factor = army + _xp_gain_factor = naval + _xp_gain_factor = country + unit__design_cost_factor = country + unit__design_cost_factor = army + unit__design_cost_factor = naval + _design_cost_factor = country + _design_cost_factor = army + _design_cost_factor = naval + _design_cost_factor = country + _design_cost_factor = army + _design_cost_factor = naval + production_cost_max_ = naval + production_cost_max_ = naval + experience_gain__combat_factor = country + experience_gain__combat_factor = naval + experience_gain__training_factor = country + experience_gain__training_factor = naval + _preferred_weight_factor = country + #also country? + country_resource_cost_ = country + state_resource_cost_ = state + #also country? + country_resource_ = country + state_resource_ = state + temporary_state_resource_ = state + enum[sub_unit_modifiers] = army + production_speed__factor = country + state_production_speed__factor = state + state_resources__factor = state + + + ### scriptrelated modifier stuff + _xp_gain_factor = army + module__design_cost_factor = army + trait__xp_gain_factor = army + unit__design_cost_factor = army + _max_level_terrain_limit = country + _preferred_weight_factor = country + _design_cost_factor = country + _category_type_cost_factor = country + _cost_factor = country + _speed_factor = country + _cost_factor = country + _xp_gain_factor = country + experience_gain__combat_factor = country + experience_gain__training_factor = country + module__design_cost_factor = country + production_cost__factor = country + production_speed__factor = country + repair_speed__factor = country + trait__xp_gain_factor = country + unit__design_cost_factor = country + _cost = intelligence_agency + _outcome = intelligence_agency + _risk = intelligence_agency + _xp_gain_factor = naval + experience_gain__combat_factor = naval + experience_gain__training_factor = naval + module__design_cost_factor = naval + production_cost_max_ = naval + trait__xp_gain_factor = naval + unit__design_cost_factor = naval + _acceptance = politics + _drift = politics + _speed_factor = state + country_resource_ = country + country_resource_cost_ = country + state__max_level_terrain_limit = state + state_production_speed__factor = state + state_repair_speed__factor = state + state_resource_ = state + state_resource_cost_ = state + state_resources__factor = state + temporary_state_resource_ = state ### THE FOLLOWING MODIFERS DO NOT PRESENT IN MD DOC (NSB patch) @@ -1309,6 +1415,7 @@ enums = { mic_to_overlord_factor overlord_trade_cost_factor subjects_autonomy_gain + enum[equipment_bonus_type]_design_cost_factor additional_brigade_column_size agency_upgrade_time air_doctrine_cost_factor @@ -1476,6 +1583,7 @@ enums = { production_lack_of_resource_penalty_factor production_oil_factor production_speed_buildings_factor + production_speed__factor railway_gun_bombardment_factor refit_ic_cost refit_speed @@ -1721,6 +1829,7 @@ enums = { peace_score_ratio_transferred_to_overlord peace_score_ratio_transferred_to_players puppet_cost_factor + _drift drift_defence_factor embargo_cost_factor embargo_threshold_factor @@ -1843,6 +1952,55 @@ enums = { training_time_army training_time_army_factor weekly_manpower + scientist_breakthrough_bonus_factor + scientist_research_bonus_factor + scientist_xp_gain_factor + female_random_scientist_chance + production_speed_facility_factor + resource_trade_cost_bonus_per_factory + special_project_facility_supply_consumption_factor + special_project_speed_factor + thermonuclear_production + thermonuclear_production_factor + underway_replenishment_convoy_cost + underway_replenishment_range + naval_commando_raid_distance + female_random_scientist_chance + state_production_speed_facility_factor + _speed_factor + _speed_factor + enum[project_tag]_speed_factor + _max_level_terrain_limit + state__max_level_terrain_limit + _acceptance + _drift + state_repair_speed__factor + enum[tech_category]_cost_factor + trait__xp_gain_factor + trait__xp_gain_factor + _xp_gain_factor + _xp_gain_factor + unit__design_cost_factor + unit__design_cost_factor + _design_cost_factor + _design_cost_factor + _design_cost_factor + _design_cost_factor + production_cost_max_ + production_cost_max_ + experience_gain__combat_factor + experience_gain__combat_factor + experience_gain__training_factor + experience_gain__training_factor + _preferred_weight_factor + country_resource_cost_ + state_resource_cost_ + country_resource_ + state_resource_ + temporary_state_resource_ + production_speed__factor + state_production_speed__factor + state_resources__factor air_advisor_cost_factor air_advisor_cost_factor air_carrier_night_penalty_reduction_factor @@ -2202,6 +2360,7 @@ enums = { modifier_army_sub_unit_paratrooper_defence_factor modifier_army_sub_unit_paratrooper_max_org_factor modifier_army_sub_unit_paratrooper_speed_factor + module__design_cost_factor motorized_attack_factor motorized_defence_factor mountaineers_special_forces_contribution_factor @@ -2236,5 +2395,14 @@ enums = { unit_upkeep_attrition_factor winter_attrition winter_attrition_factor + module__design_cost_factor + module__design_cost_factor + river_crossing_factor_against + trait__xp_gain_factor + _xp_gain_factor + unit__design_cost_factor + _design_cost_factor + _design_cost_factor + enum[sub_unit_modifiers] } } diff --git a/Config/on_actions.cwt b/Config/on_actions.cwt index 363ef23b..a802f541 100644 --- a/Config/on_actions.cwt +++ b/Config/on_actions.cwt @@ -528,6 +528,13 @@ types = { path = "game/common/on_actions" skip_root_key = on_actions } + + ## type_key_filter = on_project_completion + type[on_project_completion] = { + path = "game/common/on_actions" + skip_root_key = on_actions + } + } on_action = { @@ -1111,6 +1118,12 @@ on_action = { ## cardinality = 0..inf ## replace_scope = { ROOT = military_industrial_organization this = military_industrial_organization FROM = COUNTRY } on_mio_industrial_manufacturer_unassigned = single_alias_right[on_action_effect] + + ### Triggered when a project is completed + ### ROOT is the Military Industrial Organization, FROM is the owner of the MIO country + ## cardinality = 0..inf + ## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = special_project } + on_project_completion = single_alias_right[on_action_effect] } single_alias[country_event_effect] = { diff --git a/Config/portraits.cwt b/Config/portraits.cwt index bf02872a..f31e1b27 100644 --- a/Config/portraits.cwt +++ b/Config/portraits.cwt @@ -42,6 +42,8 @@ portrait = { ## cardinality = 0..inf = single_alias_right[portraits] } + ## cardinality = 0..1 + scientist = single_alias_right[portraits] } single_alias[portraits] = { diff --git a/Config/scopes.cwt b/Config/scopes.cwt index e04d3177..3b6afd4d 100644 --- a/Config/scopes.cwt +++ b/Config/scopes.cwt @@ -149,4 +149,10 @@ scopes = { Unit = { aliases = { unit } } + Raid = { + aliases = { raid_instance raid } + } + "Special Project" = { + aliases = { special_project project } + } } \ No newline at end of file diff --git a/Config/shared_enums.cwt b/Config/shared_enums.cwt index bc8d78cf..3bd55bbb 100644 --- a/Config/shared_enums.cwt +++ b/Config/shared_enums.cwt @@ -12,6 +12,7 @@ enums = { "By Blood Alone" "Arms Against Tyranny" "Trial of Allegiance" + "Gotterdammerung" } enum[hours_days_months] = { @@ -25,6 +26,11 @@ enums = { ahead_reduction } + enum[gender] = { + male + female + } + enum[diplomatic_relations] = { non_aggression_pact guarantee diff --git a/Config/temp_modifiers.cwt b/Config/temp_modifiers.cwt index 72121db4..c59c5b8f 100644 --- a/Config/temp_modifiers.cwt +++ b/Config/temp_modifiers.cwt @@ -14,10 +14,15 @@ alias[modifier_rule:modifier] = { alias_name[trigger] = alias_match_left[trigger] } +#placed in modifiers file alias[modifier:_acceptance] = int +#placed in modifiers file alias[modifier:_drift] = float -alias[modifier:local_resources_] = int +#does not exist +#alias[modifier:local_resources_] = int +#placed in modifiers file alias[modifier:country_resource_cost_] = int +## scope = state alias[modifier:state_resource_cost_] = int alias[modifier:country_resource_] = int alias[modifier:state_resource_] = int @@ -25,6 +30,7 @@ alias[modifier:temporary_state_resource_] = int alias[modifier:enum[sub_unit_modifiers]] = float alias[modifier:production_speed__factor] = float alias[modifier:state_production_speed__factor] = float +#placed in modifiers file alias[modifier:repair_speed__factor] = float alias[modifier:] = float alias[modifier:value[idea_slot]_cost_factor] = float @@ -33,6 +39,17 @@ alias[modifier:hidden_modifier] = { } alias[modifier:custom_modifier_tooltip] = localisation +# WUW patch modifiers +#placed in modifiers file +## scope = { country state } +alias[modifier:_speed_factor] = float +#placed in modifiers file +## scope = { country state } +alias[modifier:_speed_factor] = float +#placed in modifiers file +## scope = { country state } +alias[modifier:enum[project_tag]_speed_factor] = float + #unit stats alias[unit_stat:acclimatization_cold_climate_gain_factor] = float alias[unit_stat:acclimatization_hot_climate_gain_factor] = float @@ -81,6 +98,8 @@ alias[unit_stat:suppression_factor] = float alias[unit_stat:suppression] = float alias[unit_stat:training_time] = float alias[unit_stat:weight] = float +alias[unit_stat:additional_collateral_damage] = float +alias[unit_stat:recovery] = float #naval stats alias[naval_stat:anti_air_attack] = float diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt new file mode 100644 index 00000000..6ab43bc9 --- /dev/null +++ b/Config/triggers_gtd.cwt @@ -0,0 +1,254 @@ +### Checks if at least one scientist of the Country in scope matches the triggers. +## scope = country +## push_scope = character +alias[trigger:any_scientist] = { + ## cardinality = 0..1 + tooltip = localisation + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + include_invisible = no + ## cardinality = 0..1 + include_invisible = yes + alias_name[trigger] = alias_match_left[trigger] +} + +### Checks if all scientists of the Country in scope matches the triggers. +## scope = country +## push_scope = character +alias[trigger:all_scientists] = { + ## cardinality = 0..1 + tooltip = localisation + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + include_invisible = no + ## cardinality = 0..1 + include_invisible = yes + alias_name[trigger] = alias_match_left[trigger] +} + +### Checks if the scientist of the character in scope matches the skill level condition for a specialization. Supports < > = operators. +## scope = character +alias[trigger:has_scientist_level] = { + level = int + specialization = +} + +### Checks if the scientist of the character in scope is assigned to a project +## scope = character +alias[trigger:is_active_scientist] = bool + + +### Check if flag has been set within the special project in scope. May checks on the value or date/days since last modified date. +## scope = project +## severity = warning +alias[trigger:has_project_flag] = value[project_flag] + +### Check if flag has been set within the special project in scope. May checks on the value or date/days since last modified date. +## scope = project +## severity = warning +alias[trigger:has_project_flag] = { + flag = value[project_flag] + ## cardinality = 0..1 + value = int + ## cardinality = 0..1 + date = date_field + ## cardinality = 0..1 + days = int +} + +### Checks if at least one active scientist of the Country in scope matches the triggers. +## scope = country +## push_scope = character +alias[trigger:any_active_scientist] = { + ## cardinality = 0..1 + tooltip = localisation + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + include_invisible = no + ## cardinality = 0..1 + include_invisible = yes + alias_name[trigger] = alias_match_left[trigger] +} + +### Checks if all active scientists of the Country in scope matches the triggers. +## scope = country +## push_scope = character +alias[trigger:all_active_scientist] = { + ## cardinality = 0..1 + tooltip = localisation + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + include_invisible = no + ## cardinality = 0..1 + include_invisible = yes + alias_name[trigger] = alias_match_left[trigger] +} + +### Checks if the scientist of the character in scope is injured +## scope = character +alias[trigger:is_scientist_injured] = bool + +### Checks if the country in scope has enough breakthroughs within a given specialization. +##scope = country +alias[trigger:has_breakthrough_points] = { + specialization = + value = int +} + +### Check if the scoped country has a naval invasion against the specified state. +## scope = country +alias[trigger:has_naval_invasion_against_state] = scope[state] + +### Check if the scoped country has a naval invasion against the specified state. +## scope = country +alias[trigger:has_naval_invasion_against_state] = value[variable] + +### Check if the scoped country has a naval invasion against the specified state. +## scope = country +alias[trigger:has_naval_invasion_against_state] = { + state = scope[state] + state = value[variable] + ## cardinality = 0..1 + preparation = float + ## cardinality = 0..1 + activated = bool +} + +### check if any state in the given category meets the trigger. +## scope = any +alias[trigger:any_state_in] = { + ## cardinality = 0..1 + tooltip = localisation + array = value[variable] + + alias_name[trigger] = alias_match_left[trigger] +} +### check if any state in the given category meets the trigger. +## scope = any +alias[trigger:any_state_in] = { + ## cardinality = 0..1 + tooltip = localisation + continent = enum[continents] + + alias_name[trigger] = alias_match_left[trigger] +} +### check if any state in the given category meets the trigger. +## scope = any +alias[trigger:any_state_in] = { + ## cardinality = 0..1 + tooltip = localisation + ai_area = + + alias_name[trigger] = alias_match_left[trigger] +} +### check if any state in the given category meets the trigger. +## scope = any +alias[trigger:any_state_in] = { + ## cardinality = 0..1 + tooltip = localisation + strategic_region = + + alias_name[trigger] = alias_match_left[trigger] +} + +### Check if the current scope exist. +## scope = any +alias[trigger:scope_exists] = bool + +### check cost of equipment production line +# debug/test command? +alias[trigger:equipment_cost] = { +} + +### Checks if the country in scope has completed the special project in input. +## scope = country +alias[trigger:is_special_project_completed] = scope[special_project] +### Checks if the country in scope has completed the special project in input. +## scope = country +alias[trigger:is_special_project_completed] = value[variable] + +### Checks if the country in scope is currently researching the special project in input. +## scope = country +alias[trigger:is_special_project_being_researched] = scope[special_project] +### Checks if the country in scope is currently researching the special project in input. +## scope = country +alias[trigger:is_special_project_being_researched] = value[variable] + +### Check if the country has market access with another country. +## scope = country +alias[trigger:has_market_access_with] = scope[country] + +### checks if division has an officer with the provided name key. +## scope = unit +alias[trigger:has_officer_name] = localisation + +### Check that ratio of atrillery battalions in the composition of a side of combating troops are over a certain level. +## scope = combat +alias[trigger:has_artillery_ratio] = float + +### Check if the combatant has at least one of the provided unit types. +## scope = combat +alias[trigger:has_unit_type] = + +### Check if the victory points of the combatants province is larger or less than the provinded amount. +## scope = combat +alias[trigger:province_vp] = int + +### Check if country has shine effect on focus (either manually achieved or by being worked on). +### scope = country +alias[trigger:has_shine_effect_on_focus] = +### Check if country has shine effect on focus (either manually achieved or by being worked on). +### scope = country +alias[trigger:has_shine_effect_on_focus] = + +alias[trigger:custom_override_tooltip] = { + tooltip = localisation + tooltip = single_alias_right[bindable_loc] + ## cardinality = 0..1 + alias_name[effect] = alias_match_left[effect] +} + +### 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. +## scope = country +alias[trigger:has_contested_owner] = scope[state] +### 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. +## scope = state +alias[trigger:has_contested_owner] = scope[country] + +### Compares the total army fighting strength between the scope country and the one set with 'tag' +## scope = country +alias[trigger:fighting_army_strength_ratio] = { + tag = scope[country] + ## cardinality = 0..1 + civilian_intel = variable_field + ## cardinality = 0..1 + army_intel = variable_field + ## cardinality = 0..1 + navy_intel = variable_field + ## cardinality = 0..1 + airforce_intel = variable_field +} + +### Checks if the country in scope has a scientist with a skill level of at least 1 in specialization. +## scope = country +alias[trigger:has_scientist_specialization] = + +### Checks if the country in scope has a facility with specialization. +## scope = country +alias[trigger:has_facility_specialization] = + +### Checks if the country (as ROOT) and state in scope can build a building in the state. +## scope = state +alias[trigger:can_construct_building] = + +### total number of nukes that are currently ready to be dropped +## scope = country +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 \ No newline at end of file diff --git a/Config/variables.cwt b/Config/variables.cwt index 64400e5d..46e736b6 100644 --- a/Config/variables.cwt +++ b/Config/variables.cwt @@ -280,7 +280,7 @@ values = { ### Number of battalions. num_battalions - ### Number of battalions with sub unit type, sub unit type is defined in target. Example: num_of_battalions_with_type@light_armor. + ### Number of battalions with sub unit type, sub unit type is defined in target. Example: num_battalions_with_type@light_armor. num_battalions_with_type@ ### Number of controlled states. @@ -310,12 +310,6 @@ values = { ### Number of owned states. num_owned_states - ### Number of ships. - num_ships - - ### Number of ships controlled in country, ship type is defined in target. Example num_ships_with_type@carrier. - num_ships_with_type@ - ### Number of equipment required in armies of the country, equipment type token is defined in target. Example num_target_equipment_in_armies@infantry_equipment. num_target_equipment_in_armies@ @@ -783,21 +777,12 @@ values = { ### Number of basic traits a leader has. num_basic_traits - ### Number of battalions. - num_battalions - - ### Number of battalions with sub unit type, sub unit type is defined in target. Example: num_battalions_with_type@light_armor. - num_battalions_with_type@ - ### Number of battle plans of unit leader. num_battle_plans ### Number of units with cavalry dominant type. num_cavalry - ### Number of equipment in army of a leader, equipment type token is defined in target. example num_equipment@infantry_equipment. - num_equipment@ - ### Number of units with infantry dominant type. num_infantry @@ -1088,6 +1073,125 @@ values = { ### Number of unused trait points of the military industrial organization number_of_unused_trait_points + + #### wuw patch variables + + ### total produced equipment of typecrossing_support_vehicle + total_equipment_produced_crossing_support_vehicle + + ### Total produced equipment of typearmored_recovery_vehicle + total_equipment_produced_armored_recovery_vehicle + + ### calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_civilian_factories_in_cores@GER + num_of_civilian_factories_in_cores@scope[country] + num_of_civilian_factories_in_cores@enum[country_tags] + + ### calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_military_factories_in_cores@GER + num_of_military_factories_in_cores@scope[country] + num_of_military_factories_in_cores@enum[country_tags] + + ### calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_naval_factories_in_cores@my_var + num_of_naval_factories_in_cores@scope[country] + num_of_naval_factories_in_cores@enum[country_tags] + + ### Total produced equipment of typesam_missile + total_equipment_produced_sam_missile + + ### Total constructions of gun_emplacement + total_constructed_gun_emplacement + + ### Total produced equipment of typeclearance_vehicle + total_equipment_produced_clearance_vehicle + + ### Total produced equipment of typeballistic_missile + total_equipment_produced_ballistic_missile + + ### Total produced equipment of typeland_cruiser + total_equipment_produced_land_cruiser + + ### Total produced equipment of typeemplacement_gun_ammo + total_equipment_produced_emplacement_gun_ammo + + ### Total produced equipment of typemissile_launcher + total_equipment_produced_missile_launcher + + ### Total produced equipment of typenuclear_missile + total_equipment_produced_nuclear_missile + + ### total number of nukes that are currently ready to be dropped + num_nukes_being_dropped + + ### 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) + num_nukes_left_to_drop + + #Special project scoped variables: + ### State that the project is researched in + facility_state + ### The province that the project is researched in + facility_province_id + ### The scientist that researches the project + scientist + + # ======================== + # RAID VARIABLES + # ======================== + actor_country + victim_country + target_state + target_province + + # end of wuw + + ### TO be sorted + ### global + ### An array of controller countries for each province. In this case, the province ID serves as the index: the controller of province 1234 is province_controllers^1234. + province_controllers + ### Every state that exists in the game. Array + states + ### Checks turn number in PC.\nExample:\npc_turn > 20 + pc_turn + ### The current daily change in the value of the balance of power. Can be targeted @ITA_power_balance + power_balance_daily_change + power_balance_daily_change@ + ### The current weekly change in the value of the balance of power. + power_balance_weekly_change + power_balance_weekly_change@ + ### check amount of gained career points + num_of_career_profile_points + ### Maximum fuel of country in thousands. + + ### country scoped + max_fuel_k + ### The number of upgrade done in the intelligence agency. + agency_upgrade_number + ### The current weekly change in power balance. + power_balance_weekly + ### Air experience that the country has. + air_experience + ### The remaining amount of days for a completed decision before it gets removed. + days_decision_timeout@ + ### The malus from bombing towards war support on the scale from 0 to 1. + has_bombing_war_support + ##The current daily change in power balance. + power_balance_daily + ### Amount of supply nodes. + num_of_supply_nodes + ### The malus from casualties towards war support on the scale from 0 to 1. + has_casualties_war_support + ### The malus from sunk convoys towards war support on the scale from 0 to 1. + has_convoys_war_support + ### returns an array with the currently hired high command of the country + high_command + ### returns an array with the currently hired political advisors of the country + political_advisor + ### Check number of months the country has been at war + longest_war_length + + ### unit_leader_scoped + ### Number of order groups assigned to the unit leader. + num_orders_groups + + # ======================== # MODIFIER VARIABLES # ======================== @@ -1103,5 +1207,8 @@ values = { ### Custom modifier accessed via variable modifier@ + + ## constant hacky + constant: } } diff --git a/tests/test_check_missing_variables.py b/tests/test_check_missing_variables.py index 874cfb84..5ce5edb8 100644 --- a/tests/test_check_missing_variables.py +++ b/tests/test_check_missing_variables.py @@ -23,7 +23,7 @@ def check_missing_variables(): # 2 Extract variables from config files variables_list_config = [] - variable_block_pattern = r'value\[variable\] = \{.*?\}' + variable_block_pattern = r'^\tvalue\[variable\] = \{.*?^\t\}' variable_pattern = r'\t\t([^#\n\t]+)' for filename in glob.iglob(path_to_config + "**/*.cwt", recursive=True): with open(filename, 'r') as text_file: From 23a2271f4f1900fdc517a7d5dcb4372debb4df4d Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:20:03 +0100 Subject: [PATCH 17/73] various fixes and addtions --- Config/common/abilities.cwt | 2 +- Config/common/combat_tactics.cwt | 1 + Config/common/decisions.cwt | 3 + Config/common/dynamic_modifiers.cwt | 2 +- Config/common/equipment.cwt | 52 +++++++-- Config/common/intelligence_agency_updates.cwt | 2 +- .../military_industrial_organizations.cwt | 1 + Config/common/occupation_laws.cwt | 2 +- Config/common/peace_conference.cwt | 1 + Config/common/script_enums.cwt | 10 ++ Config/common/scripted_guis.cwt | 9 +- Config/common/technologies.cwt | 32 +++++- Config/common/terrain.cwt | 5 + Config/common/units.cwt | 104 ++++++++++++------ Config/effects.cwt | 57 ++++++++-- Config/effects_aat.cwt | 3 +- Config/effects_bba.cwt | 4 +- Config/effects_nsb.cwt | 16 +-- Config/folders.cwt | 1 + Config/gfx/model_entities.cwt | 69 +++++++++++- Config/links.cwt | 11 +- Config/sound.cwt | 79 +++++++++++++ Config/triggers.cwt | 10 +- Config/triggers_new.cwt | 2 + 24 files changed, 399 insertions(+), 79 deletions(-) create mode 100644 Config/sound.cwt diff --git a/Config/common/abilities.cwt b/Config/common/abilities.cwt index 0d7313b0..ed8f709e 100644 --- a/Config/common/abilities.cwt +++ b/Config/common/abilities.cwt @@ -14,7 +14,7 @@ ability = { icon = ## cardinality = 0..1 - sound_effect = scalar + sound_effect = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files type = enum[ability_unit_leader_types] diff --git a/Config/common/combat_tactics.cwt b/Config/common/combat_tactics.cwt index 7a1fd430..5fb942b2 100644 --- a/Config/common/combat_tactics.cwt +++ b/Config/common/combat_tactics.cwt @@ -52,6 +52,7 @@ enums = { tactical_withdrawal seize_bridge hold_bridge + street_fighting # MD Phase main diff --git a/Config/common/decisions.cwt b/Config/common/decisions.cwt index d7bd569b..16d54404 100644 --- a/Config/common/decisions.cwt +++ b/Config/common/decisions.cwt @@ -38,6 +38,9 @@ types = { subtype[state_targeted] = { state_target = any_controlled_state } + subtype[state_targeted] = { + state_target = any + } ## only_if_not = { state_targeted } subtype[targeted] = { target_trigger = { diff --git a/Config/common/dynamic_modifiers.cwt b/Config/common/dynamic_modifiers.cwt index e20e5dff..58a753ba 100644 --- a/Config/common/dynamic_modifiers.cwt +++ b/Config/common/dynamic_modifiers.cwt @@ -31,5 +31,5 @@ dynamic_modifier = { ## cardinality = 0..inf alias_keys_field[modifier] = variable_field ## cardinality = 0..inf - alias_keys_field[modifier] = localisation + custom_modifier_tooltip = localisation } diff --git a/Config/common/equipment.cwt b/Config/common/equipment.cwt index fd863e55..7245ae02 100644 --- a/Config/common/equipment.cwt +++ b/Config/common/equipment.cwt @@ -62,8 +62,14 @@ types = { ### All parent module slots will directly inherited with no modifications. module_slots = inherit } + subtype[railway_gun_archetype] = { + type = railway_gun + } + subtype[railway_gun] = { + type = railway_gun + } subtype[railway_gun] = { - archetype = railway_gun_equipment + archetype = } } type[upgrade] = { @@ -78,6 +84,9 @@ types = { subtype[land_upgrade] = { cost = land } + subtype[railway_gun] = { + type = railway_gun + } } ## type_key_filter <> limit type[module] = { @@ -150,6 +159,8 @@ equipment = { } ## cardinality = 0..1 supply_truck = bool + ## cardinality = 0..1 + max_military_factories = float subtype[archetype_equip] = { ### GFX reference used to define equipment picture in land-lease. @@ -252,7 +263,7 @@ equipment = { family = ## cardinality = 0..1 can_convert_from = { - ## cardinality = 1..inf + ## cardinality = ~1..inf } } @@ -315,15 +326,24 @@ equipment = { derived_variant_name = localisation } + subtype[railway_gun] = { + ## cardinality = 0..1 + railway_gun_attack_range_index_in_define = int + ## cardinality = 0..1 + railway_gun_annex_ratio = float + ## cardinality = 0..1 + railway_gun_hours_between_redistribution = int + } + ## cardinality = 0..1 ### Internal type: what kind of unit can use this equipment. - type = enum[unit_types] + type = enum[equipment_category] ## cardinality = 0..1 ### Internal type: what kind of unit can use this equipment. type = { ## cardinality = 1..inf - enum[unit_types] + enum[equipment_category] } alias_name[unit_stat] = alias_match_left[unit_stat] @@ -445,27 +465,32 @@ module = { ## cardinality = 0..1 sfx = scalar ## cardinality = 0..1 - allow_equipment_type = enum[unit_types] + allow_equipment_type = enum[equipment_category] ## cardinality = 0..1 - forbid_equipment_type_exact_match = enum[unit_types] + allow_equipment_type = { + ## cardinality = 0..inf + enum[equipment_category] + } + ## cardinality = 0..1 + forbid_equipment_type_exact_match = enum[equipment_category] ## cardinality = 0..1 - forbid_equipment_type = enum[unit_types] + forbid_equipment_type = enum[equipment_category] ## cardinality = 0..1 forbid_equipment_type = { ## cardinality = ~1..inf - enum[unit_types] + enum[equipment_category] } ## cardinality = 0..1 forbid_equipment_type_exact_match_for_category = { ## cardinality = ~1..inf - enum[module_categories] = enum[unit_types] + enum[module_categories] = enum[equipment_category] } ## cardinality = 0..1 - add_equipment_type = enum[unit_types] + add_equipment_type = enum[equipment_category] ## cardinality = 0..1 add_equipment_type = { ## cardinality = 0..inf - enum[unit_types] + enum[equipment_category] } ## cardinality = 0..1 ### Adds the provided stats to the given module @@ -474,6 +499,9 @@ module = { enum[equipment_stat] = float } + ## cardinality = 0..1 + mega_carrier = bool + ## cardinality = 0..1 ### Manpower required to produce one unit of the equipment (naval only). manpower = int @@ -505,6 +533,7 @@ module = { module_category = enum[module_categories] ## cardinality = 0..1 module = + ## cardinality = ~1..1 convert_cost_ic = float ## cardinality = 0..1 convert_cost_resources = { @@ -634,7 +663,6 @@ enums = { cv_naval_bomber cv_suicide heavy_fighter - interceptor } complex_enum[module_slots] = { path = "game/common/units/equipment" diff --git a/Config/common/intelligence_agency_updates.cwt b/Config/common/intelligence_agency_updates.cwt index 4b17e339..41f321fd 100644 --- a/Config/common/intelligence_agency_updates.cwt +++ b/Config/common/intelligence_agency_updates.cwt @@ -18,7 +18,7 @@ intelligence_agency_upgrade = { frame = ## cardinality = 0..1 ### Optional, "click_default" by default. - sound = scalar + sound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files ## cardinality = 0..1 ai_will_do = { diff --git a/Config/common/military_industrial_organizations.cwt b/Config/common/military_industrial_organizations.cwt index f3954b1c..cd974380 100644 --- a/Config/common/military_industrial_organizations.cwt +++ b/Config/common/military_industrial_organizations.cwt @@ -238,6 +238,7 @@ military_industrial_organization = { ### Defines where the trait will be positioned in the tree grid. x=0 y=0 is the top left position. ### Do not reuse the same position twice. + ## cardinality = 0..1 position = { x = float y = float diff --git a/Config/common/occupation_laws.cwt b/Config/common/occupation_laws.cwt index a3a86112..d4078cac 100644 --- a/Config/common/occupation_laws.cwt +++ b/Config/common/occupation_laws.cwt @@ -20,7 +20,7 @@ occupation_law = { ### plays when the law is selected ## cardinality = 0..1 - sound_effect = scalar + sound_effect = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files ### if a law is not visible, it won't show up in gui at all. scope is occupier country, occupied country is not set (this is only check at country level, not target level) ## replace_scope = { this = country root = country } diff --git a/Config/common/peace_conference.cwt b/Config/common/peace_conference.cwt index dbd45dbb..3dd31b42 100644 --- a/Config/common/peace_conference.cwt +++ b/Config/common/peace_conference.cwt @@ -56,6 +56,7 @@ peace_ai_desires = { } peace_action_modifiers = { + ## cardinality 0..1 category = peace_action_type = enum[peace_action] # Cardinality magically stops working here, had to improvise. cardinality 1..4 diff --git a/Config/common/script_enums.cwt b/Config/common/script_enums.cwt index f6433bab..c60232bc 100644 --- a/Config/common/script_enums.cwt +++ b/Config/common/script_enums.cwt @@ -9,6 +9,16 @@ enums = { } } } + complex_enum[equipment_category] = { + path = "game/common" + path_file = "script_enums.txt" + start_from_root = yes + name = { + script_enum_equipment_category = { + enum_name + } + } + } complex_enum[equipment_bonus_type] = { path = "game/common" path_file = "script_enums.txt" diff --git a/Config/common/scripted_guis.cwt b/Config/common/scripted_guis.cwt index 1fe01911..a3c32238 100644 --- a/Config/common/scripted_guis.cwt +++ b/Config/common/scripted_guis.cwt @@ -61,7 +61,7 @@ scripted_gui = { ## cardinality = 0..1 ### Define any scripted gui as the parent gui. This is more performant than using something like parent_window_token/parent_window_name for nested GUIs. parent_scripted_gui = - + ## cardinality = 0..1 ### Any GUI container name. Use only if parent_window_token doesn't have a corresponding token. parent_window_name = @@ -554,13 +554,13 @@ enums = { selected_country_context decision_category diplomatic_action + national_focus_context # gui will be attached to a national focus view for the targeted country, the country which owns the national focus view country_mapicon state_mapicon } enum[parent_window_token] = { top_bar #(attached to top bar that contains resources and stuff) - topbar # 8 tabs that shows up when you click on buttons next to your country flag decision_tab @@ -573,6 +573,11 @@ enums = { diplomacy_tab #(this one is a bit special, it only shows when no country is selected and country list is visible) politics_tab #(window that pops up when you click on your flag) + + army_ledger + navy_ledger + civilian_ledger + air_ledger # default research trees diff --git a/Config/common/technologies.cwt b/Config/common/technologies.cwt index 810841f0..38c57ce4 100644 --- a/Config/common/technologies.cwt +++ b/Config/common/technologies.cwt @@ -59,6 +59,8 @@ technology = { alias_name[trigger] = alias_match_left[trigger] } ## cardinality = 0..1 + is_special_project_tech = bool + ## cardinality = 0..1 ### Make technology exclusive with techs named. xor = { ## cardinality = ~1..inf @@ -120,7 +122,11 @@ technology = { path = { ## cardinality = 0..1 leads_to_tech = + ## cardinality = 0..1 research_cost_coeff = float + ### Ignores path for layout. Useful for techs with multiple parents belonging to different tech grids or folders. + ## cardinality = 0..1 + ignore_for_layout = bool } ## cardinality = 0..1 dependencies = { @@ -161,7 +167,7 @@ technology = { ## cardinality = 0..inf enum[tech_category] = float ## cardinality = 0..inf - enum[unit_types] = float + enum[equipment_category] = float ## cardinality = 0..inf = float } @@ -171,12 +177,26 @@ technology = { ## cardinality = ~1..inf enum[tech_category] } + ## cardinality = 0..1 + special_project_specialization = { + ## cardinality = 0..inf + + } ## cardinality = 0..inf enum[unit_category] = { ## cardinality = 0..inf alias_name[unit_stat] = alias_match_left[unit_stat] alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] + ## cardinality = 0..1 + need = { + ## cardinality = ~1..inf + = int + ## cardinality = 0..1 + value[bba_air_variants] = int + ## cardinality = 0..inf + value[nsb_armor_variants] = int + } } ## cardinality = 0..inf = { @@ -184,6 +204,10 @@ technology = { need = { ## cardinality = 1..inf = int + ## cardinality = 0..1 + value[bba_air_variants] = int + ## cardinality = 0..inf + value[nsb_armor_variants] = int } ## cardinality = 0..inf alias_name[unit_stat] = alias_match_left[unit_stat] @@ -197,6 +221,8 @@ technology = { alias_name[unit_stat] = alias_match_left[unit_stat] ## cardinality = 0..1 add = bool + ## cardinality = 0..1 + display_as_percentage = bool } ## cardinality = 0..inf enum[region_weather] = { @@ -205,6 +231,10 @@ technology = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + + ## cardinality = 0..1 + ### use this equipment for speed + transport = } ## cardinality = 0..1 modifier = { diff --git a/Config/common/terrain.cwt b/Config/common/terrain.cwt index 86a42feb..142421d8 100644 --- a/Config/common/terrain.cwt +++ b/Config/common/terrain.cwt @@ -79,6 +79,11 @@ terrain = { units = { alias_name[unit_stat] = alias_match_left[unit_stat] } + ## cardinality = 0..1 + buildings_max_level = { + ## cardinality = 0..inf + = int + } } } diff --git a/Config/common/units.cwt b/Config/common/units.cwt index 7219cf11..16c314e6 100644 --- a/Config/common/units.cwt +++ b/Config/common/units.cwt @@ -37,6 +37,9 @@ types = { subtype[ship_unit] = { map_icon_category = enum[ship_map_icons] } + subtype[other] = { + map_icon_category = other + } } type[division_name] = { path = "game/common/units/names_divisions" @@ -355,6 +358,8 @@ unit = { alias_name[unit_stat] = alias_match_left[unit_stat] ## cardinality = 0..1 add = bool + ## cardinality = 0..1 + display_as_percentage = bool } } @@ -411,6 +416,26 @@ unit = { ### Determines the default size of the carrier air wing for this unit ## cardinality = 0..1 carrier_air_wing_size = int + ## cardinality = 0..1 + mega_carrier_air_wing_size = int + } + subtype[other] = { + + need = { + ## cardinality = ~1..inf + = int + ## cardinality = 0..inf + value[nsb_armor_variants] = int + } + + ### map icon + map_icon_category = other + + ### unit type + type = { + ## cardinality = ~1..inf + enum[land_units] + } } subtype[catch] = { @@ -498,6 +523,7 @@ division_name = { enum[country_tags] } ## cardinality = 0..1 + ## replace_scope = { root = country this = country } can_use = { alias_name[trigger] = alias_match_left[trigger] } @@ -547,44 +573,44 @@ enums = { mobile armor } - enum[unit_types] = { - infantry - support - artillery - rocket - anti_tank - anti_air + enum[unit_types] = { # use enum[equipment_category] so updated automatically? and update here for for seperating in other land/air/naval groups? + convoy + train + floating_harbor + railway_gun + armor motorized - cavalry mechanized - armor + infantry + capital_ship + submarine + screen_ship fighter - cas - naval_bomber + heavy_fighter interceptor - suicide tactical_bomber strategic_bomber - air_transport + cas + naval_bomber missile - submarine - screen_ship - capital_ship - carrier - convoy - paratroopers + emplacement_gun_ammo + ballistic_missile + nuclear_missile + sam_missile + suicide scout_plane - floating_harbor - railway_gun - train - flame maritime_patrol_plane - cv_naval_bomber - cv_cas - cv_fighter - cv_interceptor - heavy_fighter + air_transport + carrier + missile_launcher + support amphibious + anti_air + artillery + anti_tank + rocket + flame + land_cruiser } enum[land_units] = { infantry @@ -599,6 +625,7 @@ enums = { amphibious flame railway_gun + land_cruiser } enum[air_units] = { air_transport @@ -613,6 +640,10 @@ enums = { tactical_bomber maritime_patrol_plane heavy_fighter + ballistic_missile + emplacement_gun_ammo + nuclear_missile + sam_missile } enum[ship_units] = { battle_cruiser @@ -637,21 +668,24 @@ enums = { artillery } enum[allowed_air_unit_missions] = { - paradrop - air_supply air_superiority + cas interception + strategic_bomber naval_bomber + drop_nuke + paradrop + naval_kamikaze port_strike - naval_patrol - strategic_bomber - cas attack_logistics - naval_kamikaze + air_supply + training naval_mines_planting naval_mines_sweeping recon - training + naval_patrol + barrage_mission + sam_mission } complex_enum[unit_category] = { path = "game/common/unit_tags" diff --git a/Config/effects.cwt b/Config/effects.cwt index 19df36a3..4f78eca5 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -12,6 +12,15 @@ alias[effect:add_manpower] = int_variable_field ### Shows just a custom tooltip. ## scope = any alias[effect:custom_effect_tooltip] = localisation +### Shows just a custom tooltip. +## scope = any +alias[effect:custom_effect_tooltip] = single_alias_right[bindable_loc] +### Shows just a custom tooltip. +## scope = any +alias[effect:custom_effect_tooltip] = character_name| +### Shows just a custom tooltip. +## scope = any +alias[effect:custom_effect_tooltip] = tech_effect| + days = int_variable_field } ### Removes static modifiers fom specified province. @@ -593,11 +605,13 @@ alias[effect:create_unit] = { } ## cardinality = 0..1 id = variable_field + ## cardinality = 0..1 + divisional_commander_xp = int } ### Plays sound effect. ## scope = any -alias[effect:sound_effect] = scalar +alias[effect:sound_effect] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files ### Promotes general to field marshal. ## scope = { character unit_leader } @@ -682,6 +696,8 @@ alias[effect:add_country_leader_trait] = { trait = ## cardinality = 0..1 ideology = + ## cardinality = 0..1 + ideology = enum[sub_ideology] } ### Remove trait from active country leader. @@ -758,7 +774,7 @@ alias[effect:remove_ideas] = { enum[idea_name] ## cardinality = 0..inf value[advisor_token] - ## cardinality = 0..inf + ## cardinality = 0..inf value[variable] } @@ -1909,6 +1925,9 @@ alias[effect:create_equipment_variant] = { } ## cardinality = 0..1 obsolete = yes + ### Default no. Marks all older (non-chassis) equipment variants as obsolete as long as the following matches: Archetype, niche, mission set (for planes). + ## cardinality = 0..1 + mark_older_equipment_obsolete = bool ## cardinality = 0..1 icon = filepath ## cardinality = 0..1 @@ -2062,6 +2081,22 @@ alias[effect:damage_building] = { damage = variable_field ## cardinality = 0..1 province = enum[provinces] + ## cardinality = 0..1 + province = value[variable] + ## cardinality = 0..1 + repair_speed_modifier = float +} +### Damages buildings in the current state. +## scope = state +alias[effect:damage_building] = { + tags = value[building_tag] + damage = variable_field + ## cardinality = 0..1 + province = enum[provinces] + ## cardinality = 0..1 + province = value[variable] + ## cardinality = 0..1 + repair_speed_modifier = float } ### Releases specified country with specified level of autonomy. @@ -2323,7 +2358,7 @@ alias[effect:set_war_support] = variable_field[0..1] ### Executes children effects on random unit leader that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = unit_leader alias[effect:random_unit_leader] = { ## cardinality = 0..1 limit = { @@ -3499,11 +3534,11 @@ alias[effect:random_scope_in_array] = { } ### Updates the modifiers in current scope (use if you don't want to wait for daily update to update them). -## scope = { state country } +## scope = { state country character project } alias[effect:force_update_dynamic_modifier] = yes ### Removes a dynamic modifier from country/state/unit leader. -## scope = { state country } +## scope = { state country character project } alias[effect:remove_dynamic_modifier] = { modifier = @@ -3525,7 +3560,7 @@ alias[effect:remove_dynamic_modifier] = { } ### Adds a dynamic modifier to country/state/unit leader. -## scope = { state country } +## scope = { state country character project } alias[effect:add_dynamic_modifier] = { modifier = @@ -3603,6 +3638,8 @@ alias[effect:launch_nuke] = { ## cardinality = 0..1 province = enum[provinces] ## cardinality = 0..1 + province = value[variable] + ## cardinality = 0..1 state = scope[state] ## cardinality = 0..1 state = @@ -3612,11 +3649,13 @@ alias[effect:launch_nuke] = { controller = enum[country_tags] ## cardinality = 0..1 use_nuke = bool + ## cardinality = 0..1 + nuke_type = enum[nuke_type] } ### Plays sound effect only on in current scope's player. ## scope = country -alias[effect:scoped_sound_effect] = scalar +alias[effect:scoped_sound_effect] = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files ### Runs a loop on for each element of an array, finds the lowest value and stores result in temp variables. ## scope = any @@ -3686,7 +3725,7 @@ alias[effect:add_ai_strategy] = { alias[effect:add_ai_strategy] = { type = enum[unit_strats] id = - id = enum[unit_types] + id = enum[equipment_category] id = value[ai_template_roles] id = value[ai_equipment_roles] value = int @@ -3697,7 +3736,7 @@ alias[effect:add_ai_strategy] = { alias[effect:add_ai_strategy] = { type = enum[equipment_strats] id = - id = enum[unit_types] + id = enum[equipment_category] value = int } diff --git a/Config/effects_aat.cwt b/Config/effects_aat.cwt index d8cadae9..350f4a3c 100644 --- a/Config/effects_aat.cwt +++ b/Config/effects_aat.cwt @@ -179,9 +179,8 @@ alias[effect:add_equipment_subsidy] = { ## cardinality = ~1..inf alias_name[trigger] = alias_match_left[trigger] } - ### CWTools doesn't support verification of this trigger, be careful ## cardinality = 0..1 - seller_trigger = scalar + seller_trigger = ## cardinality = 0..1 seller_tags = { ## cardinality = 0..inf diff --git a/Config/effects_bba.cwt b/Config/effects_bba.cwt index c0cd2e23..6a990d5f 100644 --- a/Config/effects_bba.cwt +++ b/Config/effects_bba.cwt @@ -76,7 +76,7 @@ alias[effect:remove_all_power_balance_modifiers] = { ## scope = unit alias[effect:add_random_valid_trait_from_unit] = { character = - character = value_set[character_token] + character = value[character_token] character = value[variable] character = value[event_target] character = value[global_event_target] @@ -87,7 +87,7 @@ alias[effect:set_can_be_fired_in_advisor_role] = { ## cardinality = 0..1 character = ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ## cardinality = 0..1 character = value[variable] ## cardinality = 0..1 diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index 23716e9e..750d491b 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -115,7 +115,7 @@ alias[effect:add_corps_commander_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -189,7 +189,7 @@ alias[effect:remove_unit_leader_role] = scope[character] ## scope = { country } alias[effect:remove_unit_leader_role] = { character = - character = value_set[character_token] + character = value[character_token] character = value[variable] character = value[event_target] character = value[global_event_target] @@ -203,7 +203,7 @@ alias[effect:add_field_marshal_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -244,7 +244,7 @@ alias[effect:add_naval_commander_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -284,7 +284,7 @@ alias[effect:add_country_leader_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -323,7 +323,7 @@ alias[effect:remove_country_leader_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -348,7 +348,7 @@ alias[effect:add_advisor_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] @@ -414,7 +414,7 @@ alias[effect:remove_advisor_role] = { character = ### required in country scope, optional in character scope ## cardinality = 0..1 - character = value_set[character_token] + character = value[character_token] ### required in country scope, optional in character scope ## cardinality = 0..1 character = value[variable] diff --git a/Config/folders.cwt b/Config/folders.cwt index 03b6eb4d..9d2ea5a7 100644 --- a/Config/folders.cwt +++ b/Config/folders.cwt @@ -6,5 +6,6 @@ interface localisation portraits map +sound dlc integrated_dlc \ No newline at end of file diff --git a/Config/gfx/model_entities.cwt b/Config/gfx/model_entities.cwt index 7491f850..bf20de59 100644 --- a/Config/gfx/model_entities.cwt +++ b/Config/gfx/model_entities.cwt @@ -41,9 +41,62 @@ types = { path = "dlc/dlc037_by_blood_alone_preorder_bonus/gfx" path = "dlc/dlc038_arms_against_tyranny/gfx" path = "dlc/dlc039_arms_against_tyranny_preorder_bonus/gfx" + path = "dlc/dlc040_trial_of_allegiance/gfx" + path = "dlc/dlc041_trial_of_allegiance_preorder_bonus/gfx" + path = "dlc/dlc042_content_creator_pack_soviet_union_2d_art/gfx" + path = "dlc/dlc043_gotterdammerung/gfx" path_extension = .gfx name_field = "name" } + ## type_key_filter = animation + type[animation_id] = { + skip_root_key = { objectTypes any } + path = "gfx" + path = "dlc/dlc001_german_historical_portraits/gfx" + path = "dlc/dlc002_polish_content_pack/gfx" + path = "dlc/dlc003_rocket_launcher_unit_pack/gfx" + path = "dlc/dlc004_famous_battleships_unit_pack/gfx" + path = "dlc/dlc005_heavy_cruisers_unit_pack/gfx" + path = "dlc/dlc006_soviet_tanks_unit_pack/gfx" + path = "dlc/dlc007_german_tanks_unit_pack/gfx" + path = "dlc/dlc008_french_tanks_unit_pack/gfx" + path = "dlc/dlc009_british_tanks_unit_pack/gfx" + path = "dlc/dlc010_us_tanks_unit_pack/gfx" + path = "dlc/dlc011_german_march_order_music_pack/gfx" + path = "dlc/dlc012_allied_radio_music_pack/gfx" + path = "dlc/dlc013_sabaton/gfx" + path = "dlc/dlc014_wallpaper/gfx" + path = "dlc/dlc016_artbook/gfx" + path = "dlc/dlc017_original_soundtrack/gfx" + path = "integrated_dlc/dlc018_together_for_victory/gfx" + path = "dlc/dlc019_sabaton_vol2/gfx" + path = "integrated_dlc/dlc020_death_or_dishonor/gfx" + path = "dlc/dlc021_anniversary_pack/gfx" + path = "integrated_dlc/dlc022_waking_the_tiger/gfx" + path = "dlc/dlc023_man_the_guns/gfx" + path = "dlc/dlc024_man_the_guns_wallpaper/gfx" + path = "dlc/dlc025_axis_armor_pack/gfx" + path = "dlc/dlc026_radio_pack/gfx" + path = "dlc/dlc027_la_resistance_preorder_bonus/gfx" + path = "dlc/dlc028_la_resistance/gfx" + path = "dlc/dlc029_allied_armor_pack/gfx" + path = "dlc/dlc030_allied_speeches_pack/gfx" + path = "dlc/dlc031_battle_for_the_bosporus/gfx" + path = "dlc/dlc032_eastern_front_planes_pack/gfx" + path = "dlc/dlc033_songs_of_the_eastern_front/gfx" + path = "dlc/dlc034_no_step_back/gfx" + path = "dlc/dlc035_no_step_back_preorder_bonus/gfx" + path = "dlc/dlc036_by_blood_alone/gfx" + path = "dlc/dlc037_by_blood_alone_preorder_bonus/gfx" + path = "dlc/dlc038_arms_against_tyranny/gfx" + path = "dlc/dlc039_arms_against_tyranny_preorder_bonus/gfx" + path = "dlc/dlc040_trial_of_allegiance/gfx" + path = "dlc/dlc041_trial_of_allegiance_preorder_bonus/gfx" + path = "dlc/dlc042_content_creator_pack_soviet_union_2d_art/gfx" + path = "dlc/dlc043_gotterdammerung/gfx" + path_extension = .gfx + name_field = "id" + } ## type_key_filter = entity type[entity] = { @@ -86,6 +139,10 @@ types = { path = "dlc/dlc037_by_blood_alone_preorder_bonus/gfx" path = "dlc/dlc038_arms_against_tyranny/gfx" path = "dlc/dlc039_arms_against_tyranny_preorder_bonus/gfx" + path = "dlc/dlc040_trial_of_allegiance/gfx" + path = "dlc/dlc041_trial_of_allegiance_preorder_bonus/gfx" + path = "dlc/dlc042_content_creator_pack_soviet_union_2d_art/gfx" + path = "dlc/dlc043_gotterdammerung/gfx" path_extension = .asset name_field = "name" } @@ -131,6 +188,10 @@ types = { path = "dlc/dlc037_by_blood_alone_preorder_bonus/gfx" path = "dlc/dlc038_arms_against_tyranny/gfx" path = "dlc/dlc039_arms_against_tyranny_preorder_bonus/gfx" + path = "dlc/dlc040_trial_of_allegiance/gfx" + path = "dlc/dlc041_trial_of_allegiance_preorder_bonus/gfx" + path = "dlc/dlc042_content_creator_pack_soviet_union_2d_art/gfx" + path = "dlc/dlc043_gotterdammerung/gfx" path_extension = .asset name_field = "name" } @@ -170,6 +231,12 @@ pdxmesh = { ## cardinality = 0..1 shader = scalar } + + ## cardinality = 0..inf + variant = { + weight = float + pdxmesh = + } ## cardinality = 0..1 cull_distance = float @@ -295,7 +362,7 @@ entity = { ## cardinality = 0..1 sound = { - soundeffect = scalar + soundeffect = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files } ## cardinality = 0..1 diff --git a/Config/links.cwt b/Config/links.cwt index bab8fa6a..dd854b06 100644 --- a/Config/links.cwt +++ b/Config/links.cwt @@ -19,7 +19,7 @@ links = { # Custom data links #### owner = { output_scope = country - input_scopes = { unit_leader operative character combat state country unit military_industrial_organization } + input_scopes = { unit_leader operative character combat state country unit military_industrial_organization project } } controller = { @@ -110,4 +110,13 @@ links = { from_data = yes data_source = } + + sp = { + prefix = sp: + output_scope = special_project + input_scopes = country + from_data = yes + data_source = + } + } \ No newline at end of file diff --git a/Config/sound.cwt b/Config/sound.cwt new file mode 100644 index 00000000..0fac3239 --- /dev/null +++ b/Config/sound.cwt @@ -0,0 +1,79 @@ +types = { + ## type_key_filter = soundeffect + type[soundeffect] = { + path = "sound" + name_field = "name" + path_extension = .asset + } + ## type_key_filter = sound + type[sound] = { + path = "sound" + name_field = "name" + path_extension = .asset + } +} + +sound = { + name = scalar + file = filepath[sound/] + ## cardinality = 0..1 + always_load = bool + ## cardinality = 0..1 + volume = float +} + +soundeffect = { + name = scalar + ## cardinality = 0..1 + falloff = scalar #falloff type + sounds = { + ## cardinality = 0..inf + sound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files + ## cardinality = 0..inf + weighted_sound = { sound = weight = int } + } + + ## cardinality = 0..1 + loop = bool + ## cardinality = 0..1 + is3d = bool + ## cardinality = 0..1 + random_sound_when_looping = bool + + ## cardinality = 0..1 + max_audible = int + # what other types possible here? + ## cardinality = 0..1 + max_audible_behaviour = fail + + ## cardinality = 0..1 + volume = float + ## cardinality = 0..1 + fade_in = float + ## cardinality = 0..1 + fade_out = float + ## cardinality = 0..1 + polyphony = int + + ## cardinality = 0..1 + delay_random_offset = { + ## cardinality = 2..2 + float + } + ## cardinality = 0..1 + looping_delay_random_offset = bool + ## cardinality = 0..1 + playbackrate_random_offset = { + ## cardinality = 2..2 + float + } + ## cardinality = 0..1 + looping_playbackrate_random_offset = bool + ## cardinality = 0..1 + volume_random_offset = { + ## cardinality = 2..2 + float + } + ## cardinality = 0..1 + prevent_random_repetition = bool +} \ No newline at end of file diff --git a/Config/triggers.cwt b/Config/triggers.cwt index eb0c1009..165f573e 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -770,6 +770,10 @@ alias[trigger:has_trait] = ## scope = { character unit_leader } alias[trigger:has_trait] = +### Check if sides leader has trait. +## scope = { character unit_leader } +alias[trigger:has_trait] = + ### Check if side has reserves waiting. ## scope = combat alias[trigger:has_reserves] = bool @@ -846,6 +850,8 @@ alias[trigger:is_coastal] = bool alias[trigger:casualties] = int ### Works as an and-trigger with a custom tooltip. +## error_if_only_match = Alias for custom_override_tooltip trigger (see that trigger for more info). Kept for backward compatibility.Prefer custom_override_tooltip instead. +## severity = info ## scope = any alias[trigger:custom_trigger_tooltip] = { tooltip = localisation @@ -1882,7 +1888,7 @@ alias[trigger:army_manpower_in_state] = { state = int_variable_field amount = int_variable_field ## cardinality = 0..1 - type = enum[unit_types] + type = enum[equipment_category] } ### Checks if scope leader is from an exiled government. is_exiled_leader = yes. @@ -2310,7 +2316,7 @@ alias[trigger:opponent] = { alias_name[trigger] = alias_match_left[trigger] } ### Check ratio of this type of unit for commander. ## scope = { unit_leader combat } -alias[trigger:enum[unit_types]] = variable_field +alias[trigger:enum[equipment_category]] = variable_field ### Trigger not shown in tooltips. ## scope = any diff --git a/Config/triggers_new.cwt b/Config/triggers_new.cwt index 5c060cc7..c29f76e3 100644 --- a/Config/triggers_new.cwt +++ b/Config/triggers_new.cwt @@ -242,6 +242,8 @@ alias[trigger:compare_intel_with] = { army_intel = variable_field ## cardinality = 0..1 navy_intel = variable_field + ## cardinality = 0..1 + airforce_intel = variable_field } ###Check if all operatives meets the trigger. tooltip=key can be defined to override title. From ffefccc50f018f5bf2e5834d5ce397344538a8a9 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Thu, 14 Nov 2024 23:20:49 +0400 Subject: [PATCH 18/73] Update documentation --- Config/script_documentation.json | 1425 ++++++++++++++++++++++--- Config/triggers_gtd.cwt | 2 +- tests/test_check_missing_variables.py | 2 + 3 files changed, 1282 insertions(+), 147 deletions(-) diff --git a/Config/script_documentation.json b/Config/script_documentation.json index fd80a442..4799876f 100644 --- a/Config/script_documentation.json +++ b/Config/script_documentation.json @@ -1,4 +1,546 @@ { + "script_concepts": { + "Formatted Localization": "![MD]\nFormatted localization is a concept for generating texts based on a specific token. It can for example, be used to\ngenerate a description of an idea from the ideas token. A formatted localization entry also accepts standard localization keys\nand raw localization strings giving the following allowed options:\n* A localization tag.\n* A string (can for example be used to inject things based on the [Localization Scope Object](#localization_scope_object) if one exists).\n* A formatter and it's associated tag.\n\nDocumentation for the existing formatters can be found at [Localization formatter](localization_formatter.md).\n\n### Example\n```\n# Using a formatter\ncustom_effect_tooltip = idea_desc|canadian_pacific_railway\n\n# Using a standard loc key\ncustom_effect_tooltip = WHILE_FOCUSING\n\n# Using a loc string with a localization scope object\ncustom_effect_tooltip = \"[ROOT.GetName]\"\n```\n", + "Bindable Localization": "![MD]\nBindable localization is a modular way of binding localization parameters in script for the specified localization key.\nAny variable that accepts a bindable localization accepts the following:\n* A [formatted localization](#formatted_localization).\n* A bound localization object.\n\nThe bound localization object has the following members:\n* `localization_key = KEY`: The localization key that is used for the object.\n* `PARAMETER = BINDABLE_LOC`: A parameter to the localization key that is replaced with the localized version `BINDABLE_LOC`,\n where `BINDABLE_LOC` is a bound localization object itself.\n\n#### Examples\nThe following are example usages where the `tooltip` is a bindable localization:\n```\ntooltip = MY_TOOLTIP # Simple loc key tooltip\n\n### Loc entries\nMY_TOOLTIP = \"This is a tooltip\"\n\n### Localized result\nThis is a tooltip\n```\n\n```\ntooltip = {\n\tlocalization_key = MY_TOOLTIP # Root look key\n\tIMPORTANT_QUESTION = { # ID IMPORTANT_QUESTION in MY_TOOLTIP will get value:\n\t\tlocalization_key = MEANING_OF_LIFE # Root loc key in IMPORTANT_QUESTION\n\t\tANSWER = \"42\" # ID ANSWER in IMPORTANT_QUESTION will get value 42\n\t}\n\tTHE_REST_IS = UNIMPORTANT\n}\n\n### Loc entries\nMY_TOOLTIP = \"The thing everyone wonders is if $IMPORTANT_QUESTION$. The rest is $THE_REST_IS$.\"\nMEANING_OF_LIFE = \"the meaning of life is $ANSWER$\"\nUNIMPORTANT = \"unimportant\"\n\n### Result\nThe thing everyone wonders is if the meaning of life is 42. The rest is unimportant.\n```\n\n```\n# Using a formatter\ncustom_effect_tooltip = idea_desc|canadian_pacific_railway\n```\n", + "Script Constants": "![MD]\nScript constants are a way to define constants in scripts that can be reused in any script file (except for other script constants files).\nIn general, script constants can be used instead of the script macro operator `@` that is file local.\nNote that the script constants has a negligible load time impact and no runtime performance cost.\nLike many other concepts, the script constant is only supported where explicitly stated that it is supported. However, all scoped variables\naccepts script constants that are pointing to a single fixed point value, by using the prefix `constant:`.\n\n#### Reloading\nA script constant is a bit specific when it comes to reloading the database.\nIt's not enough to reload the script constant database itself since script constants are injected into the script on load.\nInstead one have to first reload the script constant database, and then reload the database that uses the script constant.\n\n#### Example\nIn the script constant file, the following constant file definition is made:\n```\nnumeric_constants = {\n schema = {\n any_key = yes\n data = fixed_point # floating point\n }\n\tpi = 3.14159\n\te = 2.71828\n}\n```\n\nThese can then be used in a script file like this:\n```\nsome_scoped_variable = constant:numeric_constants.pi\nsome_fixed_point_supporting_constants = numeric_constants.e\n```\n\n", + "Contextual Localization": "![MD]\nContextual localization is a way to access data from Localization Objects when localizing a string.\nThe concept differs slightly from standard values ($VAL$) that can be injected into the localization string by allowing the localization string\nto select which properties to add to the resulting string and where.\nWhen a string is contextually localized with a localization object, then there's one root object (either a [Scope](loc_objects_documentation.md#scope) or [Localization Environment(loc_objects_documentation.md#localization_environment)].\nIn general this object can only be used for two purposes: Accessing other objects and getting the current date.\n\nThe documentation for the different localization objects can be found at [Localization Objects](loc_objects_documentation.md).\n\n### Using a localization object\nThe localization objects are used with the following syntax: `[(Object.)+Property]`.\n`(Object.)+` refers to a sequence of at least one object accessor and `Property` is the property\nthat is accessed by the last object in the sequence. For example, if the localization string is localized with an [Character](loc_objects_documentation.md#character) object\nthe following queries would get the character's name and the name of the country that the character belongs to `[Character.GetName]`\nand `[Character.Owner.GetName]`, respectively.\n\n### Condition in contextual localization\nConditions in contextual localization can be used to check if objects are null or not. The basic syntax for the condition is `[(OBJECT ? TRUE_CASE : FALSE_CASE)]`.\nWhere:\n* `OBJECT` is any object you can use to access a property from (for example, `Character` and `Character.Owner` are valid objects).\n* `TRUE_CASE` and `FALSE_CASE` are what is to be localized if `OBJECT` is not null and null, respectively. These can hold one of the following values:\n 1. `'LOC_KEY` - A localization key (`LOC_KEY`, note the prepending `'` that means that it's a localization key) that will be localized using the same context as the root contextual localization.\n 2. `(OBJECT.)+Property` - Standard access of a property from an object (discards the object before the `?`). `(OBJECT.)+` stands for a sequence of at least one object, with dots as separators.\n 3. (true case only) `.(OBJECT.)*Property` - Continue that object sequence from the object before the `?`. `(OBJECT.)*` stands for a potentially empty sequence of objects with dots as separators. This is more efficient than the second option since it will not redo the object getters before the `?`.\n\n### Relation to Event Scopes\nWhen a localization string is localized from a scoped context (for example effects or triggers), then the root [Scope](loc_objects_documentation.md#scope) is created\nfrom the event scope of that context. For example, an effect that creates a trade route between two countries `FROM` and `THIS`\ncould be localized with: `LOC_KEY: \"Creates a trade route between [FROM.GetName] and [THIS.GetName]\"`. For more information on\nhow the scope accessors `FROM`, `THIS`, `PREV` and `ROOT` works on `Scope` see TODO: Add link.\n\n### Documentation of localized objects\nIn general a scoped context (for example, effects and triggers) are localized using a [Scope](loc_objects_documentation.md#scope) object based on the scope of that context.\nHowever, there are legacy systems where this may not hold. For other places where localization keys are provided, please see the documentation\nfor which localization objects that are defined for that context." + }, + "loc_formatter": { + "character_name": "![MD]\nThe character_name formatter gets the name of the character.\n\n### Example:\n```\ncustom_effect_tooltip = character_name|hjalmar_schacht\n```\n", + "country_culture": "![MD]\nThe country_culture formatter formats the string using the country's cultural override (`TAG_token`) if it exists,\notherwise the generic version (`token`).\n\n### Localization Scope Object\nThe formatter requires the following Localization Scope Objets to be defined:\n* `Country` - The country that the idea is associated with.\n\n### Example\n```\ncustom_effect_tooltip = country_culture|generic_tank_organisation\n```\n", + "idea_name": "![MD]\nThe idea_name formatter formats gets the name for the idea.\n\n### Localization Scope Object\nThe formatter requires the following Localization Scope Objects to be defined:\n* `Country` - The country that the idea is associated with.\n\n### Example\n```\ncustom_effect_tooltip = idea_name|canadian_pacific_railway\n```\n", + "advisor_desc": "![MD]\nThe advisor_desc formatter gets the description for the advisor.\n\n### Localization Scope Object\nThe formatter requires the following Localization Scope Objets to be defined:\n* `Country` - The country that the idea is associated with.\n\n### Example\n```\ncustom_effect_tooltip = advisor_desc|hjalmar_schacht\n```\n", + "tech_effect": "![MD]\nThe tech_effect formatter gets the effect of finishing a technology.\n\n### Localization Scope Object\nThe formatter requires the following Localization Scope Objects to be defined:\n* `Country` - The country that the tech is associated with.\n\n### Example\n```\ncustom_effect_tooltip = tech_effect|early_transport_plane\n```\n", + "idea_desc": "![MD]\nThe idea_desc formatter gets the description for the idea.\n\n### Localization Scope Object\nThe formatter requires the following Localization Scope Objects to be defined:\n* `Country` - The country that the idea is associated with.\n\n### Example\n```\ncustom_effect_tooltip = idea_desc|canadian_pacific_railway\n```\n", + "building_state_modifier": "![MD]\nThe building_state_modifier gets the state modifiers for the provided building template and the provided scope.\n\nThe formatter takes special care of the following parameters:\n- INDENT: The indent to be added to all lines of the state modifier description (including header line).\n\n### Example:\n```\ncustom_effect_tooltip = building_state_modifier|dam\n```\n", + "equipment_directories_that_can_use_module": "![MD]\nThe equipment_directories_that_can_use_module gets a list of the different directories (e.g. tank, ship, planes)).\n\nThe formatter takes special care of the following parameters:\n- INDENT: The indent to be added to all lines of the state modifier description (including header line).\n\n### Example:\n```\ncustom_effect_tooltip = equipment_directories_that_can_use_module|tank_gas_turbine_engine\n```\n" + }, + "loc_objects": { + "IndustrialOrg": { + "promotions": [{ + "doc": "![MD]\nGets the owner country of the industrial organisation", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets the name of the industrial organisation", + "name": "GetName" + }] + }, + "Character": { + "promotions": [{ + "doc": "![MD]\nGets the owner country of the character.", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets the pronoun for the character.", + "name": "GetHerHis" + }, { + "doc": "![MD]\nGets the pronoun for the character.", + "name": "GetSheHe" + }, { + "doc": "![MD]\nGets the ideology group of the character.", + "name": "GetIdeologyGroup" + }, { + "doc": "![MD]\nGets the name of the character.", + "name": "GetName" + }, { + "doc": "![MD]\nGets the pronoun for the character with an initial capital letter.", + "name": "GetHersHisCap" + }, { + "doc": "![MD]\nGets the ideology of the character.", + "name": "GetIdeology" + }, { + "doc": "![MD]\nGets the pronoun for the character with an initial capital letter.", + "name": "GetHerHisCap" + }, { + "doc": "![MD]\nGets the pronoun for the character with an initial capital letter.", + "name": "GetSheHeCap" + }, { + "doc": "![MD]\nGets the pronoun for the character.", + "name": "GetHersHis" + }, { + "doc": "![MD]\nGets the pronoun for the character.", + "name": "GetHerHim" + }, { + "doc": "![MD]\nGets the pronoun for the character with an initial capital letter.", + "name": "GetHerHimCap" + }, { + "doc": "![MD]\nGets the pronoun for the character.", + "name": "GetHerselfHimself" + }, { + "doc": "![MD]\nGets the pronoun for the character with an initial capital letter.", + "name": "GetHerselfHimselfCap" + }] + }, + "UnitLeader": { + "promotions": [{ + "doc": "![MD]\nGets the owner country of the unit leader.", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets her if the unit leader is a female, otherwise his.", + "name": "GetHerHis" + }, { + "doc": "![MD]\nGets the rank of the unit leader.", + "name": "GetRank" + }, { + "doc": "![MD]\nGets the codename of the operative leader.", + "name": "GetCodeName" + }, { + "doc": "![MD]\nGets she if the unit leader is a female, otherwise he.", + "name": "GetSheHe" + }, { + "doc": "![MD]\nGets the name of the unit leader.", + "name": "GetName" + }, { + "doc": "![MD]\nGets the skill level of the unit leader.", + "name": "GetLeaderSkill" + }, { + "doc": "![MD]\nGets Her if the unit leader is a female, otherwise His.", + "name": "GetHerHisCap" + }, { + "doc": "![MD]\nGets She if the unit leader is a female, otherwise He.", + "name": "GetSheHeCap" + }, { + "doc": "![MD]\nGets her if the unit leader is a female, otherwise him.", + "name": "GetHerHim" + }, { + "doc": "![MD]\nGets Her if the unit leader is a female, otherwise Him.", + "name": "GetHerHimCap" + }, { + "doc": "![MD]\nGets herself if the unit leader is a female, otherwise himself.", + "name": "GetHerselfHimself" + }, { + "doc": "![MD]\nGets Herself if the unit leader is a female, otherwise Himself.", + "name": "GetHerselfHimselfCap" + }] + }, + "Country": { + "promotions": [{ + "doc": "![MD]\nGets the faction leader country of the current country.", + "name": "FactionLeader" + }, { + "doc": "![MD]\nGets the original capital state of the current country.", + "name": "OriginalCapital" + }, { + "doc": "![MD]\nGets the overlord country of the current country.", + "name": "Overlord" + }, { + "doc": "![MD]\nGets the capital state of the current country.", + "name": "Capital" + }], + "properties": [{ + "doc": "![MD]\nGets the capitalized definite old name of the current country.", + "name": "GetOldNameDefCap" + }, { + "doc": "![MD]\nGets the change rate description of the current country's power balance.", + "name": "GetChangeRateDesc" + }, { + "doc": "![MD]\nGets Hers if the current country's leader is female, otherwise His.", + "name": "GetHersHisCap" + }, { + "doc": "![MD]\nGets the name of the leader of the facist party of the current country.", + "name": "GetFascistLeader" + }, { + "doc": "![MD]\nGets the communist party of the current country.", + "name": "GetCommunistParty" + }, { + "doc": "![MD]\nGets the capitalized adjective of the current country without considering ideology.", + "name": "GetNonIdeologyAdjectiveCap" + }, { + "doc": "![MD]\nGets the rule description of the active range of the current country's power balance.", + "name": "GetActiveRangeRuleDesc" + }, { + "doc": "![MD]\nGets She if the current country's leader is female, otherwise He.", + "name": "GetSheHeCap" + }, { + "doc": "![MD]\nGets the name of the current country's faction.", + "name": "GetFactionName" + }, { + "doc": "![MD]\nGets hers if the current country's leader is female, otherwise his.", + "name": "GetHersHis" + }, { + "doc": "![MD]\nGets herself if the current country's leader is female, otherwise himself.", + "name": "GetHerselfHimself" + }, { + "doc": "![MD]\nGets Herself if the current country's leader is female, otherwise Himself.", + "name": "GetHerselfHimselfCap" + }, { + "doc": "![MD]\nGets the name of the leader of the neutral party of the current country.", + "name": "GetNeutralLeader" + }, { + "doc": "![MD]\nGets the adjective of the current country without considering ideology.", + "name": "GetNonIdeologyAdjective" + }, { + "doc": "![MD]\nGets the modifier description of the current country's power balance.", + "name": "GetPowerBalanceModDesc" + }, { + "doc": "![MD]\nGets the name of the active range of the current country's power balance.", + "name": "GetActiveRangeName" + }, { + "doc": "![MD]\nGets Her if the current country's leader is female, otherwise His.", + "name": "GetHerHisCap" + }, { + "doc": "![MD]\nGets the capitalized old adjective of the current country.", + "name": "GetOldAdjectiveCap" + }, { + "doc": "![MD]\nGets the name of the right side of the current country's power balance.", + "name": "GetRightSideName" + }, { + "doc": "![MD]\nGets the name of the trending side of the current country's power balance.", + "name": "GetTrendingSideName" + }, { + "doc": "![MD]\nGets her if the current country's leader is female, otherwise him.", + "name": "GetHerHim" + }, { + "doc": "![MD]\nGets Her if the current country's leader is female, otherwise Him.", + "name": "GetHerHimCap" + }, { + "doc": "![MD]\nGets her if the current country's leader is female, otherwise his.", + "name": "GetHerHis" + }, { + "doc": "![MD]\nGets the flag of the current country.", + "name": "GetFlag" + }, { + "doc": "![MD]\nGets the modifier description of the active range of the current country's power balance.", + "name": "GetActiveRangeModDesc" + }, { + "doc": "![MD]\nGets the adjective of the current country.", + "name": "GetAdjective" + }, { + "doc": "![MD]\nGets the name of the current country without considering ideology.", + "name": "GetNonIdeologyName" + }, { + "doc": "![MD]\nGets the name of the leader of the democratic party of the current country.", + "name": "GetDemocraticLeader" + }, { + "doc": "![MD]\nGets the capitalized definite name of the current country without considering ideology.", + "name": "GetNonIdeologyNameDefCap" + }, { + "doc": "![MD]\nGets the capitalized adjective of the current country.", + "name": "GetAdjectiveCap" + }, { + "doc": "![MD]\nGets the ideology of the current country's ruling party as a noun.", + "name": "GetRulingIdeologyNoun" + }, { + "doc": "![MD]\nGets the tag of the current country.", + "name": "GetTag" + }, { + "doc": "![MD]\nGets the old name of the current country.", + "name": "GetOldName" + }, { + "doc": "![MD]\nGets the ideology of the current country's ruling party.", + "name": "GetRulingIdeology" + }, { + "doc": "![MD]\nGets the name of the current country with its flag.", + "name": "GetNameWithFlag" + }, { + "doc": "![MD]\nGets the name of the leader of the communistic party of the current country.", + "name": "GetCommunistLeader" + }, { + "doc": "![MD]\nGets she if the current country's leader is female, otherwise he.", + "name": "GetSheHe" + }, { + "doc": "![MD]\nGets the manpower of the current country.", + "name": "GetManpower" + }, { + "doc": "![MD]\nGets the name of the left side of the current country's power balance.", + "name": "GetLeftSideName" + }, { + "doc": "![MD]\nGets the fascist party of the current country.", + "name": "GetFascistParty" + }, { + "doc": "![MD]\nGets the old adjective of the current country.", + "name": "GetOldAdjective" + }, { + "doc": "![MD]\nGets the democratic party of the current country.", + "name": "GetDemocraticParty" + }, { + "doc": "![MD]\nGets the name of the current country's intelligence agency.", + "name": "GetAgency" + }, { + "doc": "![MD]\nGets the deactivation effect description of the active range of the current country's power balance.", + "name": "GetActiveRangeDeactivationEffect" + }, { + "doc": "![MD]\nGets the definite name of the current country.", + "name": "GetNameDef" + }, { + "doc": "![MD]\nGets the name of the current country's ruling party.", + "name": "GetRulingParty" + }, { + "doc": "![MD]\nGets the date of the last election in the current country.", + "name": "GetLastElection" + }, { + "doc": "![MD]\nGets the name of the current country.", + "name": "GetName" + }, { + "doc": "![MD]\nGets the capitalized definite name of the current country.", + "name": "GetNameDefCap" + }, { + "doc": "![MD]\nGets the long name of the current country's ruling party.", + "name": "GetRulingPartyLong" + }, { + "doc": "![MD]\nGets the neutral party of the current country.", + "name": "GetNeutralParty" + }, { + "doc": "![MD]\nGets the name of the active side of the current country's power balance.", + "name": "GetActiveSideName" + }, { + "doc": "![MD]\nGets the support of the current country's ruling party.", + "name": "GetPartySupport" + }, { + "doc": "![MD]\nGets the definite old name of the current country.", + "name": "GetOldNameDef" + }, { + "doc": "![MD]\nGets the name of the current country's leader.", + "name": "GetLeader" + }, { + "doc": "![MD]\nGets the activation effect description of the active range of the current country's power balance.", + "name": "GetActiveRangeActivationEffect" + }, { + "doc": "![MD]\nGets the icon of the current country's balance of power trend.", + "name": "GetBopTrendTextIcon" + }, { + "doc": "![MD]\nGets the definite name of the current country without considering ideology.", + "name": "GetNonIdeologyNameDef" + }, { + "doc": "![MD]\nGets the name of the current country's power balance.", + "name": "GetPowerBalanceName" + }] + }, + "PurchaseContract": { + "promotions": [{ + "doc": "![MD]\nGets the seller country of the purchase contract.", + "name": "Seller" + }, { + "doc": "![MD]\nGets the buyer country of the purchase contract.", + "name": "Buyer" + }], + "properties": [{ + "doc": "![MD]\nGets the delivered payment of the purchase contract.", + "name": "GetDeliveredPayment" + }] + }, + "Terrain": { + "promotions": [], + "properties": [{ + "doc": "![MD]\nGets the name of the terrain.", + "name": "GetName" + }] + }, + "Building": { + "promotions": [], + "properties": [{ + "doc": "![MD]\nGets the name of the building.", + "name": "GetName" + }] + }, + "Scope": { + "promotions": [{ + "doc": "![MD]\nGets the combatant of the current scope.", + "name": "Combatant" + }, { + "doc": "![MD]\nGets the from scope.", + "name": "From" + }, { + "doc": "![MD]\nGets the character of the current scope.", + "name": "Character" + }, { + "doc": "![MD]\nGets the country of the current scope.", + "name": "Country" + }, { + "doc": "![MD]\nDoes nothing.", + "name": "This" + }, { + "doc": "![MD]\nGets the purchase contract of the current scope.", + "name": "PurchaseContract" + }, { + "doc": "![MD]\nGets the player country.", + "name": "Player" + }, { + "doc": "![MD]\nGets the industrial organisation of the current scope.", + "name": "IndustrialOrganisation" + }, { + "doc": "![MD]\nGets the unit of the current scope.", + "name": "Unit" + }, { + "doc": "![MD]\nGets the state of the current scope.", + "name": "State" + }, { + "doc": "![MD]\nGets the root scope.", + "name": "Root" + }, { + "doc": "![MD]\nGets the operation of the current scope.", + "name": "Operation" + }, { + "doc": "![MD]\nGets the special project of the current scope.", + "name": "SpecialProject" + }, { + "doc": "![MD]\nGets the previous scope.", + "name": "Prev" + }, { + "doc": "![MD]\nGets the ace of the current scope.", + "name": "Ace" + }], + "properties": [{ + "doc": "![MD]\nGets the current game year.", + "name": "GetYear" + }, { + "doc": "![MD]\nGets the current game date as a long string.", + "name": "GetDateText" + }, { + "doc": "![MD]\nGets the current game month.", + "name": "GetMonth" + }, { + "doc": "![MD]\nGets the current game date.", + "name": "GetDate" + }] + }, + "State": { + "promotions": [{ + "doc": "![MD]\nGets the controller country of the state.", + "name": "Controller" + }, { + "doc": "![MD]\nGets the occupied country of the state.", + "name": "Occupied" + }, { + "doc": "![MD]\nGets the owner country of the state.", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets the name of the capital victory point of the state.", + "name": "GetCapitalVictoryPointName" + }, { + "doc": "![MD]\nGets the ID of the state.", + "name": "GetID" + }, { + "doc": "![MD]\nGets the name of the state.", + "name": "GetName" + }] + }, + "LocalizationEnvironment": { + "promotions": [{ + "doc": "![MD]\nGets the terrain in the localization environment.", + "name": "Terrain" + }, { + "doc": "![MD]\nGets the building in the localization environment.", + "name": "Building" + }, { + "doc": "![MD]\nGets the province in the localization environment.", + "name": "Province" + }], + "properties": [] + }, + "Province": { + "promotions": [{ + "doc": "![MD]\nGets the terrain of the province.", + "name": "Terrain" + }, { + "doc": "![MD]\nGets the controlling country of the province", + "name": "Controller" + }], + "properties": [{ + "doc": "![MD]\nGets the name of the province.", + "name": "GetName" + }] + }, + "Operation": { + "promotions": [{ + "doc": "![MD]\nGets the first operative of the operation.", + "name": "Operative0" + }, { + "doc": "![MD]\nGets the second operative of the operation.", + "name": "Operative1" + }, { + "doc": "![MD]\nGets the third operative of the operation.", + "name": "Operative2" + }, { + "doc": "![MD]\nGets the fourth operative of the operation.", + "name": "Operative3" + }, { + "doc": "![MD]\nGets the initiator country of the operation.", + "name": "Initiator" + }, { + "doc": "![MD]\nGets the target country of the operation.", + "name": "Target" + }], + "properties": [{ + "doc": "![MD]\nGets the name of the operation.", + "name": "GetName" + }] + }, + "SpecialProject": { + "promotions": [{ + "doc": "![MD]\nGets the owner country of the special project.", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets the name of the special project", + "name": "GetName" + }] + }, + "Ace": { + "promotions": [{ + "doc": "![MD]\nGets the owner country of the ace.", + "name": "Owner" + }], + "properties": [{ + "doc": "![MD]\nGets the short name of the wing the ace is in.", + "name": "GetWingShort" + }, { + "doc": "![MD]\nGets the name of the ace.", + "name": "GetName" + }, { + "doc": "![MD]\nGets the surname of the ace.", + "name": "GetSurname" + }, { + "doc": "![MD]\nGets Hers if the ace is a female, otherwise His.", + "name": "GetHersHisCap" + }, { + "doc": "![MD]\nGets Her if the ace is a female, otherwise His.", + "name": "GetHerHisCap" + }, { + "doc": "![MD]\nGets her if the ace is a female, otherwise him.", + "name": "GetHerHim" + }, { + "doc": "![MD]\nGets Her if the ace is a female, otherwise Him.", + "name": "GetHerHimCap" + }, { + "doc": "![MD]\nGets her if the ace is a female, otherwise his.", + "name": "GetHerHis" + }, { + "doc": "![MD]\nGets the full name of the ace.", + "name": "GetFullName" + }, { + "doc": "![MD]\nGets she if the ace is a female, otherwise he.", + "name": "GetSheHe" + }, { + "doc": "![MD]\nGets the name of the wing the ace is in.", + "name": "GetWing" + }, { + "doc": "![MD]\nGets the callsign of the ace.", + "name": "GetCallsign" + }, { + "doc": "![MD]\nGets the name of the region of the mission the ace is on.", + "name": "GetMissionRegion" + }, { + "doc": "![MD]\n\t\t\t\t\t\t\t\t Gets She if the ace is a female, otherwise He.", + "name": "GetSheHeCap" + }, { + "doc": "![MD]\nGets the type of the ace.", + "name": "GetAceType" + }, { + "doc": "![MD]\nGets hers if the ace is a female, otherwise his.", + "name": "GetHersHis" + }, { + "doc": "![MD]\nGets herself if the ace is a female, otherwise himself.", + "name": "GetHerselfHimself" + }, { + "doc": "![MD]\nGets Herself if the ace is a female, otherwise Himself.", + "name": "GetHerselfHimselfCap" + }] + } + }, "effects": { "add_legitimacy": { "supported_scope": ["COUNTRY"], @@ -18,7 +560,7 @@ "custom_effect_tooltip": { "supported_scope": ["any"], "supported_target": ["none"], - "description": "Shows just a custom tooltip" + "description": "![MD]\nAppend an extra tooltip to the effect. The tooltip is a [bindable localization](script_concept_documentation.md#bindable-localization).\n\n### Examples\n```\ncustom_effect_tooltip = MY_TOOLTIP # Simple loc key tooltip\n```\n```\ncustom_effect_tooltip = {\n\tlocalization_key = MY_TOOLTIP # Root look key\n\tIMPORTANT_QUESTION = { # ID IMPORTANT_QUESTION in MY_TOOLTIP will get value:\n\t\tlocalization_key = MEANING_OF_LIFE # Root loc key in IMPORTANT_QUESTION\n\t\tANSWER = \"42\" # ID ANSWER in IMPORTANT_QUESTION will get value 42\n\t}\n\tJUST_AS_IMPORTANT = OR_NOT # ID JUST_AS_IMPORTANT in MY_TOOLTIP will get value OR_NOT\n}\n```\n" }, "set_capital": { "supported_scope": ["COUNTRY"], @@ -35,6 +577,16 @@ "supported_target": ["none"], "description": "remove core on state" }, + "add_breakthrough_points": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Add breakthrough points to one specialization or all for a country scope.\n\tex:\n add_breakthrough_points = {\n\t specialization = \n value = 3\n\t}\n add_breakthrough_points = {\n\t specialization = all\n value = -1\n\t}\n\"" + }, + "raid_reduce_project_progress_ratio": { + "supported_scope": ["STATE"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Reduce progress to the special project in state. Root scope is raid instance scope.\nThe input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1.\nex:\n# Root scope is raid\nstate = {\n raid_reduce_project_progress_ratio = 0.1 # Reduces the project progress by 10%\n}\"" + }, "change_tag_from": { "supported_scope": ["any"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -42,8 +594,8 @@ }, "add_province_modifier": { "supported_scope": ["STATE"], - "supported_target": ["none"], - "description": "Adds static modifiers to specified province.\nadd_province_modifier = {\n\tstatic_modifiers = { mod_1 mod_2 }\nSelect 1 province:\n\tprovince = 500\nOr use:\n\tprovince = {\n\t\tid = 500 id = 501 id = 502 (evaluate for specified provinces)\n\t\tall_provinces (includes all in current state)\n\t\tlimit_to_coastal (only coastal provinces)\n\t\tlimit_to_border (only provinces bordering different country)\n\t\tlimit_to_naval_base (only provinces with a naval base)\n\t\tlimit_to_victory_point (only provinces with a VP)\n\t}\n}" + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "Adds static modifiers to specified province.\nadd_province_modifier = {\n\tstatic_modifiers = { mod_1 mod_2 }\n\tdays = 42 # will be temporary if specified, can be variable\nSelect 1 province:\n\tprovince = 500\nOr use:\n\tprovince = {\n\t\tid = 500 id = 501 id = 502 (evaluate for specified provinces)\n\t\tall_provinces (includes all in current state)\n\t\tlimit_to_coastal (only coastal provinces)\n\t\tlimit_to_border (only provinces bordering different country)\n\t\tlimit_to_naval_base (only provinces with a naval base)\n\t\tlimit_to_victory_point (only provinces with a VP)\n\t}\n}" }, "set_country_flag": { "supported_scope": ["COUNTRY"], @@ -65,10 +617,65 @@ "supported_target": ["none"], "description": "clear global flag" }, + "random_scientist": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "Executes children effects on random scientists that fulfills the \"limit\" trigger. tooltip=key can be added to override tooltip title" + }, + "every_scientist": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "\"Executes children effects on every scientist (or \\\"random_select_amount\\\" of random character if specified) of the country in scope, that fulfills the \\\"limit\\\" trigger.\n\ttooltip=key can be added to override tooltip title.\n\tBy default the effects are only displayed once, you may display them for each matching character with display_individual_scopes.\n\tex: GER = {\n\t every_scientist = {\n\t\ttooltip = my_loc_key # Optional\n\t\trandom_select_amount = 3 # Optional\n\t\tinclude_invisible = yes # Optional - default = no\n\t\tdisplay_individual_scopes = yes # Optional - default = no\n\t\t... character scope effects ...\n\t }\n\t}\"" + }, + "create_colonial_division_template": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "Create a colonial division template for overlord/owner. Available parameters are subject and division_template, where the subject parameter is the country tag for an overlords subject. And the division_template is the regular effect to create a division template.\nExample.\nIn country scope of overlord, E.g. ROOT = ENG\ncreate_colonial_division_template = {\n subject = RAJ # Country tag\n division_template = {\n name = \"Infantry Division\"\n division_names_group = RAJ_INF_01\n ...\n regiments = {\n infantry = { x = 0 y = 0 }\n infantry = { x = 0 y = 1 }\n }\n }\n }\n}" + }, + "add_scientist_level": { + "supported_scope": ["CHARACTER"], + "supported_target": ["none"], + "description": "\"![MD]\nAdd levels to a special project specialization for a scientist character in scope.\nThe `level` parameter is a scoped variable\n\n#### Example\n```\nmy_character = {\n\tadd_scientist_level = {\n\t\tlevel = 2 # accepts variables\n\t\tspecialization = specialization_nuclear\n\t}\n}\n```\"" + }, + "add_scientist_xp": { + "supported_scope": ["CHARACTER"], + "supported_target": ["none"], + "description": "\"![MD]\nAdd experience to a special project specialization for a scientist character in scope.\nThe `experience` parameter is a scoped variable.\n\n#### Example\n```\nex: my_character = {\n\tadd_scientist_xp = {\n\t\texperience = 2 # accepts variables\n\t\tspecialization = specialization_nuclear\n\t}\n}\n```\"" + }, + "add_scientist_trait": { + "supported_scope": ["CHARACTER"], + "supported_target": ["none"], + "description": "\"Add a trait to a scientist character in scope.\n\tex: my_character = {\n\t add_scientist_trait = my_trait_token\n\t}\"" + }, "remove_building": { "supported_scope": ["STATE", "COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Removes a building in a targeted state or province.\nExample:\n\nremove_building = {\n\ttype = air_base\n\tlevel = 1 # how many levels to remove\n\tstate = 32 # or a variable like var:target_state\n}\n\nThe building can also be specified through tags.\nExample:\nremove_building = {\n\ttags = facility # can be a single tag or a { }-wrapped list of tags\n\tlevel = 1 # how many levels to remove\n\tprovince = 500 # or a variable like var:target_province\n}\n\nYou can manually specify either a state or province as per the examples above. Both values and variables are supported.\nThe effect can also be called without specifying province or state if used within a state scope:\n\nremove_building = {\n\ttype = air_base\n\tlevel = 1 # how many levels to remove\n}\n\nIn this case, the building type must be a state building.\n\nNote that this effect will NOT recursively find province buildings from a state when no province has been specified.\n\"" + }, + "set_project_flag": { + "supported_scope": ["SPECIAL_PROJECT"], "supported_target": ["none"], - "description": "Removes specified building in specified state or province" + "description": "set project flag" + }, + "modify_project_flag": { + "supported_scope": ["SPECIAL_PROJECT"], + "supported_target": ["none"], + "description": "modify project flag. Only modifies if flag already exists.\nExample: modify_facility_flag = { flag = value = }" + }, + "clr_project_flag": { + "supported_scope": ["SPECIAL_PROJECT"], + "supported_target": ["none"], + "description": "clear project flag" + }, + "every_active_scientist": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "\"Executes children effects on every active scientist (or \\\"random_select_amount\\\" of random character if specified) of the country in scope, that fulfills the \\\"limit\\\" trigger.\n\ttooltip=key can be added to override tooltip title.\n\tBy default the effects are only displayed once, you may display them for each matching character with display_individual_scopes.\n\tex: GER = {\n\t every_active_scientist = {\n\t\ttooltip = my_loc_key # Optional\n\t\trandom_select_amount = 3 # Optional\n\t\tinclude_invisible = yes # Optional - default = no\n\t\tdisplay_individual_scopes = yes # Optional - default = no\n\t\t... character scope effects ...\n\t }\n\t}\"" + }, + "random_active_scientist": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "Executes children effects on random scientists that fulfills the \"limit\" trigger. tooltip=key can be added to override tooltip title" }, "release": { "supported_scope": ["COUNTRY"], @@ -115,6 +722,16 @@ "supported_target": ["none"], "description": "Executes children effects on random enemy country that fulfills the \"limit\" trigger." }, + "injure_scientist_for_days": { + "supported_scope": ["CHARACTER"], + "supported_target": ["none"], + "description": "\"Injure a scientist for x amount of days to a scientist character in scope.\n\tex: my_character = {\n\t injure_scientist_for_days = 12\n\t}\"" + }, + "add_breakthrough_progress": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"![MD]\nAdd breakthrough progress to one specialization or all for a country scope.\nThe value can either be an absolute value or a script constant.\n\n#### Example\nAdding 3 breakthrough points to land specialization:\n```\nadd_breakthrough_progress = {\n\tspecialization = specialization_land\n value = 3\n}\n```\nAdding -1 breakthrough points to all specializations:\n```\nadd_breakthrough_progress = {\n\tspecialization = all\n value = -1\n}\n```\nAdding the value of the script constant `sp_breakthrough_progress.medium` to all specializations:\n```\nadd_breakthrough_progress = {\n\tspecialization = all\n\tvalue = sp_breakthrough_progress.medium\n}\n```\n\"" + }, "country_event": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], @@ -127,9 +744,29 @@ }, "remove_province_modifier": { "supported_scope": ["STATE"], - "supported_target": ["none"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "Removes a static modifiers to specified province\nremove_province_modifier = {\n\tstatic_modifiers = { mod_1 mod_2 }\nSelect 1 province:\n\tprovince = 500\nOr use:\n\tprovince = {\n\t\tid = 500 id = 501 id = 502 (evaluate for specified provinces)\n\t\tall_provinces (includes all in current state)\n\t\tlimit_to_coastal (only coastal provinces)\n\t\tlimit_to_border (only provinces bordering different country)\n\t\tlimit_to_naval_base (only provinces with a naval base)\n\t\tlimit_to_victory_point (only provinces with a VP)\n\t}\n}" }, + "mark_technology_tree_layout_dirty": { + "supported_scope": ["COUNTRY"], + "supported_target": ["any"], + "description": "Forces the refresh of the hidden technologies for the scoped country\nmark_technology_tree_layout_dirty = yes\n" + }, + "add_design_template_bonus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"![MD]\nAdd free bonus design discount to given types with a set of uses.\nThe value for uses and cost_factor can either be an absolute value or a script constant.\nCan use several equipment types, where 1 is mandatory\n\n#### Example\nAdding 40% discount to an equipment type:\n```\nadd_design_template_bonus = {\n\tuses = 1\n cost_factor = 0.4\n\tequipment = light_tank_flame_chassis_0\n\tname = light_flame_chassis_loc\n}\n```\nAdding 40% discount to an equipment type and archetype with scripted constant:\n```\nadd_design_template_bonus = {\n\tuses = 2\n cost_factor = cost.high\n\tequipment = light_tank_flame_chassis_0\n\tequipment = light_tank_chassis\n}\n```\n\"" + }, + "construct_building_in_random_province": { + "supported_scope": ["STATE"], + "supported_target": ["none"], + "description": "\"Set facility level in a random province of state and country scope.\n\tex:\n GER = {\n 65 = {\n\t\t\tconstruct_building_in_random_province = {\n\t\t\t\tland_facility = 1\n\t\t\t}\n\t\t}\n\t}\n\"" + }, + "add_raid_history_entry": { + "supported_scope": ["RAID_INSTANCE"], + "supported_target": ["none"], + "description": "Add history entry to a raid.\nExample:\nadd_raid_history_entry = yes/no\n" + }, "set_variable": { "supported_scope": ["any"], "supported_target": ["none"], @@ -190,6 +827,11 @@ "supported_target": ["any"], "description": "Remove opinion modifier from target" }, + "add_equipment_bonus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": " Adds the specified equipment bonuses to the country. As description the given loc key or the name of given special project will be used. Same usage as in Ideas/National spirits.\nExample:\nadd_equipment_bonus = {\n\tproject = FROM # Optional special project scope for using special project name. If not set, the name will be used.\n\tbonus = {\n\t\tarmor = { # Type of equipment\n\t\t\t\t\tarmor_value = 3 # Bonus to apply to the stats of the equipment type\n\t\t\t\t\tsoft_attack = 3\n\t\t\t\t\tinstant = yes # Optional. Default no. If true, the bonus will be applied immediately. Otherwise it will be applied only on new equipment variant creation.\n\t\t}\n\t\tsmall_plane_naval_bomber_airframe = {\n\t\t\t\t\tair_range = 0.1 naval_strike_attack = 0.1\n\t\t}\n\t}\n}\n\nadd_equipment_bonus = {\n\tname = SUPER_BONUS_NAME # Optional loc key to use as name.\n\tbonus = {\n\t\tsmall_plane_naval_bomber_airframe = {\n\t\t\t\t\tair_range = 0.1 naval_strike_attack = 0.1\n\t\t}\n\t}\n}" + }, "create_railway_gun": { "supported_scope": ["any"], "supported_target": ["none"], @@ -223,7 +865,7 @@ "create_unit": { "supported_scope": ["any"], "supported_target": ["none"], - "description": "Create unit effect, just like in OOB, example: \ncreate_unit = { \n\t# unit detauls \n\tdivision = \"name = \\\"1. Northern Redemption Army\\\" division_template = \\\"Redemption Army\\\" start_experience_factor = 0.5\" \n\t# country to spawn unit for \n\towner = MAN \n\t \n\t \n\t# a prov id can be specified \n\tprioritize_location = 12406 \n\t \n\t# can be set to yes to be able to spawn units on enemy provs. \n\tallow_spawning_on_enemy_provs = no \n\t# province controllers can be scored using this scorer. otherwise it will prio your owned provs first, friendly provs second. \n\t# it will also prio provs with scores and less units firstl \n\tcountry_score = { \n\t\tbase = 100 \n\t\t \n\t\tmodifier = { \n\t\t\ttag = MAN \n\t\t\tadd = 100 \n\t\t} \n\t} \n count = 1 # can be specified to spawn more than one units \n id = 42 # an id can be given to delete units later on}" + "description": "Create unit effect, just like in OOB, example: \ncreate_unit = { \n\t# unit detauls \n\tdivision = \"name = \\\"1. Northern Redemption Army\\\" division_template = \\\"Redemption Army\\\" start_experience_factor = 0.5\" \n\t# country to spawn unit for \n\towner = MAN \n\t \n\t \n\t# a prov id can be specified \n\tprioritize_location = 12406 \n\t \n\t# can be set to yes to be able to spawn units on enemy provs. \n\tallow_spawning_on_enemy_provs = no \n\t# province controllers can be scored using this scorer. otherwise it will prio your owned provs first, friendly provs second. \n\t# it will also prio provs with scores and less units firstl \n\tcountry_score = { \n\t\tbase = 100 \n\t\t \n\t\tmodifier = { \n\t\t\ttag = MAN \n\t\t\tadd = 100 \n\t\t} \n\t} \n count = 1 # can be specified to spawn more than one units \n id = 42 # an id can be given to delete units later on divisional_commander_xp = 4 # give the division commander experience on unit creation }" }, "activate_advisor": { "supported_scope": ["COUNTRY"], @@ -530,6 +1172,11 @@ "supported_target": ["none"], "description": "\"Executes children effects on every State neighboring the state in scope (or \\\"random_select_amount\\\" of random state if specified) that fulfills the \\\"limit\\\" trigger.\ntooltip=key can be added to override tooltip title.\nBy default the effects are only displayed once, you may display them for each matching state with display_individual_scopes.\nex:\n42 = {\n\tevery_neighbor_state = {\n\t\ttooltip = my_loc_key # Optional\n\t\trandom_select_amount = 3 # Optional\n\t\tdisplay_individual_scopes = yes # Optional - default = no\n\t\t... state scope effects ...\n\t}\n}\"" }, + "add_contested_owner": { + "supported_scope": ["STATE", "COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "![MD]\nAdds a contested owner to a state.\nThe effect can be used either from a country or a state scope and accepts the other as parameter.\nThe effect is localized with a localization environment containing `Country` and `State`.\n\n### Example\nThe following example has the same end result and localization.\n```\n42 = {\n\tadd_contested_owner = GER\n}\nGER = {\n\tadd_contested_owner = 42\n}\n```\nStandard scope accessors can also be used:\n```\n### Assuming current scope is a state and FROM is a country scope\nadd_contested_owner = FROM\n```\n" + }, "news_event": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], @@ -568,7 +1215,7 @@ "start_civil_war": { "supported_scope": ["COUNTRY"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], - "description": "\"Given ideology starts a civil war in the country.\nstart_civil_war = {\n\tideology = revolting ideology\n\truling_party = ruling party for country\n\tsize = 0-1 Size modifier of the revolt. Affects stockpile, army, air and navy as well\n\tarmy_ratio = 0-1 Overrides size modifier for army\n\tnavy_ratio = 0-1 Overrides size modifier for navy\n\tair_ratio = 0-1 Overrides size modifier for air\n\tstates = {...} States that go to the revolter. Use \\\"all\\\" to include all states.\n\tstates_filter = {...} States that go to the revolter. Filtering trigger on the states scripted to go to the revolter.\n\tkeep_all_characters = yes - keep all characters on target country side - will ignore all following keep_ parameters - default value = no\n\tkeep_unit_leaders = {...} specify ID of unit leaders that remain with the original country\n\tkeep_unit_leaders_trigger = {...} Trigger for unit leaders to remain with the original country\n\tkeep_political_leader = yes/no # optional, default is no; If yes, the party leader of the revolting ideology will not join the revolter as its leader.\n\tkeep_political_party_members = yes/no # optional, default is no; If yes, it will keep the non main leaders of the party leaders in original country\n\t ... effect list ... # you can list effects that will run on civil war country\n}\"" + "description": "![MD] Given ideology starts a civil war in the country.\n\nFor 'keep triggers', the scope is :\nTHIS = Character\nFROM = Target country\n\nExample :\n```\nstart_civil_war = {\n\tideology = revolting ideology\n\truling_party = ruling party for country\n\tsize = 0-1 Size modifier of the revolt. Affects stockpile, army, air and navy as well\n\tarmy_ratio = 0-1 Overrides size modifier for army\n\tnavy_ratio = 0-1 Overrides size modifier for navy\n\tair_ratio = 0-1 Overrides size modifier for air\n\tstates = {...} States that go to the revolter. Use \\\"all\\\" to include all states.\n\tstates_filter = {...} States that go to the revolter. Filtering trigger on the states scripted to go to the revolter.\n\tkeep_all_characters = yes - keep all characters on target country side - will ignore all following keep_ parameters - default value = no\n\tkeep_unit_leaders = {...} specify ID of unit leaders that remain with the original country\n\tkeep_unit_leaders_trigger = {...} Trigger for unit leaders to remain with the original country\n\tkeep_scientists_trigger = {...} Trigger for scientist to remain with the original country\n\tkeep_political_leader = yes/no # optional, default is no; If yes, the party leader of the revolting ideology will not join the revolter as its leader.\n\tkeep_political_party_members = yes/no # optional, default is no; If yes, it will keep the non main leaders of the party leaders in original country\n\t ... effect list ... # you can list effects that will run on civil war country\n}\n```\n" }, "set_unit_organization": { "supported_scope": [], @@ -856,9 +1503,9 @@ "description": "swap 2 ideas. \n Syntax: swap_idea = {\n remove_idea = \n add_idea = \n add_days = 10 #optional, will add/subtract duration for new idea that replaces the old one with duration\n days = 25 #optional, will set the duration for the new idea\n}" }, "damage_building": { - "supported_scope": ["STATE"], - "supported_target": ["any"], - "description": "Damages buildings in the current state.\nExample: damage_building = { type = industrial_complex damage = 2.4 }\nAlso has the variable province = x when targeting provincial buildings." + "supported_scope": ["STATE", "COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Damages a building in a targeted state or province.\nExample:\ndamage_building = {\n\ttype = industrial_complex\n\tdamage = 2.4\n\trepair_speed_modifier = -0.5 # repair will be 50% slower until building is fully repaired\n}\n\nThe building can also be specified through tags.\nExample: damage_building = {\n\ttags = facility # can be a single tag or a { }-wrapped list of tags\n\tdamage = 2.4\n\trepair_speed_modifier = -0.5 # repair will be 50% slower until building is fully repaired\n}\n\nThe above examples will only work in state scope where buildings can be found through the scope state,\nand province buildings are recursively found from that state.\n\nYou can also manually specify either a state or province:\n\ndamage_building = {\n\ttype = industrial_complex\n\tprovince = 500 # or a variable like var:target_province\n\tdamage = 2.4\n}\n\ndamage_building = {\n\ttype = industrial_complex\n\tstate = 35 # or a variable like var:target_state\n\tdamage = 2.4\n}\n\nIf the building is a province building but only a state has been specicied, all provinces in that state will be\nsearched to find the first matching province building.\n\"" }, "release_autonomy": { "supported_scope": ["COUNTRY"], @@ -1348,7 +1995,7 @@ "transfer_units_fraction": { "supported_scope": ["COUNTRY"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], - "description": "Transfer units (air, army, navy) to another country.\nAlso transfer the stockiled equipment (you can set it to zero if it is undesired) as well as unit leaders.\ntransfer_units_fraction = {\n\ttarget = ROOT # the recipient\n\tsize = 0.4 # [0,1] Default value for the ratio below if they are not specified\n\tstockpile_ratio = 0.3 # [0,1] Overrides size modifier for the stockpiled equipment and fuel\n\tarmy_ratio = 0.1 # [0,1] Overrides size modifier for army\n\tnavy_ratio = 0.2 # [0,1] Overrides size modifier for navy\n\tair_ratio = 0.4 # [0,1] Overrides size modifier for air\n\tkeep_unit_leaders = { # specify IDs of unit leaders that remain with the original country\n\t\t700 701\n\t}\n\tkeep_unit_leaders_trigger = { # Trigger for unit leaders to remain with the original country\n\t\t... # the scope is the unit leader being evaluated\n\t\t... # ROOT is the recipient\n\t\t... # FROM is the sender\n\t\t... # PREV is unset\n\t}\n}" + "description": "![MD] Transfer units (air, army, navy) to another country.\nAlso transfer the stockiled equipment (you can set it to zero if it is undesired) as well as unit leaders.\n\nFor 'keep triggers', the scope is :\nTHIS = Character\nFROM = Target country\n\nExample:\n```\ntransfer_units_fraction = {\n\ttarget = ROOT # the recipient\n\tsize = 0.4 # [0,1] Default value for the ratio below if they are not specified\n\tstockpile_ratio = 0.3 # [0,1] Overrides size modifier for the stockpiled equipment and fuel\n\tarmy_ratio = 0.1 # [0,1] Overrides size modifier for army\n\tnavy_ratio = 0.2 # [0,1] Overrides size modifier for navy\n\tair_ratio = 0.4 # [0,1] Overrides size modifier for air\n\tkeep_unit_leaders = { # specify IDs of unit leaders that remain with the original country\n\t\t700 701\n\t}\n\tkeep_unit_leaders_trigger = {\t# Trigger for unit leaders to remain with the original country\n\t\t\t\t\t\t\t\t\t# THIS is the unit leader being evaluated\"\n\t\t\t\t\t\t\t\t\t# ROOT is the recipient\"\n\t\t\t\t\t\t\t\t\t# FROM is the sender\"\n\t\t\t\t\t\t\t\t\t# PREV is unset\"\n\t\t[... triggers ...]\n\t}\n}\n```\n" }, "finalize_border_war": { "supported_scope": ["any"], @@ -1511,19 +2158,19 @@ "description": "Runs the effect for a random element in array\nExample: random_scope_in_array = {\n\tarray = array_name\n\tlimit = { ... trigger ... } a trigger to limit scopes\n\tbreak = break_name #optional (default 'break') set this temp variable to non zero to break the loop\n #effect 1\n #effect 2 ...\n}" }, "force_update_dynamic_modifier": { - "supported_scope": ["STATE", "COUNTRY", "CHARACTER"], + "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "SPECIAL_PROJECT"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "updates the modifiers in current scope (use if you don't want to wait for daily update to update them):\nforce_update_dynamic_modifier = yes\n" }, "remove_dynamic_modifier": { - "supported_scope": ["STATE", "COUNTRY", "CHARACTER"], + "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "SPECIAL_PROJECT"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], - "description": "removes a dynamic modifier from country/state/unit leader:\nremove_dynamic_modifier = {\n modifier = dynamic_modifier_name\n scope = GER #optional, specify if it is specified while adding the modifier\n}\n" + "description": "\"removes a dynamic modifier from the containing scope (country / state / unit-leader / special-project).\nexample :\nremove_dynamic_modifier = {\n modifier = dynamic_modifier_name\n scope = GER # optional, must match the scope input used in add_dynamic_modifier (if any)\n}\"" }, "add_dynamic_modifier": { - "supported_scope": ["STATE", "COUNTRY", "CHARACTER"], + "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "SPECIAL_PROJECT"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], - "description": "adds a dynamic modifier to country/state/unit leader. Updates the cooldown if exists:\nadd_dynamic_modifier = {\n modifier = dynamic_modifier_name\n days = 42 #will be temporary if specified scope = GER #optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope\n}\n" + "description": "\"adds a dynamic modifier to the containing scope (country / state / unit-leader / special-project).\nUpdates the cooldown if exists.\nOptionaly you can give a scope that will restrict the dynamic modifier to it.\nexample :\n12 = {\n add_dynamic_modifier = {\n modifier = dynamic_modifier_name\n days = 42 # will be temporary if specified, can be variable\n scope = GER # optional, state/countrytag or a variable containing that. \n\t\t\t\t# if specified the dynamic variable will target that scope\n\t\t\t\t# in this example : adds the modifier to state 12 but only applies for country GER\n }\n}\"" }, "for_loop_effect": { "supported_scope": ["any"], @@ -1553,7 +2200,7 @@ "launch_nuke": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], - "description": "launch nuke at a state. usage : \nlaunch_nuke = { \n provinve = 42 #will nuke this province if specified\n state = 42 #use either province or state. if state is used it will prefer enemies first while picking a province to nuke. otherwise it will pick one of the neutrals\n controller = GER #if state and controller is specified, the effect will pick a province that is controlled by this tag\n use_nuke = yes #will consume nuke if specified\n} \n" + "description": "launch nuke at a state. usage : \nlaunch_nuke = { \n provinve = 42 #will nuke this province if specified\n state = 42 #use either province or state. if state is used it will prefer enemies first while picking a province to nuke. otherwise it will pick one of the neutrals\n controller = GER #if state and controller is specified, the effect will pick a province that is controlled by this tag\n use_nuke = yes #will consume nuke if specified\n nuke_type = nuclear_bomb # type of nuke to use (e.g. nuclear_bomb, thermonuclear_bomb etc.)\n} \n" }, "scoped_sound_effect": { "supported_scope": ["COUNTRY"], @@ -1825,16 +2472,31 @@ "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "\"Add founds to the CIC bank of the country in scope.\nValue can be negative to substract funds.\nIf the new total funds is negative, it will be set to 0.\nex:\nvar:my_country_var = {\n add_cic = 200\n add_cic = -100\n}\"" }, + "activate_shine_on_focus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["any"], + "description": "![MD]\nActivates the shine effect on the focus with the given id. Focuses that are completed cannot have an activated shine effect.\n\nNote that tooltips are only shown in debug mode.\n\n### Example:\n```\nactivate_shine_on_focus = GER_prioritize_economic_growth\n```\n" + }, + "deactivate_shine_on_focus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["any"], + "description": "![MD]\nDeactivate the shine effect on the focus with the given id. The current focus cannot have it's shine effect removed.\n\nNote that tooltips are only shown in debug mode.\n\n### Example:\n```\ndeactivate_shine_on_focus = GER_prioritize_economic_growth\n```\n" + }, "event_option_tooltip": { "supported_scope": ["any"], "supported_target": ["none"], - "description": "Shows the tooltip text of an event option in other tooltips(root and from scopes are swapped).Example:\nrandom_list = mtg_usa_civil_war_fascists.1.a \n" + "description": "Shows the tooltip text of an event option in other tooltips(root and from scopes are swapped).\nExample:\nevent_option_tooltip = mtg_usa_civil_war_fascists.1.a" }, "show_mio_tooltip": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], "description": "\"Show the name of the input MIO with the name of the initial trait (if any)\nex:\nSOV = {\n\tshow_mio_tooltip = my_mio_token\n\tshow_mio_tooltip = var:my_mio_var\n}\"" }, + "complete_special_project": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Complete a special project for the country in scope.\nThis effect will not take into account the current state of the project tree and will allow you to unlock a project even if the one before is not unlocked.\nSince the project is not completed within a facility, the facility state and scientist effects are NOT applied.\nex:\nSOV = { complete_special_project = sp:my_project }\nSOV = { complete_special_project = var:my_project_var }\nSOV = { complete_special_project = PREV } # accepts variables and keywords\nSOV = {\n\tcomplete_special_project = {\n\t\t# project, scientist, state accepts variables and keywords.\n\t\tproject = sp:my_project\n\t\tscientist = my_scientist # Optional if no iteration_output, default to current scientists on the project if active otherwise to none\n\t\tstate = my_state # Optional if no iteration_output, default to current state of the project if active otherwise to none\n\t\titeration_output = { # Can be a single reward or reward = option, if it contains a multiple option choice but no option specified the default will be used. The reward must be available to the project\n\t\t\tmy_reward\n\t\t\tmy_other_reward # multiple choice, chose the default\n\t\t\tmy_third_reward = my_option_1 # Specified option to use\n\t\t} # Optional amount of iteration rewards\n\t\tshow_modifiers = no # Optional, default = yes\n\t}\n}\"" + }, "set_mio_icon": { "supported_scope": ["INDUSTRIAL_ORG"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -1845,6 +2507,21 @@ "supported_target": ["none"], "description": "\"Creates a purchase contract between the countries.\nExample:\ncreate_purchase_contract = \n{\n\tseller = ENG\n\tbuyer = RAJ\n\tcivilian_factories = 2\n\tequipment = {\n\t\ttype = infantry_equipment\n\t\tamount = 600\n\t}\n\tequipment = {\n\t\ttype = armored_car1\n\t\tamount = 100\n\t}\n}\"" }, + "generate_scientist_character": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Generate a new character with a scientist role and recruit it in the country in scope.\nExamples:\nSOV = {\n\tgenerate_scientist_character = {\n\t\tportrait = GFX_portrait # optional - random portrait by default\n\t\tportrait_tag_override = CHI # optional - accepts variable and keyword - only relevant if using random portrait - by default use country in scope\n\t\tgender = male / female # optional - by default random gender\n\t\tskills = {\n\t\t\t# optional array\n\t\t\t# same format as in scientist role in character DB\n\t\t\t# by default all skills are at 1\n\t\t\tspecialization_token = 2\n\t\t}\n\t\ttraits = { trait_token } # optional array\n\t}\n}\n\"" + }, + "add_scientist_role": { + "supported_scope": ["COUNTRY", "CHARACTER"], + "supported_target": ["none"], + "description": "\"Add scientist role to a character. The character can come from the scope or from an input parameter.\nThe scientist role format is the same as in the character DB.\nExcept the visible trigger - a scientist role created via effect cannot have triggers.\nExamples:\n# From character scope\nmy_character = {\n\tadd_scientist_role = {\n\t\tscientist = {\n\t\t\tdesc = desc_loc_key # Optional\n\t\t\ttraits = { scientist_trait_token ... } # Optional\n\t\t\tskills = { specialization_token = 2 ... }\n\t\t\t# cf. game/common/characters/_documentation/md for full explanation\n\t\t}\n\t}\n}\n\n# From country scope\nSOV = {\n\tadd_scientist_role = {\n\t\tcharacter = my_character / var:my_char_var / PREV # accepts variables and keywords\n\t\tscientist = { ... }\n\t}\n}\n\"" + }, + "remove_scientist_role": { + "supported_scope": ["COUNTRY", "CHARACTER"], + "supported_target": ["none"], + "description": "\"Remove the scientist role from a character.The character can come from the scope or from an input parameter.\nThe scientist role format is the same as in the character DB.\nExcept the visible trigger - a scientist role created via effect cannot have triggers.\nExamples:\n# From character scope\nmy_character = {\n\tremove_scientist_role = yes\n}\n\n# From country scope\nSOV = {\n\tremove_scientist_role = {\n\t\tcharacter = my_character / var:my_char_var / PREV # accepts variables and keywords\n\t}\n}\"" + }, "random_purchase_contract": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], @@ -1855,11 +2532,61 @@ "supported_target": ["none"], "description": "\"Executes children effects on every purchase contract (or \\\"random_select_amount\\\" of random purchase contracts if specified) of the country in scope, that fulfills the \\\"limit\\\" trigger.\ntooltip = key need to be added to override the tooltip title.\nBy default the effects are only displayed once, you may display them for each matching purchase contract with display_individual_scopes.\nex: GER = {\n every_military_industrial_organization = {\n\tlimit = { ... contract scope triggers ... }\n\ttooltip = my_loc_key # Optional\n\trandom_select_amount = 3 # Optional\n\tdisplay_individual_scopes = yes # Optional - default = no\n ... Purchase Contract scope effects ...\n }\n}\"" }, + "random_allied_country": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "![MD]\nExecutes children effects on a random Allied Country different from the one in scope that fulfills the `limit` trigger.\n`tooltip` can be used to override tooltip title (supports [bindable localization](script_concept_documentation.md#bindable-localization)).\n\n### Example\n```\nENG = {\n\trandom_allied_country = {\n\t\ttooltip = my_loc_key # Optional bindable localization\n\t\tlimit = my_limit_trigger # Optional\n\t\t... country scope effects ...\n\t}\n}\n```\n" + }, + "every_allied_country": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "![MD]\nExecutes children effects on every Allied Country different from the one in scope (or `random_select_amount` of random country if specified) that fulfills the `limit` trigger.\n`tooltip` can be added to override tooltip title (supports [bindable localization](script_concept_documentation.md#bindable-localization)).\nBy default the effects are only displayed once, you may display them for each matching country with display_individual_scopes.\n\n### Example\n```\nENG = {\n\tevery_allied_country = {\n\t\ttooltip = my_loc_key # Optional bindable localization\n\t\trandom_select_amount = 3 # Optional\n\t\tdisplay_individual_scopes = yes # Optional - default = no\n\t\tlimit = my_limit_trigger # Optional\n\t\t... country scope effects ...\n\t}\n}\n```\n" + }, + "raid_damage_units": { + "supported_scope": ["RAID_INSTANCE"], + "supported_target": ["none"], + "description": "\"Damage the units performing the raid in scope (the attackers inflict losses).\n\nDamage is applied to ground units while damage to plane is defined as the amount of planes lost.\nIf 'ratio = yes', then all damage / losses are applied as a fraction of the current amount.\nFor units, damage can be defined through one value 'damage' or separately through 'org_damage' and 'str_damage'\n\nex:\n\n# Apply 50% damage to units\nraid_damage_units = {\n\tdamage = 0.5\n\tratio = yes\n}\n\n# Apply 10 strength loss and 20 organization loss to units\nraid_damage_units = {\n\torg_damage = 20\n\tstr_damage = 10\n}\n\n# Lose 40% of all planes\nraid_damage_units = {\n\tplane_loss = 0.4\n\tratio = yes\n}\n\n# Lose 5 planes\nraid_damage_units = {\n\tplane_loss = 5\n}\n\n\"" + }, + "raid_add_unit_experience": { + "supported_scope": ["RAID_INSTANCE"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Give experience to the units performing the raid (raid instance scope).\n\nWill give experience to any type of unit assigned to the raid, e.g. divisions or air wings.\nThe value defines the progress towards the max level, e.g. 0.2 = gain 20% of the experience needed to reach max level.\n\nCan use either an explicit value or a variable\n\nex.\nraid_add_unit_experience = 0.2\"" + }, + "promote_officer_to_general": { + "supported_scope": [], + "supported_target": ["none"], + "description": "\"Promote the officer of the division to a general.\nExample:\npromote_officer_to_general = yes # yes/no is ignored\n\"" + }, "cancel_purchase_contract": { "supported_scope": ["PURCHASE_CONTRACT"], "supported_target": ["none"], "description": "\"Cancels the scoped purchase contract.\nExample:\ncontract = {cancel_purchase_contract = yes}\"" }, + "remove_contested_owner": { + "supported_scope": ["STATE", "COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "![MD]\nRemoves a contested owner to a state.\nThe effect can be used either from a country or a state scope and accepts the other as parameter.\nThe effect is localized with a localization environment containing `Country` and `State`.\n\n### Example\nThe following example has the same end result and localization.\n```\n42 = {\n\tremove_contested_owner = GER\n}\nGER = {\n\tremove_contested_owner = 42\n}\n```\nStandard scope accessors can also be used:\n```\n### Assuming current scope is a state and FROM is a country scope\nremove_contested_owner = FROM\n```\n" + }, + "add_project_progress_ratio": { + "supported_scope": ["SPECIAL_PROJECT"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Add progress to the project's prototype phase.\nThe input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between -1 and 1.\nex:\nsp:my_project = {\n add_project_progress_ratio = 0.1\n add_project_progress_ratio = var:my_var\n}\"" + }, + "custom_override_tooltip": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "![MD]\nExecutes the provided effects but with a custom tooltip surpressing all tooltips from all other effects inside this block.\nThe custom tooltip is a [bindable localization](script_concept_documentation.md#bindable-localization).\n\n### Examples\n```\ncustom_override_tooltip = {\n\ttooltip = MY_TOOLTIP # Simple loc key tooltip\n\t\n}\n```\n\n```\ncustom_override_tooltip = {\n\ttooltip = {\n\t\tlocalization_key = MY_TOOLTIP # Root look key\n\t\tIMPORTANT_QUESTION = { # ID IMPORTANT_QUESTION in MY_TOOLTIP will get value:\n\t\t\tlocalization_key = MEANING_OF_LIFE # Root loc key in IMPORTANT_QUESTION\n\t\t\tANSWER = \"42\" # ID ANSWER in IMPORTANT_QUESTION will get value 42\n\t\t}\n\t\tJUST_AS_IMPORTANT = OR_NOT # ID JUST_AS_IMPORTANT in MY_TOOLTIP will get value OR_NOT\n\t}\n\t\n}\n```\n" + }, + "complete_prototype_reward_option": { + "supported_scope": ["SPECIAL_PROJECT"], + "supported_target": ["none"], + "description": "Complete a prototype reward option for the project in scope \nThe effect will respect the fire only once and allowed property of prototype rewards.\nex:\ncomplete_prototype_reward_option = \n{\n\tprototype_reward = my_reward\n\tprototyp_reward_option = my_option # Optional, if multiple choice use default one if not set\n\tshow_modifiers = yes # Yes if the effects of the prototype reward should be shown (default no)\n}" + }, + "add_unit_bonus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Adds permanent subunit and subunit category bonuses for country.\n\nExample:\nadd_unit_bonus = {\n category_light_infantry = { # Subunit category bonuses\n\t soft_attack = 0.05\n\t}\n \n cavalry = { # Subunit bonuses\n\t soft_attack = 0.05\n hard_attack = 0.05\n\t}\n}\"" + }, "add_operation_token": { "supported_scope": ["COUNTRY"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -2427,6 +3154,76 @@ "supported_target": ["THIS", "ROOT", "PREV", "FROM", "CAPITAL"], "description": "check state id" }, + "any_scientist": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Checks if at least one scientist of the Country in scope matches the triggers. \ntooltip=key can be defined to override title.\nex: GER = {\n any_scientist = {\n\ttooltip = my_loc_key # Optional\n ... Character scope triggers ...\n }\n}\"" + }, + "all_scientists": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Checks if all scientists of the Country in scope matches the triggers.\ntooltip=key can be defined to override title.\nex: GER = {\n all_scientists = {\n\ttooltip = my_loc_key # Optional\n ... Character scope triggers ...\n }\n}\"" + }, + "has_scientist_level": { + "supported_scope": ["CHARACTER"], + "supported_target": ["none"], + "description": "\"Checks if the scientist of the character in scope matches the skill level condition for a specialization. Supports < > = operators.\nlevel = \nspecialization = \nex: my_character = {\n\t has_scientist_level = {\n\t level > 2\n\t specialization = specialization_nuclear\n }\n\t}\n\"" + }, + "is_active_scientist": { + "supported_scope": ["CHARACTER"], + "supported_target": ["any"], + "description": "\"Checks if the scientist of the character in scope is assigned to a project\nis_scientist_active = \nex: my_character = {\n is_scientist_active = yes\n is_scientist_active = no\n\t}\n\"" + }, + "has_project_flag": { + "supported_scope": ["SPECIAL_PROJECT"], + "supported_target": ["any"], + "description": "\"Check if flag has been set within the special project in scope.\nMay checks on the value or date/days since last modified date.\nExamples:\nhas_project_flag = my_flag\nhas_project_flag = {\n\tflag = my_flag (mandatory)\n\tvalue < 12 (optional)\n\tdate > 1936.3.25 (optional, compare with the date where the flag was last modified )\n\tdays > 365 (optional, compare with the number of days since the flag was last modified )\n}\"" + }, + "any_active_scientist": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Checks if at least one active scientist of the Country in scope matches the triggers.\nex: GER = {\n any_active_scientist = {\n\ttooltip = my_loc_key # Optional\n ... Character scope triggers ...\n }\n}\"" + }, + "all_active_scientist": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "\"Checks if all active scientists of the Country in scope matches the triggers.\nex: GER = {\n all_active_scientists = {\n\ttooltip = my_loc_key # Optional\n ... Character scope triggers ...\n }\n}\"" + }, + "is_scientist_injured": { + "supported_scope": ["CHARACTER"], + "supported_target": ["any"], + "description": "\"Checks if the scientist of the character in scope is injured\nis_scientist_injured = \nex: my_character = {\n is_scientist_active = yes\n\t}\n\"" + }, + "has_breakthrough_points": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Checks if the country in scope has enough breakthroughs within a given specialization.\nspecialization = \nvalue = \nex: GER = {\n\t has_breakthrough_points = {\n\t specialization = specialization_nuclear\n\t\tvalue = 1\n }\n\t}\n\"" + }, + "has_scientist_specialization": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Checks if the country in scope has a scientist with a skill level of at least 1 in specialization.\nex:\nSOV = {\n\thas_scientist_specialization = specialization_nuclear\n}\"" + }, + "has_facility_specialization": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Checks if the country in scope has a facility with specialization.\nex:\nSOV = {\n\thas_facility_specialization = specialization_nuclear\n}\"" + }, + "can_construct_building": { + "supported_scope": ["STATE"], + "supported_target": ["none"], + "description": "\"Checks if the country (as ROOT) and state in scope can build a building in the state.\nex:\nGER = {\n\t65 = {\n\t\tcan_construct_building = land_facility\n\t}\n}\"" + }, + "has_naval_invasion_against_state": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "Check if the scoped country has a naval invasion against the specified state.\nExample 1:\nhas_naval_invasion_against_state = \nExample 2:\n has_naval_invasion_against_state = {\n state = \n preparation > 0.0 # (optional: preparation percentage, with a default value of 0.0)\n activated = no # (optional: if set, also check if invasion is activated or not)\n}" + }, + "any_state_in": { + "supported_scope": ["any"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "check if any state in the given category meets the trigger.\ntooltip=key can be defined to override title.\nThe trigger takes one of the followings:\n\tarray: an array of states.\n\tcontinent: A continent.\n\tai_area: The id of an area.\n\tstrategic_region: The id of an region.\n\n* Note that no default tooltip is available for array and ai_area.\nExample:\nCheck if the trigger is valid in any state in a continent:\nany_state_in = {\tconteinent = europe\n\tFOO_TRIGGER = BAR\n}" + }, "if": { "supported_scope": ["any"], "supported_target": ["none"], @@ -2613,7 +3410,7 @@ "description": "Checks if player has a DLC.\nExample: has_dlc = \"name of the dlc\"" }, "hidden_trigger": { - "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "COMBATANT", "ACE", "STRATEGIC_REGION", "OPERATION", "INDUSTRIAL_ORG", "PURCHASE_CONTRACT"], + "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "COMBATANT", "ACE", "STRATEGIC_REGION", "OPERATION", "INDUSTRIAL_ORG", "PURCHASE_CONTRACT", "RAID_INSTANCE", "SPECIAL_PROJECT"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "a hidden trigger, anything in it not shown in tooltips" }, @@ -2902,6 +3699,11 @@ "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "check if country gives military access to specified country" }, + "scope_exists": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "\"Check if the current scope exist.\nThis differ from for example exists that checks if the country of the scope exists.\nThis checks if the scope for the country exists and the other if the country itself exists in the game.\nNote that variable scopes are always valid scopes.\nExample:\nDEN = { exists = yes } # Should always be true since DEN is always a valid scope\nsp:sp_land_flamethrower_tank = {\n\tcharacter = {\n\t\tscope_exists = yes\n\t}\n} # True if the project has an assigned scientist.\nvar:my_var = {\n\tscope_exists = yes # Always true since variables are always valid scopes\n}\n\"" + }, "any_state": { "supported_scope": ["any"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -3090,7 +3892,7 @@ "free_building_slots": { "supported_scope": ["STATE"], "supported_target": ["none"], - "description": "checks building for available construction levels \nfree_building_slots = { \n\tbuilding = building_type \n\tsize > 5 \n\tinclude_locked = yes \n\tprovince = 42 #will check province buildings if specified \n}" + "description": "checks building for available construction levels \nfree_building_slots = { \n\tbuilding = building_type \n\tsize > 5 \n\tinclude_locked = yes # Optional - only to be used for buildings using Shared Slots. \n\tprovince = 42 #will check province buildings if specified \n}" }, "is_demilitarized_zone": { "supported_scope": ["STATE"], @@ -3140,7 +3942,7 @@ "custom_trigger_tooltip": { "supported_scope": ["any"], "supported_target": ["none"], - "description": "Works as an and-trigger with a custom tooltip. will check if KEY_NOT first if it is inside NOT = { }" + "description": "![MD]\nAlias for [custom_override_tooltip](#custom_override_tooltip) trigger (see that trigger for more info). Kept for backward compatibility.\nPrefer [custom_override_tooltip](#custom_override_tooltip) instead." }, "has_equipment": { "supported_scope": ["COUNTRY"], @@ -3485,7 +4287,7 @@ "has_cavalry_ratio": { "supported_scope": ["COMBATANT"], "supported_target": ["none"], - "description": "Check that ratio of cavalry brigades in the composition of a side of combating troops are over a certain level" + "description": "\"Check that ratio of cavalry battalions in the composition of a side of combating troops are over a certain level.\nFor example:\nhas_cavalry_ratio > 0.5\"" }, "num_occupied_states": { "supported_scope": ["COUNTRY"], @@ -3610,7 +4412,7 @@ "any_province_building_level": { "supported_scope": ["STATE"], "supported_target": ["any"], - "description": "In the current state, checks if any province within the specified limit has a building of the specified level." + "description": "In the current state, checks if any province within the specified limit has a building of the specified level.\nExample:\nany_province_building_level = {\n province = {\n id = 421 # Only check specific provinces instead of all in state, can specify multiple provinces on multiple lines.\n all_provinces = yes # default: no. Mutually exclusive with 'id = xxx']\n limit_to_border = yes # default: no. Only border provinces.\n limit_to_coastal = yes # default: no. Only coastal provinces.\n limit_to_victory_point = yes # default: no. Only provinces with > 0 victory points.\n limit_to_naval_base = yes # default: no. Only provinces with a naval base.\n }\n building = bunker # Building type.\n level < 3 # Building level to check.\n}" }, "estimated_intel_max_armor": { "supported_scope": ["COUNTRY"], @@ -4133,7 +4935,7 @@ "description": "Check the amount of casualties in thousands a country has suffered in all of it's wars" }, "meta_trigger": { - "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "COMBATANT", "ACE", "STRATEGIC_REGION", "OPERATION", "INDUSTRIAL_ORG", "PURCHASE_CONTRACT"], + "supported_scope": ["STATE", "COUNTRY", "CHARACTER", "COMBATANT", "ACE", "STRATEGIC_REGION", "OPERATION", "INDUSTRIAL_ORG", "PURCHASE_CONTRACT", "RAID_INSTANCE", "SPECIAL_PROJECT"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], "description": "meta triggers can be used for building triggers from strings and running them. following example will test if Germany has 42 pp:\nmeta_trigger = {\n text = {\n [COUNTRY] = {\n political_power > [POW]\n }\n }\n COUNTRY = \"GER\"\n POW = 42\n debug = no #set to yes if you want to see what game actually executes\n}\n" }, @@ -4447,6 +5249,16 @@ "supported_target": ["any"], "description": "\"return true if the state is a one-state-island.\nMore precisely, all provinces in the state have no land neighbor.\nOr if they do they are connected by a strait or the neighbor is inside the state.\nex: 145 = {\n\tis_one_state_island = yes\n\tis_one_state_island = no\n}\"" }, + "is_special_project_completed": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Checks if the country in scope has completed the special project in input.\nex:\nSOV = {\n\tis_special_project_completed = sp:my_project\n\tis_special_project_completed = var:my_project_var\n\tis_special_project_completed = PREV # accepts variables and keywords\n}\"" + }, + "is_special_project_being_researched": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "\"Checks if the country in scope is currently researching the special project in input.\nex:\nSOV = {\n\tis_special_project_being_researched = sp:my_project\n\tis_special_project_being_researched = var:my_project_var\n\tis_special_project_being_researched = PREV # accepts variables and keywords\n}\"" + }, "any_purchase_contract": { "supported_scope": ["COUNTRY"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -4467,6 +5279,46 @@ "supported_target": ["none"], "description": "Check value of purchase contract completion. Example: deal_completition < 0.6" }, + "has_market_access_with": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "Check if the country has market access with another country. Example: has_market_access_with = GER" + }, + "has_officer_name": { + "supported_scope": [], + "supported_target": ["none"], + "description": "\"checks if division has an officer with the provided name key.\nExamples:\n\thas_officer_token = FIN_nikke_parmi\n\"" + }, + "has_artillery_ratio": { + "supported_scope": ["COMBATANT"], + "supported_target": ["none"], + "description": "\"Check that ratio of atrillery battalions in the composition of a side of combating troops are over a certain level.\nFor example:\nhas_artillery_ratio > 0.1\"" + }, + "has_unit_type": { + "supported_scope": ["COMBATANT"], + "supported_target": ["none"], + "description": "\"Check if the combatant has at least one of the provided unit types.\nFor example:\nhas_unit_type = amphibious_mechanized\n\"" + }, + "province_vp": { + "supported_scope": ["COMBATANT"], + "supported_target": ["none"], + "description": "\"Check if the victory points of the combatants province is larger or less than the provinded amount.\nFor example:\nprovince_vp > 2\nprovince_vp < 3\"" + }, + "has_shine_effect_on_focus": { + "supported_scope": ["COUNTRY"], + "supported_target": ["none"], + "description": "![MD]\nCheck if country has shine effect on focus (either manually achieved or by being worked on).\n\nNote that tooltips are only shown in debug mode.\n\n### Example\n```\nhas_shine_effect_on_focus = GER_prioritize_economic_growth\n```\n" + }, + "custom_override_tooltip": { + "supported_scope": ["any"], + "supported_target": ["none"], + "description": "![MD]\nAn `AND` trigger that has an overriden custom tooltip.\nA positive tooltip can be set with `tooltip` and the tooltip to be used inside a NOT can be set with `not_tooltip`.\nIf no positive tooltip is provided and the root key is a localization key (not a formatter, see [formatted localization](script_concept_documentation.md#formatted_localization)),\nthen a negative tooltip will be generated by appending `_NOT` to the root localization for the positive tooltip.\nBoth tooltip and `not_tooltip` are [bindable localizations](script_concept_documentation.md#bindable_localization).\n\n### Examples\n```\ncustom_override_tooltip = {\n\ttooltip = MY_TOOLTIP # Simple loc key tooltip\n\tnot_tooltip = MY_TOOLTIP_NOT\n\t\n}\n```\n```\ncustom_override_tooltip = {\n\ttooltip = MY_TOOLTIP\n\t# Implicit:\n\t#not_tooltip = MY_TOOLTIP_NOT\n\t\n}\n```\n```\ncustom_override_tooltip = {\n\ttooltip = {\n\t\tlocalization_key = MY_TOOLTIP # Root look key\n\t\tIMPORTANT_QUESTION = { # ID IMPORTANT_QUESTION in MY_TOOLTIP will get value:\n\t\t\tlocalization_key = MEANING_OF_LIFE # Root loc key in IMPORTANT_QUESTION\n\t\t\tANSWER = \"42\" # ID ANSWER in IMPORTANT_QUESTION will get value 42\n\t\t}\n\t\tJUST_AS_IMPORTANT = OR_NOT # ID JUST_AS_IMPORTANT in MY_TOOLTIP will get value OR_NOT\n\t}\n\t# Implicit:\n\t# not_tooltip = {\n\t#\tlocalization_key = MY_TOOLTIP_NOT\n\t#\tIMPORTANT_QUESTION = {\n\t#\t\tlocalization_key = MEANING_OF_LIFE\n\t#\t\tANSWER = \"42\"\n\t#\t}\n\t#\tJUST_AS_IMPORTANT = OR_NOT\n\t#}\n\t\n}\n```\n" + }, + "has_contested_owner": { + "supported_scope": ["STATE", "COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "![MD]\nChecks if a state has the specified country as a contested owner.\nThe trigger can be used either from a country or a state scope and accepts the other as parameter.\nThe trigger is localized with a localization environment containing `Country` and `State`.\n\n### Example\nThe following example has the same end result and localization.\n```\n42 = {\n\thas_contested_owner = GER\n}\nGER = {\n\thas_contested_owner = 42\n}\n```\nStandard scope accessors can also be used:\n```\n### Assuming current scope is a state and FROM is a country scope\nhas_contested_owner = FROM\n```\n" + }, "longest_war_length": { "supported_scope": ["COUNTRY"], "supported_target": ["none"], @@ -4572,6 +5424,11 @@ "supported_target": ["none"], "description": "Checks whether the operative is performing the given mission:\noperative_leader_mission = build_intel_network" }, + "fighting_army_strength_ratio": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "Compares the total army fighting strength between the scope country and the one set with 'tag'\n\nExample 1:\nfighting_army_strength_ratio = {\n\ttag = TAG\n\tratio > 0.7 # can be '<','>' or '='\n}\n\nExample 2:\nfighting_army_strength_ratio = {\n\ttag = TAG\n\tratio > VARIABLE # can be '<','>' or '='\n}" + }, "compare_intel_with": { "supported_scope": ["COUNTRY"], "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], @@ -4837,6 +5694,16 @@ "supported_target": ["none"], "description": "alias of has_advisor_role" }, + "num_nukes_being_dropped": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "total number of nukes that are currently ready to be dropped" + }, + "num_nukes_left_to_drop": { + "supported_scope": ["COUNTRY"], + "supported_target": ["THIS", "ROOT", "PREV", "FROM", "OWNER", "CONTROLLER", "OCCUPIED", "CAPITAL"], + "description": "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)" + }, "can_be_country_leader": { "supported_scope": ["COUNTRY", "CHARACTER"], "supported_target": ["none"], @@ -4965,7 +5832,7 @@ "building_count_trigger": { "supported_scope": ["STATE", "COUNTRY"], "supported_target": ["none"], - "description": "Checks if the current scope has the specified amount of the specified building. \nUsage: < \nSupported buildings: infrastructure, arms_factory, industrial_complex, air_base, supply_node, rail_way, naval_base, bunker, coastal_bunker, dockyard, anti_air_building, synthetic_refinery, fuel_silo, radar_station, rocket_site, nuclear_reactor." + "description": "Checks if the current scope has the specified amount of the specified building. \nUsage: < \nSupported buildings: infrastructure, arms_factory, industrial_complex, air_base, supply_node, rail_way, naval_facility, naval_base, bunker, coastal_bunker, stronghold_network, dockyard, anti_air_building, synthetic_refinery, fuel_silo, radar_station, mega_gun_emplacement, rocket_site, nuclear_reactor, nuclear_reactor_heavy_water, commercial_nuclear_reactor, nuclear_facility, air_facility, land_facility, dam, dam_mountain, canal_kiel, canal_panama, landmark_big_ben, landmark_colosseum, landmark_cristo_redentor, landmark_eiffel_tower, landmark_statue_of_liberty, landmark_kremlin, landmark_hofburg_palace, landmark_berlin_reichstag, landmark_berlin_volkshalle." }, "resource_count_trigger": { "supported_scope": ["STATE", "COUNTRY"], @@ -5158,6 +6025,12 @@ "decimal_places": 0, "IsDynamic": false, "categories": ["naval"] + }, { + "name": "naval_commando_raid_distance", + "type": "number", + "decimal_places": 0, + "IsDynamic": false, + "categories": ["naval"] }, { "name": "carrier_traffic", "type": "number", @@ -5589,12 +6462,23 @@ "type": "bool", "IsDynamic": false, "categories": ["country"] + }, { + "name": "thermonuclear_production", + "type": "bool", + "IsDynamic": false, + "categories": ["country"] }, { "name": "nuclear_production_factor", "type": "number", "decimal_places": 0, "IsDynamic": false, "categories": ["country"] + }, { + "name": "thermonuclear_production_factor", + "type": "number", + "decimal_places": 0, + "IsDynamic": false, + "categories": ["country"] }, { "name": "foreign_subversive_activites", "type": "number", @@ -7080,6 +7964,12 @@ "decimal_places": 2, "IsDynamic": false, "categories": ["unit_leader"] + }, { + "name": "river_crossing_factor_against", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["army"] }, { "name": "dont_lose_dig_in_on_attack", "type": "bool", @@ -7151,6 +8041,12 @@ "decimal_places": 2, "IsDynamic": false, "categories": ["country"] + }, { + "name": "resource_trade_cost_bonus_per_factory", + "type": "number", + "decimal_places": 0, + "IsDynamic": false, + "categories": ["country"] }, { "name": "offensive_war_stability_factor", "type": "number", @@ -8118,6 +9014,12 @@ "decimal_places": 0, "IsDynamic": false, "categories": ["country", "intelligence_agency"] + }, { + "name": "female_random_scientist_chance", + "type": "number", + "decimal_places": 0, + "IsDynamic": false, + "categories": ["country", "scientist"] }, { "name": "female_random_army_leader_chance", "type": "number", @@ -8503,31 +9405,85 @@ "IsDynamic": false, "categories": ["army"] }, { - "name": "operation_outcome", + "name": "state_production_speed_facility_factor", "type": "number", - "decimal_places": 0, - "IsDynamic": true, - "categories": ["intelligence_agency"] + "decimal_places": 2, + "IsDynamic": false, + "categories": ["state"] }, { - "name": "operation_cost", + "name": "production_speed_facility_factor", "type": "number", - "decimal_places": 0, - "IsDynamic": true, - "categories": ["intelligence_agency"] + "decimal_places": 2, + "IsDynamic": false, + "categories": ["country"] }, { - "name": "operation_infiltrate_outcome", + "name": "special_project_speed_factor", "type": "number", - "decimal_places": 0, - "IsDynamic": true, - "categories": ["intelligence_agency"] + "decimal_places": 2, + "IsDynamic": false, + "categories": ["country"] }, { - "name": "modifier_army_sub_unit_cavalry_attack_factor", + "name": "special_project_facility_supply_consumption_factor", "type": "number", "decimal_places": 2, - "IsDynamic": true, - "categories": ["army"] + "IsDynamic": false, + "categories": ["country"] }, { - "name": "modifier_army_sub_unit_cavalry_defence_factor", + "name": "scientist_xp_gain_factor", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["character"] + }, { + "name": "scientist_research_bonus_factor", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["character"] + }, { + "name": "scientist_breakthrough_bonus_factor", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["character"] + }, { + "name": "underway_replenishment_range", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["country"] + }, { + "name": "underway_replenishment_convoy_cost", + "type": "number", + "decimal_places": 2, + "IsDynamic": false, + "categories": ["country"] + }, { + "name": "operation_outcome", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["intelligence_agency"] + }, { + "name": "operation_cost", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["intelligence_agency"] + }, { + "name": "operation_infiltrate_outcome", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["intelligence_agency"] + }, { + "name": "modifier_army_sub_unit_cavalry_attack_factor", + "type": "number", + "decimal_places": 2, + "IsDynamic": true, + "categories": ["army"] + }, { + "name": "modifier_army_sub_unit_cavalry_defence_factor", "type": "number", "decimal_places": 2, "IsDynamic": true, @@ -8838,6 +9794,38 @@ "decimal_places": 2, "IsDynamic": true, "categories": ["army"] + }, { + "groupname": "country_resource_cost_", + "desc": "Country resource cost.", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["country"], + "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] + }, { + "groupname": "production_cost_max_", + "desc": "Max naval equipment production cost.", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["naval"], + "modifiers": ["convoy", "floating_harbor_equipment", "ship_hull_carrier", "ship_hull_cruiser", "ship_hull_heavy", "ship_hull_light", "ship_hull_submarine"] + }, { + "groupname": "_max_level_terrain_limit", + "desc": "Maximum allowed building level for specific terrain.", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["country"], + "modifiers": ["air_base_desert", "air_base_forest", "air_base_hills", "air_base_jungle", "air_base_lakes", "air_base_marsh", "air_base_mountain", "air_base_ocean", "air_base_plains", "air_base_unknown", "air_base_urban", "air_base_water_deep_ocean", "air_base_water_fjords", "air_base_water_shallow_sea", "air_facility_desert", "air_facility_forest", "air_facility_hills", "air_facility_jungle", "air_facility_lakes", "air_facility_marsh", "air_facility_mountain", "air_facility_ocean", "air_facility_plains", "air_facility_unknown", "air_facility_urban", "air_facility_water_deep_ocean", "air_facility_water_fjords", "air_facility_water_shallow_sea", "anti_air_building_desert", "anti_air_building_forest", "anti_air_building_hills", "anti_air_building_jungle", "anti_air_building_lakes", "anti_air_building_marsh", "anti_air_building_mountain", "anti_air_building_ocean", "anti_air_building_plains", "anti_air_building_unknown", "anti_air_building_urban", "anti_air_building_water_deep_ocean", "anti_air_building_water_fjords", "anti_air_building_water_shallow_sea", "arms_factory_desert", "arms_factory_forest", "arms_factory_hills", "arms_factory_jungle", "arms_factory_lakes", "arms_factory_marsh", "arms_factory_mountain", "arms_factory_ocean", "arms_factory_plains", "arms_factory_unknown", "arms_factory_urban", "arms_factory_water_deep_ocean", "arms_factory_water_fjords", "arms_factory_water_shallow_sea", "bunker_desert", "bunker_forest", "bunker_hills", "bunker_jungle", "bunker_lakes", "bunker_marsh", "bunker_mountain", "bunker_ocean", "bunker_plains", "bunker_unknown", "bunker_urban", "bunker_water_deep_ocean", "bunker_water_fjords", "bunker_water_shallow_sea", "canal_kiel_desert", "canal_kiel_forest", "canal_kiel_hills", "canal_kiel_jungle", "canal_kiel_lakes", "canal_kiel_marsh", "canal_kiel_mountain", "canal_kiel_ocean", "canal_kiel_plains", "canal_kiel_unknown", "canal_kiel_urban", "canal_kiel_water_deep_ocean", "canal_kiel_water_fjords", "canal_kiel_water_shallow_sea", "canal_panama_desert", "canal_panama_forest", "canal_panama_hills", "canal_panama_jungle", "canal_panama_lakes", "canal_panama_marsh", "canal_panama_mountain", "canal_panama_ocean", "canal_panama_plains", "canal_panama_unknown", "canal_panama_urban", "canal_panama_water_deep_ocean", "canal_panama_water_fjords", "canal_panama_water_shallow_sea", "coastal_bunker_desert", "coastal_bunker_forest", "coastal_bunker_hills", "coastal_bunker_jungle", "coastal_bunker_lakes", "coastal_bunker_marsh", "coastal_bunker_mountain", "coastal_bunker_ocean", "coastal_bunker_plains", "coastal_bunker_unknown", "coastal_bunker_urban", "coastal_bunker_water_deep_ocean", "coastal_bunker_water_fjords", "coastal_bunker_water_shallow_sea", "commercial_nuclear_reactor_desert", "commercial_nuclear_reactor_forest", "commercial_nuclear_reactor_hills", "commercial_nuclear_reactor_jungle", "commercial_nuclear_reactor_lakes", "commercial_nuclear_reactor_marsh", "commercial_nuclear_reactor_mountain", "commercial_nuclear_reactor_ocean", "commercial_nuclear_reactor_plains", "commercial_nuclear_reactor_unknown", "commercial_nuclear_reactor_urban", "commercial_nuclear_reactor_water_deep_ocean", "commercial_nuclear_reactor_water_fjords", "commercial_nuclear_reactor_water_shallow_sea", "dam_desert", "dam_forest", "dam_hills", "dam_jungle", "dam_lakes", "dam_marsh", "dam_mountain", "dam_mountain_desert", "dam_mountain_forest", "dam_mountain_hills", "dam_mountain_jungle", "dam_mountain_lakes", "dam_mountain_marsh", "dam_mountain_mountain", "dam_mountain_ocean", "dam_mountain_plains", "dam_mountain_unknown", "dam_mountain_urban", "dam_mountain_water_deep_ocean", "dam_mountain_water_fjords", "dam_mountain_water_shallow_sea", "dam_ocean", "dam_plains", "dam_unknown", "dam_urban", "dam_water_deep_ocean", "dam_water_fjords", "dam_water_shallow_sea", "dockyard_desert", "dockyard_forest", "dockyard_hills", "dockyard_jungle", "dockyard_lakes", "dockyard_marsh", "dockyard_mountain", "dockyard_ocean", "dockyard_plains", "dockyard_unknown", "dockyard_urban", "dockyard_water_deep_ocean", "dockyard_water_fjords", "dockyard_water_shallow_sea", "fuel_silo_desert", "fuel_silo_forest", "fuel_silo_hills", "fuel_silo_jungle", "fuel_silo_lakes", "fuel_silo_marsh", "fuel_silo_mountain", "fuel_silo_ocean", "fuel_silo_plains", "fuel_silo_unknown", "fuel_silo_urban", "fuel_silo_water_deep_ocean", "fuel_silo_water_fjords", "fuel_silo_water_shallow_sea", "industrial_complex_desert", "industrial_complex_forest", "industrial_complex_hills", "industrial_complex_jungle", "industrial_complex_lakes", "industrial_complex_marsh", "industrial_complex_mountain", "industrial_complex_ocean", "industrial_complex_plains", "industrial_complex_unknown", "industrial_complex_urban", "industrial_complex_water_deep_ocean", "industrial_complex_water_fjords", "industrial_complex_water_shallow_sea", "infrastructure_desert", "infrastructure_forest", "infrastructure_hills", "infrastructure_jungle", "infrastructure_lakes", "infrastructure_marsh", "infrastructure_mountain", "infrastructure_ocean", "infrastructure_plains", "infrastructure_unknown", "infrastructure_urban", "infrastructure_water_deep_ocean", "infrastructure_water_fjords", "infrastructure_water_shallow_sea", "land_facility_desert", "land_facility_forest", "land_facility_hills", "land_facility_jungle", "land_facility_lakes", "land_facility_marsh", "land_facility_mountain", "land_facility_ocean", "land_facility_plains", "land_facility_unknown", "land_facility_urban", "land_facility_water_deep_ocean", "land_facility_water_fjords", "land_facility_water_shallow_sea", "landmark_berlin_reichstag_desert", "landmark_berlin_reichstag_forest", "landmark_berlin_reichstag_hills", "landmark_berlin_reichstag_jungle", "landmark_berlin_reichstag_lakes", "landmark_berlin_reichstag_marsh", "landmark_berlin_reichstag_mountain", "landmark_berlin_reichstag_ocean", "landmark_berlin_reichstag_plains", "landmark_berlin_reichstag_unknown", "landmark_berlin_reichstag_urban", "landmark_berlin_reichstag_water_deep_ocean", "landmark_berlin_reichstag_water_fjords", "landmark_berlin_reichstag_water_shallow_sea", "landmark_berlin_volkshalle_desert", "landmark_berlin_volkshalle_forest", "landmark_berlin_volkshalle_hills", "landmark_berlin_volkshalle_jungle", "landmark_berlin_volkshalle_lakes", "landmark_berlin_volkshalle_marsh", "landmark_berlin_volkshalle_mountain", "landmark_berlin_volkshalle_ocean", "landmark_berlin_volkshalle_plains", "landmark_berlin_volkshalle_unknown", "landmark_berlin_volkshalle_urban", "landmark_berlin_volkshalle_water_deep_ocean", "landmark_berlin_volkshalle_water_fjords", "landmark_berlin_volkshalle_water_shallow_sea", "landmark_big_ben_desert", "landmark_big_ben_forest", "landmark_big_ben_hills", "landmark_big_ben_jungle", "landmark_big_ben_lakes", "landmark_big_ben_marsh", "landmark_big_ben_mountain", "landmark_big_ben_ocean", "landmark_big_ben_plains", "landmark_big_ben_unknown", "landmark_big_ben_urban", "landmark_big_ben_water_deep_ocean", "landmark_big_ben_water_fjords", "landmark_big_ben_water_shallow_sea", "landmark_colosseum_desert", "landmark_colosseum_forest", "landmark_colosseum_hills", "landmark_colosseum_jungle", "landmark_colosseum_lakes", "landmark_colosseum_marsh", "landmark_colosseum_mountain", "landmark_colosseum_ocean", "landmark_colosseum_plains", "landmark_colosseum_unknown", "landmark_colosseum_urban", "landmark_colosseum_water_deep_ocean", "landmark_colosseum_water_fjords", "landmark_colosseum_water_shallow_sea", "landmark_cristo_redentor_desert", "landmark_cristo_redentor_forest", "landmark_cristo_redentor_hills", "landmark_cristo_redentor_jungle", "landmark_cristo_redentor_lakes", "landmark_cristo_redentor_marsh", "landmark_cristo_redentor_mountain", "landmark_cristo_redentor_ocean", "landmark_cristo_redentor_plains", "landmark_cristo_redentor_unknown", "landmark_cristo_redentor_urban", "landmark_cristo_redentor_water_deep_ocean", "landmark_cristo_redentor_water_fjords", "landmark_cristo_redentor_water_shallow_sea", "landmark_eiffel_tower_desert", "landmark_eiffel_tower_forest", "landmark_eiffel_tower_hills", "landmark_eiffel_tower_jungle", "landmark_eiffel_tower_lakes", "landmark_eiffel_tower_marsh", "landmark_eiffel_tower_mountain", "landmark_eiffel_tower_ocean", "landmark_eiffel_tower_plains", "landmark_eiffel_tower_unknown", "landmark_eiffel_tower_urban", "landmark_eiffel_tower_water_deep_ocean", "landmark_eiffel_tower_water_fjords", "landmark_eiffel_tower_water_shallow_sea", "landmark_hofburg_palace_desert", "landmark_hofburg_palace_forest", "landmark_hofburg_palace_hills", "landmark_hofburg_palace_jungle", "landmark_hofburg_palace_lakes", "landmark_hofburg_palace_marsh", "landmark_hofburg_palace_mountain", "landmark_hofburg_palace_ocean", "landmark_hofburg_palace_plains", "landmark_hofburg_palace_unknown", "landmark_hofburg_palace_urban", "landmark_hofburg_palace_water_deep_ocean", "landmark_hofburg_palace_water_fjords", "landmark_hofburg_palace_water_shallow_sea", "landmark_kremlin_desert", "landmark_kremlin_forest", "landmark_kremlin_hills", "landmark_kremlin_jungle", "landmark_kremlin_lakes", "landmark_kremlin_marsh", "landmark_kremlin_mountain", "landmark_kremlin_ocean", "landmark_kremlin_plains", "landmark_kremlin_unknown", "landmark_kremlin_urban", "landmark_kremlin_water_deep_ocean", "landmark_kremlin_water_fjords", "landmark_kremlin_water_shallow_sea", "landmark_statue_of_liberty_desert", "landmark_statue_of_liberty_forest", "landmark_statue_of_liberty_hills", "landmark_statue_of_liberty_jungle", "landmark_statue_of_liberty_lakes", "landmark_statue_of_liberty_marsh", "landmark_statue_of_liberty_mountain", "landmark_statue_of_liberty_ocean", "landmark_statue_of_liberty_plains", "landmark_statue_of_liberty_unknown", "landmark_statue_of_liberty_urban", "landmark_statue_of_liberty_water_deep_ocean", "landmark_statue_of_liberty_water_fjords", "landmark_statue_of_liberty_water_shallow_sea", "mega_gun_emplacement_desert", "mega_gun_emplacement_forest", "mega_gun_emplacement_hills", "mega_gun_emplacement_jungle", "mega_gun_emplacement_lakes", "mega_gun_emplacement_marsh", "mega_gun_emplacement_mountain", "mega_gun_emplacement_ocean", "mega_gun_emplacement_plains", "mega_gun_emplacement_unknown", "mega_gun_emplacement_urban", "mega_gun_emplacement_water_deep_ocean", "mega_gun_emplacement_water_fjords", "mega_gun_emplacement_water_shallow_sea", "naval_base_desert", "naval_base_forest", "naval_base_hills", "naval_base_jungle", "naval_base_lakes", "naval_base_marsh", "naval_base_mountain", "naval_base_ocean", "naval_base_plains", "naval_base_unknown", "naval_base_urban", "naval_base_water_deep_ocean", "naval_base_water_fjords", "naval_base_water_shallow_sea", "naval_facility_desert", "naval_facility_forest", "naval_facility_hills", "naval_facility_jungle", "naval_facility_lakes", "naval_facility_marsh", "naval_facility_mountain", "naval_facility_ocean", "naval_facility_plains", "naval_facility_unknown", "naval_facility_urban", "naval_facility_water_deep_ocean", "naval_facility_water_fjords", "naval_facility_water_shallow_sea", "nuclear_facility_desert", "nuclear_facility_forest", "nuclear_facility_hills", "nuclear_facility_jungle", "nuclear_facility_lakes", "nuclear_facility_marsh", "nuclear_facility_mountain", "nuclear_facility_ocean", "nuclear_facility_plains", "nuclear_facility_unknown", "nuclear_facility_urban", "nuclear_facility_water_deep_ocean", "nuclear_facility_water_fjords", "nuclear_facility_water_shallow_sea", "nuclear_reactor_desert", "nuclear_reactor_forest", "nuclear_reactor_heavy_water_desert", "nuclear_reactor_heavy_water_forest", "nuclear_reactor_heavy_water_hills", "nuclear_reactor_heavy_water_jungle", "nuclear_reactor_heavy_water_lakes", "nuclear_reactor_heavy_water_marsh", "nuclear_reactor_heavy_water_mountain", "nuclear_reactor_heavy_water_ocean", "nuclear_reactor_heavy_water_plains", "nuclear_reactor_heavy_water_unknown", "nuclear_reactor_heavy_water_urban", "nuclear_reactor_heavy_water_water_deep_ocean", "nuclear_reactor_heavy_water_water_fjords", "nuclear_reactor_heavy_water_water_shallow_sea", "nuclear_reactor_hills", "nuclear_reactor_jungle", "nuclear_reactor_lakes", "nuclear_reactor_marsh", "nuclear_reactor_mountain", "nuclear_reactor_ocean", "nuclear_reactor_plains", "nuclear_reactor_unknown", "nuclear_reactor_urban", "nuclear_reactor_water_deep_ocean", "nuclear_reactor_water_fjords", "nuclear_reactor_water_shallow_sea", "radar_station_desert", "radar_station_forest", "radar_station_hills", "radar_station_jungle", "radar_station_lakes", "radar_station_marsh", "radar_station_mountain", "radar_station_ocean", "radar_station_plains", "radar_station_unknown", "radar_station_urban", "radar_station_water_deep_ocean", "radar_station_water_fjords", "radar_station_water_shallow_sea", "rail_way_desert", "rail_way_forest", "rail_way_hills", "rail_way_jungle", "rail_way_lakes", "rail_way_marsh", "rail_way_mountain", "rail_way_ocean", "rail_way_plains", "rail_way_unknown", "rail_way_urban", "rail_way_water_deep_ocean", "rail_way_water_fjords", "rail_way_water_shallow_sea", "rocket_site_desert", "rocket_site_forest", "rocket_site_hills", "rocket_site_jungle", "rocket_site_lakes", "rocket_site_marsh", "rocket_site_mountain", "rocket_site_ocean", "rocket_site_plains", "rocket_site_unknown", "rocket_site_urban", "rocket_site_water_deep_ocean", "rocket_site_water_fjords", "rocket_site_water_shallow_sea", "stronghold_network_desert", "stronghold_network_forest", "stronghold_network_hills", "stronghold_network_jungle", "stronghold_network_lakes", "stronghold_network_marsh", "stronghold_network_mountain", "stronghold_network_ocean", "stronghold_network_plains", "stronghold_network_unknown", "stronghold_network_urban", "stronghold_network_water_deep_ocean", "stronghold_network_water_fjords", "stronghold_network_water_shallow_sea", "supply_node_desert", "supply_node_forest", "supply_node_hills", "supply_node_jungle", "supply_node_lakes", "supply_node_marsh", "supply_node_mountain", "supply_node_ocean", "supply_node_plains", "supply_node_unknown", "supply_node_urban", "supply_node_water_deep_ocean", "supply_node_water_fjords", "supply_node_water_shallow_sea", "synthetic_refinery_desert", "synthetic_refinery_forest", "synthetic_refinery_hills", "synthetic_refinery_jungle", "synthetic_refinery_lakes", "synthetic_refinery_marsh", "synthetic_refinery_mountain", "synthetic_refinery_ocean", "synthetic_refinery_plains", "synthetic_refinery_unknown", "synthetic_refinery_urban", "synthetic_refinery_water_deep_ocean", "synthetic_refinery_water_fjords", "synthetic_refinery_water_shallow_sea"] + }, { + "groupname": "state_resource_", + "desc": "State resource.", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["state"], + "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] }, { "groupname": "_xp_gain_factor", "desc": "Xp gain factor (used if the trait has prefix 'trait_').", @@ -8845,15 +9833,47 @@ "decimal_places": 2, "IsDynamic": true, "categories": ["naval", "country", "army"], - "modifiers": ["trait_BUL_ff_sympathizer", "trait_BUL_tsar_loyalist", "trait_BUL_zveno_member", "trait_GRE_fascist_sympathizer", "trait_GRE_marxist_acolyte", "trait_GRE_stauch_monarchist", "trait_GRE_venezelist_loyalist", "trait_SOV_bukharinist", "trait_SOV_cowed_by_stalin_army", "trait_SOV_cowed_by_stalin_navy", "trait_SOV_determined", "trait_SOV_foreign_military_advisor", "trait_SOV_monarchist_sympathizer", "trait_SOV_stalinist", "trait_SOV_trotskyist", "trait_SPA_carlist_loyalties", "trait_SPA_falangist_loyalties", "trait_SPA_nationalist_sympathies", "trait_SPR_anti_stalinist_loyalties", "trait_SPR_republican_loyalties", "trait_SPR_stalinist_loyalties", "trait_TUR_kemalist_champion", "trait_cautious", "trait_engineer", "trait_mountaineer", "trait_reckless"] + "modifiers": ["trait_BUL_ff_sympathizer", "trait_BUL_tsar_loyalist", "trait_BUL_zveno_member", "trait_GRE_fascist_sympathizer", "trait_GRE_marxist_acolyte", "trait_GRE_stauch_monarchist", "trait_GRE_venezelist_loyalist", "trait_HUN_fascist_sympathies", "trait_HUN_vitez", "trait_SOV_bukharinist", "trait_SOV_cowed_by_stalin_army", "trait_SOV_cowed_by_stalin_navy", "trait_SOV_determined", "trait_SOV_foreign_military_advisor", "trait_SOV_monarchist_sympathizer", "trait_SOV_stalinist", "trait_SOV_trotskyist", "trait_SPA_carlist_loyalties", "trait_SPA_falangist_loyalties", "trait_SPA_nationalist_sympathies", "trait_SPR_anti_stalinist_loyalties", "trait_SPR_republican_loyalties", "trait_SPR_stalinist_loyalties", "trait_TUR_kemalist_champion", "trait_cautious", "trait_engineer", "trait_mountaineer", "trait_reckless"] }, { - "groupname": "_cost_factor", - "desc": "Idea group cost factor.", + "groupname": "_drift", + "desc": "Ideology drift.", + "type": "number", + "decimal_places": 2, + "IsDynamic": true, + "categories": ["politics"], + "modifiers": ["communism", "democratic", "fascism", "neutrality"] + }, { + "groupname": "_speed_factor", + "desc": "Special project speed factor", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["country", "state"], + "modifiers": ["sp_air_axial_jet_engine", "sp_air_bouncing_bomb", "sp_air_earthshaker_bomb", "sp_air_helicopter", "sp_air_intercontinental_bomber", "sp_air_jet_engine", "sp_air_mothership_aircraft", "sp_air_radar", "sp_air_supersonic_jet", "sp_commercial_nuclear_reactor", "sp_land_flamethrower_tank", "sp_land_land_cruiser", "sp_land_military_engineering_vehicles", "sp_land_multi_charge_large_caliber_gun", "sp_land_self_propelled_super_heavy_howitzer", "sp_land_stronghold_network", "sp_land_super_heavy_howitzer", "sp_land_super_heavy_railway_gun", "sp_naval_aip_engine", "sp_naval_anechoic_tiles", "sp_naval_cruiser_submarine", "sp_naval_fleet_submarine", "sp_naval_ice_carrier", "sp_naval_midget_submarine", "sp_naval_modern_battleship", "sp_naval_modern_carrier", "sp_naval_nuclear_missile_submarine", "sp_naval_nuclear_submarine", "sp_naval_nuclear_torpedo", "sp_naval_proximity_fuze", "sp_naval_rocket_launching_submarine", "sp_naval_super_heavy_battleship", "sp_naval_torpedo_cruiser", "sp_naval_underway_replenishment", "sp_nuclear_bomb", "sp_nuclear_engines", "sp_nuclear_reactor", "sp_nuclear_warheads", "sp_rocket_interceptor", "sp_rockets_ballistic_missile", "sp_rockets_flying_bomb", "sp_rockets_ground_to_air_missile", "sp_rockets_long_range_ballistic_missile", "sp_rockets_medium_range_ballistic_missile", "sp_tag_aircraft", "sp_tag_artillery", "sp_tag_bomb", "sp_tag_guided_bomb", "sp_tag_helicopter", "sp_tag_jet", "sp_tag_nuclear_power", "sp_tag_nuclear_warfare", "sp_tag_radar", "sp_tag_rocket", "sp_tag_submarine", "sp_tag_surface_ship", "sp_tag_tank", "sp_thermo_nuclear_bomb", "specialization_air", "specialization_land", "specialization_naval", "specialization_nuclear"] + }, { + "groupname": "unit__design_cost_factor", + "desc": "Unit design cost factor.", + "type": "number", + "decimal_places": 2, + "IsDynamic": true, + "categories": ["naval", "country", "army"], + "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "armored_engineer", "armored_maintenance", "armored_signal", "artillery", "artillery_brigade", "assault_engineer", "ballistic_missile", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "explosive_ammo", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "helicopter_brigade", "helicopter_field_hospital", "helicopter_recon", "helicopter_transport", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "land_cruiser", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "mothership", "motorized", "motorized_military_police", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "nuclear_missile", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "sam_missile", "scout_plane", "self_propelled_super_heavy_artillery", "signal_company", "strat_bomber", "strat_bomber_intercontinental", "sturmtruppe_battalion", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_artillery", "super_heavy_railway_gun", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] + }, { + "groupname": "_max_level_terrain_limit", + "desc": "Maximum allowed building level for terrain.", "type": "number", "decimal_places": 0, "IsDynamic": true, "categories": ["country"], - "modifiers": ["academy_spirit", "air_chief", "air_force_academy_spirit", "air_force_command_spirit", "air_force_spirit", "aircraft_manufacturer", "army_chief", "army_spirit", "country", "division_command_spirit", "economy", "hidden_ideas", "high_command", "industrial_concern", "materiel_manufacturer", "mobilization_laws", "naval_academy_spirit", "naval_command_spirit", "naval_manufacturer", "navy_chief", "navy_spirit", "political_advisor", "tank_manufacturer", "theorist", "trade_laws"] + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] + }, { + "groupname": "_outcome", + "desc": "Operation outcome modifier.", + "type": "number", + "decimal_places": 0, + "IsDynamic": true, + "categories": ["intelligence_agency"], + "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup_government", "operation_fake_intel", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini"] }, { "groupname": "state_production_speed__factor", "desc": "State building construction speed factor.", @@ -8861,15 +9881,15 @@ "decimal_places": 2, "IsDynamic": true, "categories": ["state"], - "modifiers": ["air_base", "anti_air_building", "arms_factory", "bunker", "coastal_bunker", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "naval_base", "nuclear_reactor", "radar_station", "rail_way", "rocket_site", "supply_node", "synthetic_refinery"] + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dam_mountain", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { - "groupname": "experience_gain__combat_factor", - "desc": "Unit experience gain factor in combat.", + "groupname": "_cost_factor", + "desc": "Technology cost factor.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["naval", "country"], - "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "artillery", "artillery_brigade", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "motorized", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "scout_plane", "signal_company", "strat_bomber", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] + "categories": ["country"], + "modifiers": ["cat_air_bombs", "cat_air_engine", "cat_air_guns", "cat_anti_air", "cat_anti_tank", "cat_armored_cars", "cat_base_strike", "cat_battlefield_support", "cat_fleet_in_being", "cat_fortification", "cat_grand_battle_plan", "cat_heavy_armor", "cat_heavy_fighter", "cat_light_armor", "cat_marines_doctrine", "cat_maritime_patrol", "cat_mass_assault", "cat_mechanized_equipment", "cat_medium_armor", "cat_mobile_warfare", "cat_mountaineers_doctrine", "cat_operational_integrity", "cat_paratroopers_doctrine", "cat_production", "cat_scout_plane", "cat_ship_heavy_battery", "cat_ship_light_battery", "cat_ship_medium_battery", "cat_special_forces_generic", "cat_strategic_bomber", "cat_strategic_destruction", "cat_superior_firepower", "cat_synth_oil", "cat_synth_rubber", "cat_torpedoes", "cat_trade_interdiction"] }, { "groupname": "_acceptance", "desc": "Ideology acceptance.", @@ -8887,53 +9907,45 @@ "categories": ["naval", "country", "army"], "modifiers": ["BALTIC_anti_bolshevik", "BALTIC_ex_russian", "ETH_hero_of_ethiopia", "JAP_communist_sympathizer", "JAP_samurai_lineage", "POL_sanation_left_leader", "POL_sanation_right_leader", "SWE_disillusioned_with_the_government", "SWE_promoted_away_from_power", "SWE_wounded_in_protests", "adaptable", "aggressive_assaulter", "air_controller", "ambusher", "arctic_water_expert", "armor_officer", "ascari_officer", "aviation_enthusiast", "battleship_adherent", "bearer_of_artillery", "big_guns_expert", "blockade_runner", "blue_water_expert", "bold", "brilliant_strategist", "camouflage_expert", "career_officer", "caustic_personality", "cavalry_expert", "cavalry_leader", "cavalry_officer", "chief_engineer", "combined_arms_expert", "commando", "concealment_expert", "craven", "crisis_magician", "cruiser_captain", "cuts_corners", "defensive_doctrine", "demoted", "desert_fox", "destroyer_leader", "disgruntled", "dive_bomber", "engineer_officer", "exiled_leader", "expert_delegator", "expert_improviser", "fast_planner", "fighter_director", "fleet_protector", "flight_deck_manager", "fly_swatter", "fortress_buster", "gentlemanly", "green_water_expert", "ground_pounder", "guerilla_fighter", "gunnery_expert", "harsh_leader", "hidden_sympathies", "hill_fighter", "hunter_killer", "infantry_expert", "infantry_leader", "infantry_officer", "inflexible_strategist", "inshore_fighter", "inspirational_leader", "invader_ii", "ironside", "irregulars_officer", "jaeger", "jungle_rat", "lancer", "loading_drill_master", "logistics_wizard", "lone_wolf", "marksman", "media_personality", "militias_officer", "mine_craft", "naval_invader", "naval_liason", "naval_lineage", "navy_career_officer", "navy_media_personality", "offensive_doctrine", "old_guard", "old_guard_navy", "operative_commando", "operative_demolition_expert", "operative_double_agent", "operative_escape_artist", "operative_infiltrator", "operative_linguist", "operative_master_interrogator", "operative_natural_orator", "operative_safe_cracker", "operative_seducer", "operative_tough", "operative_well_groomed", "organisational_leader", "organizer", "panzer_expert", "panzer_leader", "paratrooper", "peasant_sympathiser", "politically_connected", "promoted_from_the_ranks", "ranger", "reassigned", "recently_promoted", "safety_first", "scavenger", "search_pattern_expert", "seawolf", "sick", "silent_hunter", "skilled_staffer", "skirmisher", "smoke_screen_expert", "spotter", "substance_abuser", "substance_addict", "superior_tactician", "swamp_fox", "thorough_planner", "torpedo_bomber", "torpedo_expert", "trickster", "unyielding_defender", "urban_assault_specialist", "war_hero", "winter_expert", "winter_specialist", "wounded"] }, { - "groupname": "country_resource_", - "desc": "Country resource.", + "groupname": "temporary_state_resource_", + "desc": "Temporary state resource.", "type": "number", "decimal_places": 0, "IsDynamic": true, "categories": ["state"], "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] }, { - "groupname": "state_repair_speed__factor", - "desc": "State building repair speed factor.", - "type": "number", - "decimal_places": 2, - "IsDynamic": true, - "categories": ["state"], - "modifiers": ["air_base", "anti_air_building", "arms_factory", "bunker", "coastal_bunker", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "naval_base", "nuclear_reactor", "radar_station", "rail_way", "rocket_site", "supply_node", "synthetic_refinery"] - }, { - "groupname": "experience_gain__training_factor", - "desc": "Unit experience gain factor on training.", + "groupname": "state_resources__factor", + "desc": "State resource factor.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["naval", "country"], - "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "artillery", "artillery_brigade", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "motorized", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "scout_plane", "signal_company", "strat_bomber", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] + "categories": ["state"], + "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] }, { - "groupname": "_category_type_cost_factor", - "desc": "Idea category type cost factor.", + "groupname": "state__max_level_terrain_limit", + "desc": "Maximum allowed building level for specific terrain.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["country"], - "modifiers": ["air_spirit", "army_spirit", "navy_spirit"] + "categories": ["state"], + "modifiers": ["air_base_desert", "air_base_forest", "air_base_hills", "air_base_jungle", "air_base_lakes", "air_base_marsh", "air_base_mountain", "air_base_ocean", "air_base_plains", "air_base_unknown", "air_base_urban", "air_base_water_deep_ocean", "air_base_water_fjords", "air_base_water_shallow_sea", "air_facility_desert", "air_facility_forest", "air_facility_hills", "air_facility_jungle", "air_facility_lakes", "air_facility_marsh", "air_facility_mountain", "air_facility_ocean", "air_facility_plains", "air_facility_unknown", "air_facility_urban", "air_facility_water_deep_ocean", "air_facility_water_fjords", "air_facility_water_shallow_sea", "anti_air_building_desert", "anti_air_building_forest", "anti_air_building_hills", "anti_air_building_jungle", "anti_air_building_lakes", "anti_air_building_marsh", "anti_air_building_mountain", "anti_air_building_ocean", "anti_air_building_plains", "anti_air_building_unknown", "anti_air_building_urban", "anti_air_building_water_deep_ocean", "anti_air_building_water_fjords", "anti_air_building_water_shallow_sea", "arms_factory_desert", "arms_factory_forest", "arms_factory_hills", "arms_factory_jungle", "arms_factory_lakes", "arms_factory_marsh", "arms_factory_mountain", "arms_factory_ocean", "arms_factory_plains", "arms_factory_unknown", "arms_factory_urban", "arms_factory_water_deep_ocean", "arms_factory_water_fjords", "arms_factory_water_shallow_sea", "bunker_desert", "bunker_forest", "bunker_hills", "bunker_jungle", "bunker_lakes", "bunker_marsh", "bunker_mountain", "bunker_ocean", "bunker_plains", "bunker_unknown", "bunker_urban", "bunker_water_deep_ocean", "bunker_water_fjords", "bunker_water_shallow_sea", "canal_kiel_desert", "canal_kiel_forest", "canal_kiel_hills", "canal_kiel_jungle", "canal_kiel_lakes", "canal_kiel_marsh", "canal_kiel_mountain", "canal_kiel_ocean", "canal_kiel_plains", "canal_kiel_unknown", "canal_kiel_urban", "canal_kiel_water_deep_ocean", "canal_kiel_water_fjords", "canal_kiel_water_shallow_sea", "canal_panama_desert", "canal_panama_forest", "canal_panama_hills", "canal_panama_jungle", "canal_panama_lakes", "canal_panama_marsh", "canal_panama_mountain", "canal_panama_ocean", "canal_panama_plains", "canal_panama_unknown", "canal_panama_urban", "canal_panama_water_deep_ocean", "canal_panama_water_fjords", "canal_panama_water_shallow_sea", "coastal_bunker_desert", "coastal_bunker_forest", "coastal_bunker_hills", "coastal_bunker_jungle", "coastal_bunker_lakes", "coastal_bunker_marsh", "coastal_bunker_mountain", "coastal_bunker_ocean", "coastal_bunker_plains", "coastal_bunker_unknown", "coastal_bunker_urban", "coastal_bunker_water_deep_ocean", "coastal_bunker_water_fjords", "coastal_bunker_water_shallow_sea", "commercial_nuclear_reactor_desert", "commercial_nuclear_reactor_forest", "commercial_nuclear_reactor_hills", "commercial_nuclear_reactor_jungle", "commercial_nuclear_reactor_lakes", "commercial_nuclear_reactor_marsh", "commercial_nuclear_reactor_mountain", "commercial_nuclear_reactor_ocean", "commercial_nuclear_reactor_plains", "commercial_nuclear_reactor_unknown", "commercial_nuclear_reactor_urban", "commercial_nuclear_reactor_water_deep_ocean", "commercial_nuclear_reactor_water_fjords", "commercial_nuclear_reactor_water_shallow_sea", "dam_desert", "dam_forest", "dam_hills", "dam_jungle", "dam_lakes", "dam_marsh", "dam_mountain", "dam_mountain_desert", "dam_mountain_forest", "dam_mountain_hills", "dam_mountain_jungle", "dam_mountain_lakes", "dam_mountain_marsh", "dam_mountain_mountain", "dam_mountain_ocean", "dam_mountain_plains", "dam_mountain_unknown", "dam_mountain_urban", "dam_mountain_water_deep_ocean", "dam_mountain_water_fjords", "dam_mountain_water_shallow_sea", "dam_ocean", "dam_plains", "dam_unknown", "dam_urban", "dam_water_deep_ocean", "dam_water_fjords", "dam_water_shallow_sea", "dockyard_desert", "dockyard_forest", "dockyard_hills", "dockyard_jungle", "dockyard_lakes", "dockyard_marsh", "dockyard_mountain", "dockyard_ocean", "dockyard_plains", "dockyard_unknown", "dockyard_urban", "dockyard_water_deep_ocean", "dockyard_water_fjords", "dockyard_water_shallow_sea", "fuel_silo_desert", "fuel_silo_forest", "fuel_silo_hills", "fuel_silo_jungle", "fuel_silo_lakes", "fuel_silo_marsh", "fuel_silo_mountain", "fuel_silo_ocean", "fuel_silo_plains", "fuel_silo_unknown", "fuel_silo_urban", "fuel_silo_water_deep_ocean", "fuel_silo_water_fjords", "fuel_silo_water_shallow_sea", "industrial_complex_desert", "industrial_complex_forest", "industrial_complex_hills", "industrial_complex_jungle", "industrial_complex_lakes", "industrial_complex_marsh", "industrial_complex_mountain", "industrial_complex_ocean", "industrial_complex_plains", "industrial_complex_unknown", "industrial_complex_urban", "industrial_complex_water_deep_ocean", "industrial_complex_water_fjords", "industrial_complex_water_shallow_sea", "infrastructure_desert", "infrastructure_forest", "infrastructure_hills", "infrastructure_jungle", "infrastructure_lakes", "infrastructure_marsh", "infrastructure_mountain", "infrastructure_ocean", "infrastructure_plains", "infrastructure_unknown", "infrastructure_urban", "infrastructure_water_deep_ocean", "infrastructure_water_fjords", "infrastructure_water_shallow_sea", "land_facility_desert", "land_facility_forest", "land_facility_hills", "land_facility_jungle", "land_facility_lakes", "land_facility_marsh", "land_facility_mountain", "land_facility_ocean", "land_facility_plains", "land_facility_unknown", "land_facility_urban", "land_facility_water_deep_ocean", "land_facility_water_fjords", "land_facility_water_shallow_sea", "landmark_berlin_reichstag_desert", "landmark_berlin_reichstag_forest", "landmark_berlin_reichstag_hills", "landmark_berlin_reichstag_jungle", "landmark_berlin_reichstag_lakes", "landmark_berlin_reichstag_marsh", "landmark_berlin_reichstag_mountain", "landmark_berlin_reichstag_ocean", "landmark_berlin_reichstag_plains", "landmark_berlin_reichstag_unknown", "landmark_berlin_reichstag_urban", "landmark_berlin_reichstag_water_deep_ocean", "landmark_berlin_reichstag_water_fjords", "landmark_berlin_reichstag_water_shallow_sea", "landmark_berlin_volkshalle_desert", "landmark_berlin_volkshalle_forest", "landmark_berlin_volkshalle_hills", "landmark_berlin_volkshalle_jungle", "landmark_berlin_volkshalle_lakes", "landmark_berlin_volkshalle_marsh", "landmark_berlin_volkshalle_mountain", "landmark_berlin_volkshalle_ocean", "landmark_berlin_volkshalle_plains", "landmark_berlin_volkshalle_unknown", "landmark_berlin_volkshalle_urban", "landmark_berlin_volkshalle_water_deep_ocean", "landmark_berlin_volkshalle_water_fjords", "landmark_berlin_volkshalle_water_shallow_sea", "landmark_big_ben_desert", "landmark_big_ben_forest", "landmark_big_ben_hills", "landmark_big_ben_jungle", "landmark_big_ben_lakes", "landmark_big_ben_marsh", "landmark_big_ben_mountain", "landmark_big_ben_ocean", "landmark_big_ben_plains", "landmark_big_ben_unknown", "landmark_big_ben_urban", "landmark_big_ben_water_deep_ocean", "landmark_big_ben_water_fjords", "landmark_big_ben_water_shallow_sea", "landmark_colosseum_desert", "landmark_colosseum_forest", "landmark_colosseum_hills", "landmark_colosseum_jungle", "landmark_colosseum_lakes", "landmark_colosseum_marsh", "landmark_colosseum_mountain", "landmark_colosseum_ocean", "landmark_colosseum_plains", "landmark_colosseum_unknown", "landmark_colosseum_urban", "landmark_colosseum_water_deep_ocean", "landmark_colosseum_water_fjords", "landmark_colosseum_water_shallow_sea", "landmark_cristo_redentor_desert", "landmark_cristo_redentor_forest", "landmark_cristo_redentor_hills", "landmark_cristo_redentor_jungle", "landmark_cristo_redentor_lakes", "landmark_cristo_redentor_marsh", "landmark_cristo_redentor_mountain", "landmark_cristo_redentor_ocean", "landmark_cristo_redentor_plains", "landmark_cristo_redentor_unknown", "landmark_cristo_redentor_urban", "landmark_cristo_redentor_water_deep_ocean", "landmark_cristo_redentor_water_fjords", "landmark_cristo_redentor_water_shallow_sea", "landmark_eiffel_tower_desert", "landmark_eiffel_tower_forest", "landmark_eiffel_tower_hills", "landmark_eiffel_tower_jungle", "landmark_eiffel_tower_lakes", "landmark_eiffel_tower_marsh", "landmark_eiffel_tower_mountain", "landmark_eiffel_tower_ocean", "landmark_eiffel_tower_plains", "landmark_eiffel_tower_unknown", "landmark_eiffel_tower_urban", "landmark_eiffel_tower_water_deep_ocean", "landmark_eiffel_tower_water_fjords", "landmark_eiffel_tower_water_shallow_sea", "landmark_hofburg_palace_desert", "landmark_hofburg_palace_forest", "landmark_hofburg_palace_hills", "landmark_hofburg_palace_jungle", "landmark_hofburg_palace_lakes", "landmark_hofburg_palace_marsh", "landmark_hofburg_palace_mountain", "landmark_hofburg_palace_ocean", "landmark_hofburg_palace_plains", "landmark_hofburg_palace_unknown", "landmark_hofburg_palace_urban", "landmark_hofburg_palace_water_deep_ocean", "landmark_hofburg_palace_water_fjords", "landmark_hofburg_palace_water_shallow_sea", "landmark_kremlin_desert", "landmark_kremlin_forest", "landmark_kremlin_hills", "landmark_kremlin_jungle", "landmark_kremlin_lakes", "landmark_kremlin_marsh", "landmark_kremlin_mountain", "landmark_kremlin_ocean", "landmark_kremlin_plains", "landmark_kremlin_unknown", "landmark_kremlin_urban", "landmark_kremlin_water_deep_ocean", "landmark_kremlin_water_fjords", "landmark_kremlin_water_shallow_sea", "landmark_statue_of_liberty_desert", "landmark_statue_of_liberty_forest", "landmark_statue_of_liberty_hills", "landmark_statue_of_liberty_jungle", "landmark_statue_of_liberty_lakes", "landmark_statue_of_liberty_marsh", "landmark_statue_of_liberty_mountain", "landmark_statue_of_liberty_ocean", "landmark_statue_of_liberty_plains", "landmark_statue_of_liberty_unknown", "landmark_statue_of_liberty_urban", "landmark_statue_of_liberty_water_deep_ocean", "landmark_statue_of_liberty_water_fjords", "landmark_statue_of_liberty_water_shallow_sea", "mega_gun_emplacement_desert", "mega_gun_emplacement_forest", "mega_gun_emplacement_hills", "mega_gun_emplacement_jungle", "mega_gun_emplacement_lakes", "mega_gun_emplacement_marsh", "mega_gun_emplacement_mountain", "mega_gun_emplacement_ocean", "mega_gun_emplacement_plains", "mega_gun_emplacement_unknown", "mega_gun_emplacement_urban", "mega_gun_emplacement_water_deep_ocean", "mega_gun_emplacement_water_fjords", "mega_gun_emplacement_water_shallow_sea", "naval_base_desert", "naval_base_forest", "naval_base_hills", "naval_base_jungle", "naval_base_lakes", "naval_base_marsh", "naval_base_mountain", "naval_base_ocean", "naval_base_plains", "naval_base_unknown", "naval_base_urban", "naval_base_water_deep_ocean", "naval_base_water_fjords", "naval_base_water_shallow_sea", "naval_facility_desert", "naval_facility_forest", "naval_facility_hills", "naval_facility_jungle", "naval_facility_lakes", "naval_facility_marsh", "naval_facility_mountain", "naval_facility_ocean", "naval_facility_plains", "naval_facility_unknown", "naval_facility_urban", "naval_facility_water_deep_ocean", "naval_facility_water_fjords", "naval_facility_water_shallow_sea", "nuclear_facility_desert", "nuclear_facility_forest", "nuclear_facility_hills", "nuclear_facility_jungle", "nuclear_facility_lakes", "nuclear_facility_marsh", "nuclear_facility_mountain", "nuclear_facility_ocean", "nuclear_facility_plains", "nuclear_facility_unknown", "nuclear_facility_urban", "nuclear_facility_water_deep_ocean", "nuclear_facility_water_fjords", "nuclear_facility_water_shallow_sea", "nuclear_reactor_desert", "nuclear_reactor_forest", "nuclear_reactor_heavy_water_desert", "nuclear_reactor_heavy_water_forest", "nuclear_reactor_heavy_water_hills", "nuclear_reactor_heavy_water_jungle", "nuclear_reactor_heavy_water_lakes", "nuclear_reactor_heavy_water_marsh", "nuclear_reactor_heavy_water_mountain", "nuclear_reactor_heavy_water_ocean", "nuclear_reactor_heavy_water_plains", "nuclear_reactor_heavy_water_unknown", "nuclear_reactor_heavy_water_urban", "nuclear_reactor_heavy_water_water_deep_ocean", "nuclear_reactor_heavy_water_water_fjords", "nuclear_reactor_heavy_water_water_shallow_sea", "nuclear_reactor_hills", "nuclear_reactor_jungle", "nuclear_reactor_lakes", "nuclear_reactor_marsh", "nuclear_reactor_mountain", "nuclear_reactor_ocean", "nuclear_reactor_plains", "nuclear_reactor_unknown", "nuclear_reactor_urban", "nuclear_reactor_water_deep_ocean", "nuclear_reactor_water_fjords", "nuclear_reactor_water_shallow_sea", "radar_station_desert", "radar_station_forest", "radar_station_hills", "radar_station_jungle", "radar_station_lakes", "radar_station_marsh", "radar_station_mountain", "radar_station_ocean", "radar_station_plains", "radar_station_unknown", "radar_station_urban", "radar_station_water_deep_ocean", "radar_station_water_fjords", "radar_station_water_shallow_sea", "rail_way_desert", "rail_way_forest", "rail_way_hills", "rail_way_jungle", "rail_way_lakes", "rail_way_marsh", "rail_way_mountain", "rail_way_ocean", "rail_way_plains", "rail_way_unknown", "rail_way_urban", "rail_way_water_deep_ocean", "rail_way_water_fjords", "rail_way_water_shallow_sea", "rocket_site_desert", "rocket_site_forest", "rocket_site_hills", "rocket_site_jungle", "rocket_site_lakes", "rocket_site_marsh", "rocket_site_mountain", "rocket_site_ocean", "rocket_site_plains", "rocket_site_unknown", "rocket_site_urban", "rocket_site_water_deep_ocean", "rocket_site_water_fjords", "rocket_site_water_shallow_sea", "stronghold_network_desert", "stronghold_network_forest", "stronghold_network_hills", "stronghold_network_jungle", "stronghold_network_lakes", "stronghold_network_marsh", "stronghold_network_mountain", "stronghold_network_ocean", "stronghold_network_plains", "stronghold_network_unknown", "stronghold_network_urban", "stronghold_network_water_deep_ocean", "stronghold_network_water_fjords", "stronghold_network_water_shallow_sea", "supply_node_desert", "supply_node_forest", "supply_node_hills", "supply_node_jungle", "supply_node_lakes", "supply_node_marsh", "supply_node_mountain", "supply_node_ocean", "supply_node_plains", "supply_node_unknown", "supply_node_urban", "supply_node_water_deep_ocean", "supply_node_water_fjords", "supply_node_water_shallow_sea", "synthetic_refinery_desert", "synthetic_refinery_forest", "synthetic_refinery_hills", "synthetic_refinery_jungle", "synthetic_refinery_lakes", "synthetic_refinery_marsh", "synthetic_refinery_mountain", "synthetic_refinery_ocean", "synthetic_refinery_plains", "synthetic_refinery_unknown", "synthetic_refinery_urban", "synthetic_refinery_water_deep_ocean", "synthetic_refinery_water_fjords", "synthetic_refinery_water_shallow_sea"] }, { - "groupname": "_outcome", - "desc": "Operation outcome modifier.", + "groupname": "experience_gain__combat_factor", + "desc": "Unit experience gain factor in combat.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["intelligence_agency"], - "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup_government", "operation_fake_intel", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini"] + "categories": ["naval", "country"], + "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "armored_engineer", "armored_maintenance", "armored_signal", "artillery", "artillery_brigade", "assault_engineer", "ballistic_missile", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "explosive_ammo", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "helicopter_brigade", "helicopter_field_hospital", "helicopter_recon", "helicopter_transport", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "land_cruiser", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "mothership", "motorized", "motorized_military_police", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "nuclear_missile", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "sam_missile", "scout_plane", "self_propelled_super_heavy_artillery", "signal_company", "strat_bomber", "strat_bomber_intercontinental", "sturmtruppe_battalion", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_artillery", "super_heavy_railway_gun", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] }, { - "groupname": "_risk", - "desc": "Operation risk modifier.", + "groupname": "_preferred_weight_factor", + "desc": "Naval preferred weight factor.", "type": "number", - "decimal_places": 0, + "decimal_places": 2, "IsDynamic": true, - "categories": ["intelligence_agency"], - "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup_government", "operation_fake_intel", "operation_infiltrate", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini", "target_sabotage"] + "categories": ["country"], + "modifiers": ["nullCombatTactic", "tactic_ambush", "tactic_assault", "tactic_attacker_hb_attack", "tactic_attacker_hb_rush", "tactic_attacker_hb_storm", "tactic_attacker_sb_hold", "tactic_attacker_sb_skillful_defence", "tactic_backhand_blow", "tactic_banzai_charge", "tactic_barrage", "tactic_basic_attack", "tactic_basic_defend", "tactic_blitz", "tactic_breakthrough", "tactic_cc_attack", "tactic_cc_defend", "tactic_cc_local_strong_point", "tactic_cc_storm", "tactic_cc_withdraw", "tactic_counterattack", "tactic_defender_hb_hold", "tactic_defender_hb_skillful_defence", "tactic_defender_sb_assault", "tactic_defender_sb_reckless_assault", "tactic_defender_sb_retake_bridge", "tactic_delay", "tactic_elastic_defense", "tactic_encirclement", "tactic_guerrilla_tactics", "tactic_hold_bridge", "tactic_human_wave_tactics", "tactic_infantry_charge", "tactic_masterful_blitz", "tactic_overwhelming_fire", "tactic_planned_attack", "tactic_relentless_assault", "tactic_seize_bridge", "tactic_shock", "tactic_tactical_withdrawal", "tactic_tw_attack", "tactic_tw_chase", "tactic_tw_defend", "tactic_tw_evade", "tactic_tw_intercept", "tactic_unexpected_thrust"] }, { "groupname": "production_speed__factor", "desc": "Country building construction speed factor.", @@ -8941,23 +9953,15 @@ "decimal_places": 2, "IsDynamic": true, "categories": ["country"], - "modifiers": ["air_base", "anti_air_building", "arms_factory", "bunker", "coastal_bunker", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "naval_base", "nuclear_reactor", "radar_station", "rail_way", "rocket_site", "supply_node", "synthetic_refinery"] + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dam_mountain", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { - "groupname": "state_resource_", - "desc": "State resource.", - "type": "number", - "decimal_places": 0, - "IsDynamic": true, - "categories": ["state"], - "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] - }, { - "groupname": "module__design_cost_factor", - "desc": "Module design cost factor.", + "groupname": "state_repair_speed__factor", + "desc": "State building repair speed factor.", "type": "number", "decimal_places": 2, "IsDynamic": true, - "categories": ["naval", "country", "army"], - "modifiers": ["NOR_rikstanken_turret", "NOR_tank_rikstanken_armor", "additional_machine_guns", "air_air_radar_1", "air_air_radar_2", "air_ground_radar_1", "air_ground_radar_2", "aircraft_cannon_1_1x", "aircraft_cannon_1_2x", "aircraft_cannon_2_1x", "aircraft_cannon_2_2x", "airdropped_mines", "amphibious_drive", "armor_piercing_bomb_locks", "armor_plate_large", "armor_plate_medium", "armor_plate_small", "armor_skirts", "auto_loader", "bomb_locks", "bomb_sights_1", "bomb_sights_2", "cannon_defense_turret", "cannon_defense_turret_2x", "carrier_ship_engine_1", "carrier_ship_engine_2", "carrier_ship_engine_3", "carrier_ship_engine_4", "cruiser_ship_engine_1", "cruiser_ship_engine_2", "cruiser_ship_engine_3", "cruiser_ship_engine_4", "demining_coil", "dive_brakes_small", "dozer_blade", "dp_light_battery_1", "dp_light_battery_2", "dp_light_battery_3", "dp_light_battery_4", "dp_ship_medium_1", "dp_ship_secondaries_1", "dp_ship_secondaries_2", "dp_ship_secondaries_3", "dp_ship_secondaries_4", "drop_tanks", "easy_maintenance", "engine_1_1x", "engine_1_2x", "engine_1_3x", "engine_1_4x", "engine_1_6x", "engine_2_1x", "engine_2_2x", "engine_2_3x", "engine_2_4x", "engine_2_6x", "engine_3_1x", "engine_3_2x", "engine_3_3x", "engine_3_4x", "engine_3_6x", "engine_4_1x", "engine_4_2x", "engine_4_3x", "engine_4_4x", "engine_4_6x", "expanded_fuel_tank", "extra_ammo_storage", "fixed_explosive_charge", "flamethrower", "floats", "flying_boat_large", "flying_boat_medium", "fuel_tanks_large", "fuel_tanks_medium", "fuel_tanks_small", "guided_anti_ship_missile", "heavy_bomb_locks", "heavy_mg_2x", "heavy_mg_4x", "heavy_ship_engine_1", "heavy_ship_engine_2", "heavy_ship_engine_3", "heavy_ship_engine_4", "hmg_defense_turret", "hmg_defense_turret_2x", "jet_engine_1x", "jet_engine_2x", "jet_engine_3x", "jet_engine_4x", "jet_engine_6x", "large_aircraft_cannon_1x", "large_aircraft_cannon_2x", "large_bomb_bay", "light_mg_2x", "light_mg_4x", "light_ship_engine_1", "light_ship_engine_2", "light_ship_engine_3", "light_ship_engine_4", "lmg_defense_turret", "lmg_defense_turret_2x", "medium_bomb_bay", "non_strategic_materials_large", "non_strategic_materials_medium", "non_strategic_materials_small", "radio_navigation_1", "radio_navigation_2", "recon_camera", "rocket_engine_1", "rocket_engine_2", "rocket_engine_3", "rocket_rails", "secondary_turret_hmg", "secondary_turret_small_cannon", "self_sealing_fuel_tanks_large", "self_sealing_fuel_tanks_medium", "self_sealing_fuel_tanks_small", "ship_airplane_launcher_1", "ship_airplane_launcher_2", "ship_anti_air_1", "ship_anti_air_2", "ship_anti_air_3", "ship_anti_air_4", "ship_armor_bb_1", "ship_armor_bb_2", "ship_armor_bb_3", "ship_armor_bc_1", "ship_armor_bc_2", "ship_armor_bc_3", "ship_armor_carrier_deck", "ship_armor_cruiser_1", "ship_armor_cruiser_2", "ship_armor_cruiser_3", "ship_armor_cruiser_4", "ship_armor_shbb", "ship_deck_space", "ship_depth_charge_1", "ship_depth_charge_2", "ship_depth_charge_3", "ship_depth_charge_4", "ship_extra_fuel_tank", "ship_fire_control_system_0", "ship_fire_control_system_1", "ship_fire_control_system_2", "ship_fire_control_system_3", "ship_heavy_battery_1", "ship_heavy_battery_2", "ship_heavy_battery_3", "ship_heavy_battery_4", "ship_light_battery_1", "ship_light_battery_2", "ship_light_battery_3", "ship_light_battery_4", "ship_light_medium_battery_1", "ship_light_medium_battery_2", "ship_light_medium_battery_3", "ship_light_medium_battery_4", "ship_medium_battery_1", "ship_medium_battery_2", "ship_medium_battery_3", "ship_medium_battery_4", "ship_mine_layer_1", "ship_mine_layer_sub", "ship_mine_sweeper_1", "ship_radar_1", "ship_radar_2", "ship_radar_3", "ship_radar_4", "ship_secondaries_1", "ship_secondaries_2", "ship_sonar_1", "ship_sonar_2", "ship_sub_snorkel_1", "ship_sub_snorkel_2", "ship_super_heavy_battery_1", "ship_torpedo_1", "ship_torpedo_2", "ship_torpedo_3", "ship_torpedo_4", "ship_torpedo_sub_1", "ship_torpedo_sub_2", "ship_torpedo_sub_3", "ship_torpedo_sub_4", "sloped_armor", "small_bomb_bay", "smoke_launchers", "squeezebore_adaptor", "stabilizer", "sub_ship_engine_1", "sub_ship_engine_2", "sub_ship_engine_3", "sub_ship_engine_4", "tank_anti_air_cannon", "tank_anti_air_cannon_2", "tank_anti_air_cannon_3", "tank_auto_cannon", "tank_auto_cannon_2", "tank_bogie_suspension", "tank_buster_1", "tank_buster_2", "tank_cast_armor", "tank_christie_suspension", "tank_close_support_gun", "tank_diesel_engine", "tank_gas_turbine_engine", "tank_gasoline_engine", "tank_half_track_suspension", "tank_heavy_cannon", "tank_heavy_cannon_2", "tank_heavy_cannon_3", "tank_heavy_fixed_superstructure_turret", "tank_heavy_howitzer", "tank_heavy_machine_gun", "tank_heavy_three_man_tank_turret", "tank_heavy_two_man_tank_turret", "tank_high_velocity_cannon", "tank_high_velocity_cannon_2", "tank_high_velocity_cannon_3", "tank_interleaved_suspension", "tank_light_fixed_superstructure_turret", "tank_light_one_man_tank_turret", "tank_light_three_man_tank_turret", "tank_light_two_man_tank_turret", "tank_medium_cannon", "tank_medium_cannon_2", "tank_medium_fixed_superstructure_turret", "tank_medium_howitzer", "tank_medium_howitzer_2", "tank_medium_one_man_tank_turret", "tank_medium_three_man_tank_turret", "tank_medium_two_man_tank_turret", "tank_modern_tank_turret", "tank_petrol_electric_engine", "tank_radio_1", "tank_radio_2", "tank_radio_3", "tank_riveted_armor", "tank_rocket_launcher", "tank_rocket_launcher_2", "tank_small_cannon", "tank_small_cannon_2", "tank_super_heavy_cannon", "tank_super_heavy_four_man_tank_turret", "tank_super_heavy_three_man_tank_turret", "tank_torsion_bar_suspension", "tank_welded_armor", "tank_wheeled_suspension", "torpedo_mounting", "torpedo_mounting_2", "torpedo_mounting_3", "wet_ammo_storage"] + "categories": ["state"], + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dam_mountain", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { "groupname": "repair_speed__factor", "desc": "Country building repair speed factor.", @@ -8965,95 +9969,95 @@ "decimal_places": 2, "IsDynamic": true, "categories": ["country"], - "modifiers": ["air_base", "anti_air_building", "arms_factory", "bunker", "coastal_bunker", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "naval_base", "nuclear_reactor", "radar_station", "rail_way", "rocket_site", "supply_node", "synthetic_refinery"] + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dam_mountain", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { - "groupname": "country_resource_cost_", - "desc": "Country resource cost.", + "groupname": "state_resource_cost_", + "desc": "State resource cost.", "type": "number", "decimal_places": 0, "IsDynamic": true, "categories": ["state"], "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] }, { - "groupname": "temporary_state_resource_", - "desc": "Temporary state resource.", + "groupname": "production_cost__factor", + "desc": "Building construction cost factor.", "type": "number", - "decimal_places": 0, + "decimal_places": 2, "IsDynamic": true, - "categories": ["state"], - "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] + "categories": ["country"], + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dam_mountain", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { - "groupname": "_design_cost_factor", - "desc": "Equipment cost factor.", + "groupname": "_cost_factor", + "desc": "Idea group cost factor.", "type": "number", "decimal_places": 0, "IsDynamic": true, "categories": ["country"], - "modifiers": ["amphibious_mechanized_equipment", "amphibious_tank_chassis", "anti_air_equipment", "anti_tank_equipment", "armored_car_equipment", "artillery_equipment", "convoy", "cv_small_plane_airframe", "cv_small_plane_cas_airframe", "cv_small_plane_cas_airframe_0", "cv_small_plane_cas_airframe_1", "cv_small_plane_cas_airframe_2", "cv_small_plane_cas_airframe_3", "cv_small_plane_cas_airframe_4", "cv_small_plane_naval_bomber_airframe", "cv_small_plane_naval_bomber_airframe_0", "cv_small_plane_naval_bomber_airframe_1", "cv_small_plane_naval_bomber_airframe_2", "cv_small_plane_naval_bomber_airframe_3", "cv_small_plane_naval_bomber_airframe_4", "cv_small_plane_suicide_airframe", "cv_small_plane_suicide_airframe_0", "cv_small_plane_suicide_airframe_1", "cv_small_plane_suicide_airframe_2", "cv_small_plane_suicide_airframe_3", "cv_small_plane_suicide_airframe_4", "floating_harbor_equipment", "guided_missile_equipment", "heavy_tank_aa_chassis", "heavy_tank_aa_chassis_0", "heavy_tank_aa_chassis_1", "heavy_tank_aa_chassis_2", "heavy_tank_aa_chassis_3", "heavy_tank_amphibious_chassis", "heavy_tank_amphibious_chassis_0", "heavy_tank_amphibious_chassis_1", "heavy_tank_amphibious_chassis_2", "heavy_tank_amphibious_chassis_3", "heavy_tank_artillery_chassis", "heavy_tank_artillery_chassis_0", "heavy_tank_artillery_chassis_1", "heavy_tank_artillery_chassis_2", "heavy_tank_artillery_chassis_3", "heavy_tank_chassis", "heavy_tank_destroyer_chassis", "heavy_tank_destroyer_chassis_0", "heavy_tank_destroyer_chassis_1", "heavy_tank_destroyer_chassis_2", "heavy_tank_destroyer_chassis_3", "heavy_tank_flame_chassis", "heavy_tank_flame_chassis_0", "heavy_tank_flame_chassis_1", "heavy_tank_flame_chassis_2", "heavy_tank_flame_chassis_3", "infantry_equipment", "jet_fighter_equipment", "jet_strat_bomber_equipment", "jet_tac_bomber_equipment", "large_plane_airframe", "large_plane_maritime_patrol_plane_airframe", "large_plane_maritime_patrol_plane_airframe_0", "large_plane_maritime_patrol_plane_airframe_1", "large_plane_maritime_patrol_plane_airframe_2", "large_plane_maritime_patrol_plane_airframe_3", "large_plane_maritime_patrol_plane_airframe_4", "light_tank_aa_chassis", "light_tank_aa_chassis_0", "light_tank_aa_chassis_1", "light_tank_aa_chassis_2", "light_tank_aa_chassis_3", "light_tank_amphibious_chassis", "light_tank_amphibious_chassis_0", "light_tank_amphibious_chassis_1", "light_tank_amphibious_chassis_2", "light_tank_amphibious_chassis_3", "light_tank_artillery_chassis", "light_tank_artillery_chassis_0", "light_tank_artillery_chassis_1", "light_tank_artillery_chassis_2", "light_tank_artillery_chassis_3", "light_tank_chassis", "light_tank_destroyer_chassis", "light_tank_destroyer_chassis_0", "light_tank_destroyer_chassis_1", "light_tank_destroyer_chassis_2", "light_tank_destroyer_chassis_3", "light_tank_flame_chassis", "light_tank_flame_chassis_0", "light_tank_flame_chassis_1", "light_tank_flame_chassis_2", "light_tank_flame_chassis_3", "mechanized_equipment", "medium_plane_airframe", "medium_plane_fighter_airframe", "medium_plane_fighter_airframe_0", "medium_plane_fighter_airframe_1", "medium_plane_fighter_airframe_2", "medium_plane_fighter_airframe_3", "medium_plane_fighter_airframe_4", "medium_plane_scout_plane_airframe", "medium_plane_scout_plane_airframe_0", "medium_plane_scout_plane_airframe_1", "medium_plane_scout_plane_airframe_2", "medium_plane_scout_plane_airframe_3", "medium_plane_scout_plane_airframe_4", "medium_tank_aa_chassis", "medium_tank_aa_chassis_0", "medium_tank_aa_chassis_1", "medium_tank_aa_chassis_2", "medium_tank_aa_chassis_3", "medium_tank_amphibious_chassis", "medium_tank_amphibious_chassis_0", "medium_tank_amphibious_chassis_1", "medium_tank_amphibious_chassis_2", "medium_tank_amphibious_chassis_3", "medium_tank_artillery_chassis", "medium_tank_artillery_chassis_0", "medium_tank_artillery_chassis_1", "medium_tank_artillery_chassis_2", "medium_tank_artillery_chassis_3", "medium_tank_chassis", "medium_tank_destroyer_chassis", "medium_tank_destroyer_chassis_0", "medium_tank_destroyer_chassis_1", "medium_tank_destroyer_chassis_2", "medium_tank_destroyer_chassis_3", "medium_tank_flame_chassis", "medium_tank_flame_chassis_0", "medium_tank_flame_chassis_1", "medium_tank_flame_chassis_2", "medium_tank_flame_chassis_3", "modern_tank_aa_chassis", "modern_tank_aa_chassis_1", "modern_tank_artillery_chassis", "modern_tank_artillery_chassis_1", "modern_tank_chassis", "modern_tank_destroyer_chassis", "modern_tank_destroyer_chassis_1", "motorized_equipment", "motorized_rocket_equipment", "railway_gun_equipment", "rocket_artillery_equipment", "rocket_interceptor_equipment", "ship_hull_carrier", "ship_hull_cruiser", "ship_hull_heavy", "ship_hull_light", "ship_hull_submarine", "small_plane_airframe", "small_plane_cas_airframe", "small_plane_cas_airframe_0", "small_plane_cas_airframe_1", "small_plane_cas_airframe_2", "small_plane_cas_airframe_3", "small_plane_cas_airframe_4", "small_plane_naval_bomber_airframe", "small_plane_naval_bomber_airframe_0", "small_plane_naval_bomber_airframe_1", "small_plane_naval_bomber_airframe_2", "small_plane_naval_bomber_airframe_3", "small_plane_naval_bomber_airframe_4", "small_plane_suicide_airframe", "small_plane_suicide_airframe_0", "small_plane_suicide_airframe_1", "small_plane_suicide_airframe_2", "small_plane_suicide_airframe_3", "small_plane_suicide_airframe_4", "super_heavy_tank_aa_chassis", "super_heavy_tank_aa_chassis_1", "super_heavy_tank_artillery_chassis", "super_heavy_tank_artillery_chassis_1", "super_heavy_tank_chassis", "super_heavy_tank_destroyer_chassis", "super_heavy_tank_destroyer_chassis_1", "support_equipment", "train_equipment", "transport_plane_equipment"] + "modifiers": ["academy_spirit", "air_chief", "air_force_academy_spirit", "air_force_command_spirit", "air_force_spirit", "aircraft_manufacturer", "army_chief", "army_spirit", "country", "division_command_spirit", "economy", "hidden_ideas", "high_command", "industrial_concern", "materiel_manufacturer", "mobilization_laws", "naval_academy_spirit", "naval_command_spirit", "naval_manufacturer", "navy_chief", "navy_spirit", "political_advisor", "tank_manufacturer", "theorist", "trade_laws"] }, { - "groupname": "production_cost_max_", - "desc": "Max naval equipment production cost.", + "groupname": "country_resource_", + "desc": "Country resource.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["naval"], - "modifiers": ["convoy", "floating_harbor_equipment", "ship_hull_carrier", "ship_hull_cruiser", "ship_hull_heavy", "ship_hull_light", "ship_hull_submarine"] + "categories": ["country"], + "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] }, { - "groupname": "state_resource_cost_", - "desc": "State resource cost.", + "groupname": "_design_cost_factor", + "desc": "Equipment cost factor.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["state"], - "modifiers": ["aluminium", "chromium", "oil", "rubber", "steel", "tungsten"] + "categories": ["country"], + "modifiers": ["amphibious_mechanized_equipment", "amphibious_tank_chassis", "anti_air_equipment", "anti_tank_equipment", "armored_car_equipment", "armored_support_vehicle", "artillery_equipment", "ballistic_missile_equipment", "convoy", "cv_small_plane_airframe", "cv_small_plane_cas_airframe", "cv_small_plane_cas_airframe_0", "cv_small_plane_cas_airframe_1", "cv_small_plane_cas_airframe_2", "cv_small_plane_cas_airframe_3", "cv_small_plane_cas_airframe_4", "cv_small_plane_naval_bomber_airframe", "cv_small_plane_naval_bomber_airframe_0", "cv_small_plane_naval_bomber_airframe_1", "cv_small_plane_naval_bomber_airframe_2", "cv_small_plane_naval_bomber_airframe_3", "cv_small_plane_naval_bomber_airframe_4", "cv_small_plane_suicide_airframe", "cv_small_plane_suicide_airframe_0", "cv_small_plane_suicide_airframe_1", "cv_small_plane_suicide_airframe_2", "cv_small_plane_suicide_airframe_3", "cv_small_plane_suicide_airframe_4", "explosive_ammo_equipment", "floating_harbor_equipment", "guided_missile_equipment", "heavy_tank_aa_chassis", "heavy_tank_aa_chassis_0", "heavy_tank_aa_chassis_1", "heavy_tank_aa_chassis_2", "heavy_tank_aa_chassis_3", "heavy_tank_amphibious_chassis", "heavy_tank_amphibious_chassis_0", "heavy_tank_amphibious_chassis_1", "heavy_tank_amphibious_chassis_2", "heavy_tank_amphibious_chassis_3", "heavy_tank_artillery_chassis", "heavy_tank_artillery_chassis_0", "heavy_tank_artillery_chassis_1", "heavy_tank_artillery_chassis_2", "heavy_tank_artillery_chassis_3", "heavy_tank_chassis", "heavy_tank_destroyer_chassis", "heavy_tank_destroyer_chassis_0", "heavy_tank_destroyer_chassis_1", "heavy_tank_destroyer_chassis_2", "heavy_tank_destroyer_chassis_3", "heavy_tank_flame_chassis", "heavy_tank_flame_chassis_0", "heavy_tank_flame_chassis_1", "heavy_tank_flame_chassis_2", "heavy_tank_flame_chassis_3", "helicopter_equipment", "infantry_equipment", "jet_fighter_equipment", "jet_strat_bomber_equipment", "jet_tac_bomber_equipment", "land_cruiser_chassis", "large_plane_airframe", "large_plane_maritime_patrol_plane_airframe", "large_plane_maritime_patrol_plane_airframe_0", "large_plane_maritime_patrol_plane_airframe_1", "large_plane_maritime_patrol_plane_airframe_2", "large_plane_maritime_patrol_plane_airframe_3", "large_plane_maritime_patrol_plane_airframe_4", "light_tank_aa_chassis", "light_tank_aa_chassis_0", "light_tank_aa_chassis_1", "light_tank_aa_chassis_2", "light_tank_aa_chassis_3", "light_tank_amphibious_chassis", "light_tank_amphibious_chassis_0", "light_tank_amphibious_chassis_1", "light_tank_amphibious_chassis_2", "light_tank_amphibious_chassis_3", "light_tank_artillery_chassis", "light_tank_artillery_chassis_0", "light_tank_artillery_chassis_1", "light_tank_artillery_chassis_2", "light_tank_artillery_chassis_3", "light_tank_chassis", "light_tank_destroyer_chassis", "light_tank_destroyer_chassis_0", "light_tank_destroyer_chassis_1", "light_tank_destroyer_chassis_2", "light_tank_destroyer_chassis_3", "light_tank_flame_chassis", "light_tank_flame_chassis_0", "light_tank_flame_chassis_1", "light_tank_flame_chassis_2", "light_tank_flame_chassis_3", "mechanized_equipment", "medium_plane_airframe", "medium_plane_fighter_airframe", "medium_plane_fighter_airframe_0", "medium_plane_fighter_airframe_1", "medium_plane_fighter_airframe_2", "medium_plane_fighter_airframe_3", "medium_plane_fighter_airframe_4", "medium_plane_scout_plane_airframe", "medium_plane_scout_plane_airframe_0", "medium_plane_scout_plane_airframe_1", "medium_plane_scout_plane_airframe_2", "medium_plane_scout_plane_airframe_3", "medium_plane_scout_plane_airframe_4", "medium_tank_aa_chassis", "medium_tank_aa_chassis_0", "medium_tank_aa_chassis_1", "medium_tank_aa_chassis_2", "medium_tank_aa_chassis_3", "medium_tank_amphibious_chassis", "medium_tank_amphibious_chassis_0", "medium_tank_amphibious_chassis_1", "medium_tank_amphibious_chassis_2", "medium_tank_amphibious_chassis_3", "medium_tank_artillery_chassis", "medium_tank_artillery_chassis_0", "medium_tank_artillery_chassis_1", "medium_tank_artillery_chassis_2", "medium_tank_artillery_chassis_3", "medium_tank_chassis", "medium_tank_destroyer_chassis", "medium_tank_destroyer_chassis_0", "medium_tank_destroyer_chassis_1", "medium_tank_destroyer_chassis_2", "medium_tank_destroyer_chassis_3", "medium_tank_flame_chassis", "medium_tank_flame_chassis_0", "medium_tank_flame_chassis_1", "medium_tank_flame_chassis_2", "medium_tank_flame_chassis_3", "modern_tank_aa_chassis", "modern_tank_aa_chassis_1", "modern_tank_artillery_chassis", "modern_tank_artillery_chassis_1", "modern_tank_chassis", "modern_tank_destroyer_chassis", "modern_tank_destroyer_chassis_1", "mothership_equipment", "motorbike_equipment", "motorized_equipment", "motorized_rocket_equipment", "nuclear_missile_equipment", "railway_gun_equipment", "rocket_artillery_equipment", "rocket_interceptor_equipment", "sam_missile_equipment", "self_propelled_super_heavy_artillery_equipment", "ship_hull_carrier", "ship_hull_cruiser", "ship_hull_heavy", "ship_hull_light", "ship_hull_submarine", "small_plane_airframe", "small_plane_cas_airframe", "small_plane_cas_airframe_0", "small_plane_cas_airframe_1", "small_plane_cas_airframe_2", "small_plane_cas_airframe_3", "small_plane_cas_airframe_4", "small_plane_cas_airframe_5", "small_plane_naval_bomber_airframe", "small_plane_naval_bomber_airframe_0", "small_plane_naval_bomber_airframe_1", "small_plane_naval_bomber_airframe_2", "small_plane_naval_bomber_airframe_3", "small_plane_naval_bomber_airframe_4", "small_plane_naval_bomber_airframe_5", "small_plane_suicide_airframe", "small_plane_suicide_airframe_0", "small_plane_suicide_airframe_1", "small_plane_suicide_airframe_2", "small_plane_suicide_airframe_3", "small_plane_suicide_airframe_4", "small_plane_suicide_airframe_5", "strat_bomber_intercontinental_equipment", "super_heavy_artillery_equipment", "super_heavy_railway_gun_equipment", "super_heavy_tank_aa_chassis", "super_heavy_tank_aa_chassis_1", "super_heavy_tank_artillery_chassis", "super_heavy_tank_artillery_chassis_1", "super_heavy_tank_chassis", "super_heavy_tank_destroyer_chassis", "super_heavy_tank_destroyer_chassis_1", "support_equipment", "train_equipment", "transport_plane_equipment"] }, { - "groupname": "production_cost__factor", - "desc": "Building construction cost factor.", + "groupname": "_cost", + "desc": "Operation cost modifier.", "type": "number", - "decimal_places": 2, + "decimal_places": 0, "IsDynamic": true, - "categories": ["country"], - "modifiers": ["air_base", "anti_air_building", "arms_factory", "bunker", "coastal_bunker", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "naval_base", "nuclear_reactor", "radar_station", "rail_way", "rocket_site", "supply_node", "synthetic_refinery"] + "categories": ["intelligence_agency"], + "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup", "operation_coup_government", "operation_fake_intel", "operation_infiltrate", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini", "target_sabotage"] }, { - "groupname": "unit__design_cost_factor", - "desc": "Unit design cost factor.", + "groupname": "module__design_cost_factor", + "desc": "Module design cost factor.", "type": "number", "decimal_places": 2, "IsDynamic": true, "categories": ["naval", "country", "army"], - "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "artillery", "artillery_brigade", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "motorized", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "scout_plane", "signal_company", "strat_bomber", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] + "modifiers": ["NOR_rikstanken_turret", "NOR_tank_rikstanken_armor", "additional_machine_guns", "advanced_flamethrower", "air_air_radar_1", "air_air_radar_2", "air_ground_radar_1", "air_ground_radar_2", "aircraft_cannon_1_1x", "aircraft_cannon_1_2x", "aircraft_cannon_2_1x", "aircraft_cannon_2_2x", "airdropped_mines", "amphibious_drive", "armor_piercing_bomb_locks", "armor_plate_large", "armor_plate_medium", "armor_plate_small", "armor_skirts", "auto_loader", "big_ship_deck_space", "bomb_locks", "bomb_sights_1", "bomb_sights_2", "cannon_defense_turret", "cannon_defense_turret_2x", "carrier_ship_engine_1", "carrier_ship_engine_2", "carrier_ship_engine_3", "carrier_ship_engine_4", "carrier_ship_nuclear_engine_1", "cruiser_ship_engine_1", "cruiser_ship_engine_2", "cruiser_ship_engine_3", "cruiser_ship_engine_4", "demining_coil", "dive_brakes_small", "dozer_blade", "dp_light_battery_1", "dp_light_battery_2", "dp_light_battery_3", "dp_light_battery_4", "dp_ship_medium_1", "dp_ship_secondaries_1", "dp_ship_secondaries_2", "dp_ship_secondaries_3", "dp_ship_secondaries_4", "drop_tanks", "earthshaker_bomb_release", "easy_maintenance", "engine_1_1x", "engine_1_2x", "engine_1_3x", "engine_1_4x", "engine_1_6x", "engine_2_1x", "engine_2_2x", "engine_2_3x", "engine_2_4x", "engine_2_6x", "engine_3_1x", "engine_3_2x", "engine_3_3x", "engine_3_4x", "engine_3_6x", "engine_4_1x", "engine_4_2x", "engine_4_3x", "engine_4_4x", "engine_4_6x", "expanded_fuel_tank", "extra_ammo_storage", "fixed_explosive_charge", "flamethrower", "floats", "flying_boat_large", "flying_boat_medium", "fuel_tanks_large", "fuel_tanks_medium", "fuel_tanks_small", "guided_anti_ship_missile", "heavy_bomb_locks", "heavy_mg_2x", "heavy_mg_4x", "heavy_ship_engine_1", "heavy_ship_engine_2", "heavy_ship_engine_3", "heavy_ship_engine_4", "heavy_ship_nuclear_engine_1", "hmg_defense_turret", "hmg_defense_turret_2x", "improved_rocket_propelled_bombs", "jet_engine_1x", "jet_engine_2x", "jet_engine_3x", "jet_engine_4x", "jet_engine_6x", "jet_engine_axial_1x", "jet_engine_axial_2x", "jet_engine_axial_3x", "jet_engine_axial_4x", "jet_engine_axial_6x", "large_aircraft_cannon_1x", "large_aircraft_cannon_2x", "large_bomb_bay", "lc_aircraft_catapult", "lc_armored_skirts", "lc_assault_gun", "lc_bunker_emplacement", "lc_command_center", "lc_flamethrower_turret", "lc_heavy_anti_air_battery", "lc_heavy_anti_air_platform", "lc_heavy_high_velocity_cannons", "lc_heavy_naval_guns", "lc_helipad", "lc_high_impact_obliterator_cannon", "lc_high_velocity_cannon_turret", "lc_hull_mounted_railway_gun", "lc_internal_ammunition_compartments", "lc_internal_fuel_tanks", "lc_light_anti_air_battery", "lc_medium_cannon_turret", "lc_medium_naval_guns", "lc_obstacle_clearance_gear", "lc_radar", "lc_radio_1", "lc_radio_2", "lc_radio_3", "lc_rocket_launcher", "lc_smoke_generators", "lc_stabilizers", "lc_super_heavy_howitzer", "lc_super_heavy_railway_gun", "lc_wet_ammunition_storage", "light_mg_2x", "light_mg_4x", "light_ship_engine_1", "light_ship_engine_2", "light_ship_engine_3", "light_ship_engine_4", "lmg_defense_turret", "lmg_defense_turret_2x", "medium_bomb_bay", "non_strategic_materials_large", "non_strategic_materials_medium", "non_strategic_materials_small", "radio_navigation_1", "radio_navigation_2", "recon_camera", "rocket_engine_1", "rocket_engine_2", "rocket_engine_3", "rocket_propelled_bombs", "rocket_rails", "secondary_turret_hmg", "secondary_turret_small_cannon", "self_sealing_fuel_tanks_large", "self_sealing_fuel_tanks_medium", "self_sealing_fuel_tanks_small", "ship_airplane_launcher_1", "ship_airplane_launcher_2", "ship_anechoic_tile", "ship_anti_air_1", "ship_anti_air_2", "ship_anti_air_3", "ship_anti_air_4", "ship_armor_bb_1", "ship_armor_bb_2", "ship_armor_bb_3", "ship_armor_bc_1", "ship_armor_bc_2", "ship_armor_bc_3", "ship_armor_carrier_deck", "ship_armor_cruiser_1", "ship_armor_cruiser_2", "ship_armor_cruiser_3", "ship_armor_cruiser_4", "ship_armor_ice_carrier_deck_1", "ship_armor_ice_carrier_deck_2", "ship_armor_ice_carrier_deck_3", "ship_armor_shbb", "ship_deck_space", "ship_depth_charge_1", "ship_depth_charge_2", "ship_depth_charge_3", "ship_depth_charge_4", "ship_engine_sub_aip_1", "ship_engine_sub_aip_2", "ship_engine_sub_aip_3", "ship_extra_fuel_tank", "ship_fire_control_system_0", "ship_fire_control_system_1", "ship_fire_control_system_2", "ship_fire_control_system_3", "ship_heavy_battery_1", "ship_heavy_battery_2", "ship_heavy_battery_3", "ship_heavy_battery_4", "ship_light_battery_1", "ship_light_battery_2", "ship_light_battery_3", "ship_light_battery_4", "ship_light_battery_sub", "ship_light_medium_battery_1", "ship_light_medium_battery_2", "ship_light_medium_battery_3", "ship_light_medium_battery_4", "ship_medium_battery_1", "ship_medium_battery_2", "ship_medium_battery_3", "ship_medium_battery_4", "ship_mine_layer_1", "ship_mine_layer_sub", "ship_mine_sweeper_1", "ship_radar_1", "ship_radar_2", "ship_radar_3", "ship_radar_4", "ship_secondaries_1", "ship_secondaries_2", "ship_sonar_1", "ship_sonar_2", "ship_sub_snorkel_1", "ship_sub_snorkel_2", "ship_super_heavy_battery_1", "ship_torpedo_1", "ship_torpedo_2", "ship_torpedo_3", "ship_torpedo_4", "ship_torpedo_sub_1", "ship_torpedo_sub_2", "ship_torpedo_sub_3", "ship_torpedo_sub_4", "ship_torpedo_sub_nuclear", "slbm_launcher", "sloped_armor", "small_bomb_bay", "smoke_launchers", "squeezebore_adaptor", "stabilizer", "sub_missile_launcher", "sub_ship_engine_1", "sub_ship_engine_2", "sub_ship_engine_3", "sub_ship_engine_4", "sub_ship_nuclear_engine_1", "tank_anti_air_cannon", "tank_anti_air_cannon_2", "tank_anti_air_cannon_3", "tank_auto_cannon", "tank_auto_cannon_2", "tank_bogie_suspension", "tank_buster_1", "tank_buster_2", "tank_cast_armor", "tank_christie_suspension", "tank_close_support_gun", "tank_diesel_engine", "tank_gas_turbine_engine", "tank_gasoline_engine", "tank_half_track_suspension", "tank_heavy_cannon", "tank_heavy_cannon_2", "tank_heavy_cannon_3", "tank_heavy_fixed_superstructure_turret", "tank_heavy_howitzer", "tank_heavy_machine_gun", "tank_heavy_three_man_tank_turret", "tank_heavy_two_man_tank_turret", "tank_high_velocity_cannon", "tank_high_velocity_cannon_2", "tank_high_velocity_cannon_3", "tank_interleaved_suspension", "tank_light_fixed_superstructure_turret", "tank_light_one_man_tank_turret", "tank_light_three_man_tank_turret", "tank_light_two_man_tank_turret", "tank_medium_cannon", "tank_medium_cannon_2", "tank_medium_fixed_superstructure_turret", "tank_medium_howitzer", "tank_medium_howitzer_2", "tank_medium_one_man_tank_turret", "tank_medium_three_man_tank_turret", "tank_medium_two_man_tank_turret", "tank_modern_tank_turret", "tank_petrol_electric_engine", "tank_radio_1", "tank_radio_2", "tank_radio_3", "tank_riveted_armor", "tank_rocket_launcher", "tank_rocket_launcher_2", "tank_small_cannon", "tank_small_cannon_2", "tank_super_heavy_cannon", "tank_super_heavy_four_man_tank_turret", "tank_super_heavy_three_man_tank_turret", "tank_torsion_bar_suspension", "tank_welded_armor", "tank_wheeled_suspension", "torpedo_mounting", "torpedo_mounting_2", "torpedo_mounting_3", "wet_ammo_storage"] }, { - "groupname": "_cost", - "desc": "Operation cost modifier.", + "groupname": "_risk", + "desc": "Operation risk modifier.", "type": "number", "decimal_places": 0, "IsDynamic": true, "categories": ["intelligence_agency"], - "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup", "operation_coup_government", "operation_fake_intel", "operation_infiltrate", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini", "target_sabotage"] + "modifiers": ["FRA_coup_in_central_africa", "FRA_coup_in_indochina", "FRA_coup_in_madagascar", "FRA_coup_in_north_africa", "FRA_coup_in_syria", "FRA_coup_in_west_africa", "FRA_instigate_workers_revolution_britain", "FRA_instigate_workers_revolution_germany", "FRA_instigate_workers_revolution_italy", "FRA_instigate_workers_revolution_spain", "bruneval_raid", "capture_tito", "heavy_water_raid", "murder_trotsky", "nuclear_espionage", "operation", "operation_boost_resistance", "operation_capture_cipher", "operation_collaboration_government", "operation_coordinated_strike", "operation_coup_government", "operation_fake_intel", "operation_infiltrate", "operation_infiltrate_armed_forces_airforce", "operation_infiltrate_armed_forces_army", "operation_infiltrate_armed_forces_navy", "operation_infiltrate_civilian", "operation_make_resistance_contacts", "operation_rescue_operative", "operation_steal_tech", "operation_steal_tech_airforce", "operation_steal_tech_army", "operation_steal_tech_civilian", "operation_steal_tech_navy", "operation_targeted_sabotage_industry", "operation_targeted_sabotage_infrastructure", "operation_targeted_sabotage_resources", "operation_warsaw_uprising", "raid_trotskys_villa", "rescue_mussolini", "target_sabotage"] }, { - "groupname": "_drift", - "desc": "Ideology drift.", + "groupname": "state__max_level_terrain_limit", + "desc": "Maximum allowed building level for terrain.", "type": "number", - "decimal_places": 2, + "decimal_places": 0, "IsDynamic": true, - "categories": ["politics"], - "modifiers": ["communism", "democratic", "fascism", "neutrality"] + "categories": ["state"], + "modifiers": ["air_base", "air_facility", "anti_air_building", "arms_factory", "bunker", "canal_kiel", "canal_panama", "coastal_bunker", "commercial_nuclear_reactor", "dam", "dockyard", "fuel_silo", "industrial_complex", "infrastructure", "land_facility", "landmark_berlin_reichstag", "landmark_berlin_volkshalle", "landmark_big_ben", "landmark_colosseum", "landmark_cristo_redentor", "landmark_eiffel_tower", "landmark_hofburg_palace", "landmark_kremlin", "landmark_statue_of_liberty", "mega_gun_emplacement", "naval_base", "naval_facility", "nuclear_facility", "nuclear_reactor", "nuclear_reactor_heavy_water", "radar_station", "rail_way", "rocket_site", "stronghold_network", "supply_node", "synthetic_refinery"] }, { - "groupname": "_preferred_weight_factor", - "desc": "Naval preferred weight factor.", + "groupname": "_category_type_cost_factor", + "desc": "Idea category type cost factor.", "type": "number", - "decimal_places": 2, + "decimal_places": 0, "IsDynamic": true, "categories": ["country"], - "modifiers": ["nullCombatTactic", "tactic_ambush", "tactic_assault", "tactic_attacker_hb_attack", "tactic_attacker_hb_rush", "tactic_attacker_hb_storm", "tactic_attacker_sb_hold", "tactic_attacker_sb_skillful_defence", "tactic_backhand_blow", "tactic_banzai_charge", "tactic_barrage", "tactic_basic_attack", "tactic_basic_defend", "tactic_blitz", "tactic_breakthrough", "tactic_cc_attack", "tactic_cc_defend", "tactic_cc_local_strong_point", "tactic_cc_storm", "tactic_cc_withdraw", "tactic_counterattack", "tactic_defender_hb_hold", "tactic_defender_hb_skillful_defence", "tactic_defender_sb_assault", "tactic_defender_sb_reckless_assault", "tactic_defender_sb_retake_bridge", "tactic_delay", "tactic_elastic_defense", "tactic_encirclement", "tactic_guerrilla_tactics", "tactic_hold_bridge", "tactic_human_wave_tactics", "tactic_infantry_charge", "tactic_masterful_blitz", "tactic_overwhelming_fire", "tactic_planned_attack", "tactic_relentless_assault", "tactic_seize_bridge", "tactic_shock", "tactic_tactical_withdrawal", "tactic_tw_attack", "tactic_tw_chase", "tactic_tw_defend", "tactic_tw_evade", "tactic_tw_intercept", "tactic_unexpected_thrust"] + "modifiers": ["air_spirit", "army_spirit", "navy_spirit"] }, { - "groupname": "_cost_factor", - "desc": "Technology cost factor.", + "groupname": "experience_gain__training_factor", + "desc": "Unit experience gain factor on training.", "type": "number", "decimal_places": 0, "IsDynamic": true, - "categories": ["country"], - "modifiers": ["cat_air_bombs", "cat_air_engine", "cat_air_guns", "cat_anti_air", "cat_anti_tank", "cat_armored_cars", "cat_base_strike", "cat_battlefield_support", "cat_fleet_in_being", "cat_grand_battle_plan", "cat_heavy_armor", "cat_heavy_fighter", "cat_light_armor", "cat_marines_doctrine", "cat_maritime_patrol", "cat_mass_assault", "cat_mechanized_equipment", "cat_medium_armor", "cat_mobile_warfare", "cat_mountaineers_doctrine", "cat_operational_integrity", "cat_paratroopers_doctrine", "cat_production", "cat_scout_plane", "cat_ship_heavy_battery", "cat_ship_light_battery", "cat_ship_medium_battery", "cat_special_forces_generic", "cat_strategic_bomber", "cat_strategic_destruction", "cat_superior_firepower", "cat_synth_oil", "cat_synth_rubber", "cat_torpedoes", "cat_trade_interdiction"] + "categories": ["naval", "country"], + "modifiers": ["airborne_light_armor", "amphibious_armor", "amphibious_heavy_armor", "amphibious_light_armor", "amphibious_mechanized", "amphibious_medium_armor", "anti_air", "anti_air_brigade", "anti_tank", "anti_tank_brigade", "armored_car", "armored_car_recon", "armored_engineer", "armored_maintenance", "armored_signal", "artillery", "artillery_brigade", "assault_engineer", "ballistic_missile", "battle_cruiser", "battleship", "bicycle_battalion", "blackshirt_assault_battalion", "bus", "camelry", "carrier", "cas", "cavalry", "cv_cas", "cv_fighter", "cv_nav_bomber", "cv_suicide_craft", "destroyer", "engineer", "explosive_ammo", "fake_intel_unit", "field_hospital", "fighter", "guided_missile", "heavy_armor", "heavy_cruiser", "heavy_fighter", "heavy_flame_tank", "heavy_sp_anti_air_brigade", "heavy_sp_artillery_brigade", "heavy_tank_destroyer_brigade", "helicopter_brigade", "helicopter_field_hospital", "helicopter_recon", "helicopter_transport", "infantry", "irregular_infantry", "jet_fighter", "jet_strat_bomber", "jet_tac_bomber", "jungle_pioneers_support", "land_cruiser", "light_armor", "light_cruiser", "light_flame_tank", "light_sp_anti_air_brigade", "light_sp_artillery_brigade", "light_tank_destroyer_brigade", "light_tank_recon", "logistics_company", "long_range_patrol_support", "maintenance_company", "marine", "marine_commando", "maritime_patrol_plane", "mechanized", "medium_armor", "medium_flame_tank", "medium_sp_anti_air_brigade", "medium_sp_artillery_brigade", "medium_tank_destroyer_brigade", "military_police", "militia", "modern_armor", "modern_sp_anti_air_brigade", "modern_sp_artillery_brigade", "modern_tank_destroyer_brigade", "mot_anti_air_brigade", "mot_anti_tank_brigade", "mot_artillery_brigade", "mot_recon", "mot_rocket_artillery_brigade", "mothership", "motorized", "motorized_military_police", "motorized_rocket_brigade", "mountaineers", "nav_bomber", "nuclear_missile", "paratrooper", "penal_battalion", "pioneer_support", "railway_gun", "rangers_support", "recon", "rocket_artillery", "rocket_artillery_brigade", "rocket_interceptor", "sam_missile", "scout_plane", "self_propelled_super_heavy_artillery", "signal_company", "strat_bomber", "strat_bomber_intercontinental", "sturmtruppe_battalion", "submarine", "suicide_craft", "super_heavy_armor", "super_heavy_artillery", "super_heavy_railway_gun", "super_heavy_sp_anti_air_brigade", "super_heavy_sp_artillery_brigade", "super_heavy_tank_destroyer_brigade", "tac_bomber", "transport_plane", "winter_logistics_support"] }], "dynamic_variables": { "global": { @@ -9509,6 +10513,22 @@ "high_command": { "description": "returns an array with the currently hired high command of the country" }, + "total_equipment_produced_capital_ship": { + "description": "Total produced equipment of typecapital_ship" + }, + "num_of_civilian_factories_in_cores": { + "description": "calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_civilian_factories_in_cores@GER" + }, + "surrender_progress": { + "description": "check if a country is close to surrendering", + "is_trigger": true + }, + "num_of_military_factories_in_cores": { + "description": "calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_military_factories_in_cores@GER" + }, + "num_of_naval_factories_in_cores": { + "description": "calculates the number of civilian factories on core states of current country scope, on those states that are under control of @Tag example num_of_naval_factories_in_cores@my_var" + }, "ai_strategy_declare_war": { "description": "ai strategy value declare_war against country. Example: GER.ai_strategy_declare_war@ENG" }, @@ -9555,9 +10575,8 @@ "description": "check amount of available civilian factories", "is_trigger": true }, - "surrender_progress": { - "description": "check if a country is close to surrendering", - "is_trigger": true + "total_equipment_produced_sam_missile": { + "description": "Total produced equipment of typesam_missile" }, "political_power_daily": { "description": "Checks if daily political power increase is more or less that specified value \n political_power_daily > 1.5", @@ -9621,6 +10640,9 @@ "description": "Compares the number of members in the faction for the current country. \n Example: num_faction_members > 10", "is_trigger": true }, + "total_constructed_gun_emplacement": { + "description": "Total constructions of gun_emplacement" + }, "enemies_strength_ratio": { "description": "Compares the estimated army strength between the scope country and all its enemies", "is_trigger": true @@ -9742,6 +10764,14 @@ "description": "checks network national coverage you have over a country. Example: \nnetwork_national_coverage = { \n target = GER\n value > 0.5\n} \n", "is_trigger": true }, + "num_nukes_being_dropped": { + "description": "total number of nukes that are currently ready to be dropped", + "is_trigger": true + }, + "num_nukes_left_to_drop": { + "description": "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)", + "is_trigger": true + }, "ai_strategy_befriend": { "description": "ai strategy value befriend against country. Example: GER.ai_strategy_befriend@ENG" }, @@ -9763,6 +10793,9 @@ "ai_strategy_influence": { "description": "ai strategy value influence against country. Example: GER.ai_strategy_influence@ENG" }, + "total_equipment_produced_ballistic_missile": { + "description": "Total produced equipment of typeballistic_missile" + }, "ai_strategy_ignore": { "description": "ai strategy value ignore against country. Example: GER.ai_strategy_ignore@ENG" }, @@ -9856,12 +10889,12 @@ "total_equipment_produced_armor": { "description": "Total produced equipment of typearmor" }, + "total_equipment_produced_land_cruiser": { + "description": "Total produced equipment of typeland_cruiser" + }, "total_equipment_produced_motorized": { "description": "Total produced equipment of typemotorized" }, - "total_equipment_produced_capital_ship": { - "description": "Total produced equipment of typecapital_ship" - }, "total_equipment_produced_heavy_fighter": { "description": "Total produced equipment of typeheavy_fighter" }, @@ -9877,6 +10910,12 @@ "total_equipment_produced_missile": { "description": "Total produced equipment of typemissile" }, + "total_equipment_produced_emplacement_gun_ammo": { + "description": "Total produced equipment of typeemplacement_gun_ammo" + }, + "total_equipment_produced_nuclear_missile": { + "description": "Total produced equipment of typenuclear_missile" + }, "total_equipment_produced_scout_plane": { "description": "Total produced equipment of typescout_plane" }, @@ -9886,6 +10925,9 @@ "total_equipment_produced_air_transport": { "description": "Total produced equipment of typeair_transport" }, + "total_equipment_produced_missile_launcher": { + "description": "Total produced equipment of typemissile_launcher" + }, "total_equipment_produced_": { "description": "Total produced equipment of type" }, @@ -10207,6 +11249,17 @@ "number_of_unused_trait_points": { "description": "Number of unused trait points of the military industrial organization" } + }, + "special_project": { + "facility_state": { + "description": "State that the project is researched in" + }, + "facility_province_id": { + "description": "The province that the project is researched in" + }, + "scientist": { + "description": "The scientist that researches the project" + } } }, "console_commands": { @@ -10233,6 +11286,10 @@ "available_in_release_build": false, "description": "Show whether you are currently logged into POPS or not." }, + "test": { + "available_in_release_build": false, + "description": "This is a placeholder command. Use it for your debug code if you need to quickly test something locally. Or copy and paste it to create a new console command." + }, "add_mines": { "arguments": [""], "aliases": ["mines"], @@ -10294,7 +11351,6 @@ }, "testtool": { "available_in_release_build": false, - "aliases": ["test"], "description": "Testing tool." }, "analyzetheatres": { @@ -10411,17 +11467,22 @@ "arguments": ["Operation ID", "Target Tag"], "description": "Allows to execute all operations." }, - "debug_nuking": { - "description": "Allows to nuke every province without checking any conditions." - }, - "instantevents": { - "description": "Ignores event mth s" - }, "nukes": { "arguments": [""], "aliases": ["nuke"], "description": "add nukes" }, + "launch_nuke": { + "arguments": ["[Nuke Type]", "", "..."], + "aliases": ["ln"], + "description": "Launch nuke to any specified province(s) without checking any conditions." + }, + "armageddon": { + "description": "Deliver a thermonuclear strike to every state in the game." + }, + "instantevents": { + "description": "Ignores event mth s" + }, "rebuildlayers": { "description": "Reload mapmodes." }, @@ -11459,6 +12520,24 @@ "available_in_release_build": false, "description": "List regions center point that is located within another region" }, + "endraids": { + "available_in_release_build": false, + "arguments": [" "], + "description": "Instantly end all active raids, optionally with a specific success level" + }, + "prepareraids": { + "available_in_release_build": false, + "arguments": [" <[Optional] the degree to which the raid should be prepared (0.0-1.0)>"], + "description": "Instantly complete preparation of all active raids, optionally to a specific progress level" + }, + "restart": { + "available_in_release_build": false, + "description": "Restart the game as the current country" + }, + "freefocuses": { + "aliases": ["ff"], + "description": "Enable freely activating any focuses" + }, "InternationalMarket.RequestPurchase": { "arguments": ["", "", "", "", ""], "description": "Request Equipment Purchase." @@ -11514,6 +12593,60 @@ "description": "\"Add sizes to one or all Military Industrial Organisations.\nex:\nAddSize org_token 2\nAddSize org_token // adds 1 size\nAddSize 2 // adds input size to all the player's MIOs\nAddSize // adds 1 size to all the player's MIOs\"", "argument_completion_support": true }, + "sp_fast": { + "description": "\"All phases in Special Projects take now 1 day to complete.\nFor prototype phase, it's the iterations that will take 1 day. And it will require as many iterations as usual.\nex:\nsp_fast\"" + }, + "sp_instant": { + "description": "\"All started Special Projects finish on the daily tick. It skips the iterations of the Prototyping phase and their reward.\nex:\nsp_instant\"" + }, + "sp_available": { + "description": "\"Trigger available returns true for all Special Projects.\nex:\nsp_available\"" + }, + "sp_unlock_all": { + "description": "\"All Special Projects are always visible and available. Whether or not the triggers returns true, and whether the parents are completed.\nex:\nsp_unlock_all\"" + }, + "sp_add_scientist": { + "arguments": [" (optional)", " (optional)"], + "description": "\"Add a scientist. Is specified a specialization and level that will be applied to the scientist. If no specialization is specified the level will be applied to all.\nex:\nsp_add_scientist 3 nuclear\nsp_add_scientist 2\nsp_add_scientist\"" + }, + "sp_add_mastermind": { + "description": "\"Add a scientist with max skill in all specializations\"" + }, + "sp_add_selected_scientist_level": { + "arguments": ["", " (optional)"], + "description": "\"Add level and if specified, specifically to a specialization for a scientist. If no specialization is specified, the level will be added for each specialization. Requires the facility view with an attached scientist to be open.\nex:\nsp_add_scientist_level 3 nuclear\nsp_add_scientist_level 2\"" + }, + "sp_set_selected_scientist_level": { + "arguments": ["", " (optional)"], + "description": "\"Set level and if specified, specifically to a specialization for a scientist. If no specialization is specified, the level will be added for each specialization. Requires the facility view with an attached scientist to be open.\nex:\nsp_set_scientist_level 3 nuclear\nsp_set_scientist_level 2\"" + }, + "sp_add_selected_scientist_trait": { + "arguments": [""], + "description": "\"Add a trait to the scientist. Requires the facility view with an attached scientist to be open.\nex:\nsp_add_scientist_trait my_trait_token\"" + }, + "sp_remove_selected_scientist_trait": { + "description": "\"Remove a trait from the scientist. Requires the facility view with an attached scientist to be open.\nex:\nsp_remove_selected_scientist_trait my_trait_token\"" + }, + "sp_research_all": { + "aliases": ["sp_ra"], + "description": "\"Research all special projects. If no scientist exist it will create one, otherwise it will pick an arbitrary one. Imagine there is a secret hidden facility\nin a controlled province where the projects are researched.\"" + }, + "sp_breakthrough": { + "arguments": [" optional "], + "aliases": ["sp_br"], + "description": "\"Create breakthrough points.\"" + }, + "toggle_hidden_techs": { + "arguments": [], + "aliases": ["tht"], + "description": "\"Toggle show/hide all hidden techs.\"" + }, + "sp_prototype_reward": { + "arguments": [], + "aliases": ["spr"], + "description": "\"Trigger a specified prototype reward during a project.\"", + "argument_completion_support": true + }, "social_debuginfo": { "available_in_release_build": false, "description": "Print debug info about the social layer" diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt index 6ab43bc9..49b62707 100644 --- a/Config/triggers_gtd.cwt +++ b/Config/triggers_gtd.cwt @@ -251,4 +251,4 @@ 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 \ No newline at end of file +alias[trigger:num_nukes_left_to_drop] = int diff --git a/tests/test_check_missing_variables.py b/tests/test_check_missing_variables.py index 5ce5edb8..b5a10238 100644 --- a/tests/test_check_missing_variables.py +++ b/tests/test_check_missing_variables.py @@ -58,6 +58,8 @@ def check_missing_variables(): print(f'- [] - {i}') raise Exception("There are variables in documentation file that are not present in .cwt files") + print("No missing variables found. Good job!") + if __name__ == '__main__': check_missing_variables() From 47a7a03af1d39ec5294832934e78e79fb737ed73 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 00:59:06 +0400 Subject: [PATCH 19/73] Revert `sound = {}` changes (500+ false positives in KR) --- Config/sound.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/sound.cwt b/Config/sound.cwt index 0fac3239..33e1a1c1 100644 --- a/Config/sound.cwt +++ b/Config/sound.cwt @@ -15,7 +15,7 @@ types = { sound = { name = scalar - file = filepath[sound/] + file = scalar ## cardinality = 0..1 always_load = bool ## cardinality = 0..1 From b6f2bc6f2017417f18b9cec4e77da75c3da34eec Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 01:10:58 +0400 Subject: [PATCH 20/73] Add equipment groups support to ideas (it was here before, what happened?) --- Config/common/ideas.cwt | 24 ++++++++++++++++++++++++ Config/common/special_projects.cwt | 8 ++++++++ 2 files changed, 32 insertions(+) diff --git a/Config/common/ideas.cwt b/Config/common/ideas.cwt index fa5d975c..0113bdb6 100644 --- a/Config/common/ideas.cwt +++ b/Config/common/ideas.cwt @@ -83,6 +83,14 @@ idea = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } } ## cardinality = 0..1 traits = { @@ -197,6 +205,14 @@ idea = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } } ## cardinality = 0..1 ai_will_do = { @@ -319,6 +335,14 @@ idea = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } } ## cardinality = 0..1 ai_will_do = { diff --git a/Config/common/special_projects.cwt b/Config/common/special_projects.cwt index 2cc5f92d..20182e31 100644 --- a/Config/common/special_projects.cwt +++ b/Config/common/special_projects.cwt @@ -568,6 +568,14 @@ single_alias[sp_iteration_output] = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } } } From a08aacd777800046a1b41b96a79dc505d8293eb0 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 01:29:54 +0400 Subject: [PATCH 21/73] Updates to `special_projects` file --- Config/common/special_projects.cwt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Config/common/special_projects.cwt b/Config/common/special_projects.cwt index 20182e31..d0a77324 100644 --- a/Config/common/special_projects.cwt +++ b/Config/common/special_projects.cwt @@ -49,6 +49,13 @@ special_project = { ## cardinality = 0..inf has_dlc = enum[dlc] } + ### KR DLC triggers + ## cardinality = 0..inf + has_dlc_got = yes + ## cardinality = 0..inf + has_dlc_mtg = yes + ## cardinality = 0..inf + has_dlc_nsb = yes } # Optional @@ -329,8 +336,10 @@ single_alias[sp_proto_reward] = { # Dynamic token for the reward (i.e. identifie ## cardinality = 0..1 ## replace_scope = { root = project this = project from = country } weight = { - ## cardinality = ~1..1 + ## cardinality = 0..1 base = float + ## cardinality = 0..1 + factor = float ## cardinality = 0..inf modifier = { ## cardinality = 0..1 From 4a0b6029014675e190928f2c8311cc8f857e3dc0 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:44:58 +0100 Subject: [PATCH 22/73] added sound category validation --- Config/sound.cwt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Config/sound.cwt b/Config/sound.cwt index 33e1a1c1..dcce718e 100644 --- a/Config/sound.cwt +++ b/Config/sound.cwt @@ -1,4 +1,10 @@ types = { + ## type_key_filter = category + type[soundcategory] = { + path = "sound" + name_field = "name" + path_extension = .asset + } ## type_key_filter = soundeffect type[soundeffect] = { path = "sound" @@ -76,4 +82,29 @@ soundeffect = { } ## cardinality = 0..1 prevent_random_repetition = bool +} + +soundcategory = { + name = scalar + soundeffects = { + ## cardinality = ~1..inf + scalar + } + ## cardinality = 0..1 + compressor = { + ## cardinality = 0..1 + enabled = bool + ## cardinality = 0..1 + pregain = float + ## cardinality = 0..1 + postgain = float + ## cardinality = 0..1 + ratio = float + ## cardinality = 0..1 + threshold = float + ## cardinality = 0..1 + attacktime = float + ## cardinality = 0..1 + releasetime = float + } } \ No newline at end of file From 62301371e3a6e9db9f189f74f55c57550fb2509f Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:46:47 +0100 Subject: [PATCH 23/73] can have as many sounds in soundeffect as desired (haven't checked if there is a limit --- Config/sound.cwt | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/sound.cwt b/Config/sound.cwt index dcce718e..36aef572 100644 --- a/Config/sound.cwt +++ b/Config/sound.cwt @@ -32,6 +32,7 @@ soundeffect = { name = scalar ## cardinality = 0..1 falloff = scalar #falloff type + ## cardinality = 0..inf sounds = { ## cardinality = 0..inf sound = scalar # does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files From c8a90b6dc4b3ef1a5217a62523c468f885fd44fc Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:50:52 +0100 Subject: [PATCH 24/73] can also take a compressor in compressor.asset --- Config/sound.cwt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config/sound.cwt b/Config/sound.cwt index 36aef572..bb81976c 100644 --- a/Config/sound.cwt +++ b/Config/sound.cwt @@ -108,4 +108,6 @@ soundcategory = { ## cardinality = 0..1 releasetime = float } + ## cardinality = 0..1 + compressor = scalar } \ No newline at end of file From 32c9ab057f162dae7d8241903e3f056f66746b30 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Fri, 15 Nov 2024 00:15:12 +0100 Subject: [PATCH 25/73] raid uses different intel type name --- Config/common/raids.cwt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Config/common/raids.cwt b/Config/common/raids.cwt index d1e97b8e..79668368 100644 --- a/Config/common/raids.cwt +++ b/Config/common/raids.cwt @@ -24,7 +24,7 @@ raid_category = { alias_name[trigger] = alias_match_left[trigger] } ## cardinality = 1..1 - intel_source = enum[intel_types] + intel_source = enum[intel_types_raid] # default is no ## cardinality = 0..1 free_targeting = bool @@ -383,6 +383,12 @@ single_alias[raid_factors] = { } enums = { + enum[intel_types_raid] = { + air + naval + army + civilian + } enum[raid_unit_model] = { equipment transport From c6b7968e4ee38db52bdeaa1b561b74e354c60648 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 13:29:14 +0400 Subject: [PATCH 26/73] Update `force_concentration` strategies --- Config/common/ai_strategy.cwt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config/common/ai_strategy.cwt b/Config/common/ai_strategy.cwt index fac887f4..866edc28 100644 --- a/Config/common/ai_strategy.cwt +++ b/Config/common/ai_strategy.cwt @@ -386,6 +386,7 @@ alias[ai_strategy_rule:ai_strategy] = { ## cardinality = 0..inf strategic_region = ### Target a specific ai area. Can specify multiple. + ## cardinality = 0..inf area = ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. ## replace_scope = { this = country root = country from = country } @@ -418,6 +419,7 @@ alias[ai_strategy_rule:ai_strategy] = { ## cardinality = 0..inf strategic_region = ### Target a specific ai area. Can specify multiple. + ## cardinality = 0..inf area = ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. ## replace_scope = { this = country root = country from = country } From 336c73cae8099f1aca4c326a71da64e41d652c5d Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 13:35:50 +0400 Subject: [PATCH 27/73] More updates to new strategies --- Config/common/ai_strategy.cwt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config/common/ai_strategy.cwt b/Config/common/ai_strategy.cwt index 866edc28..e9c31598 100644 --- a/Config/common/ai_strategy.cwt +++ b/Config/common/ai_strategy.cwt @@ -389,6 +389,7 @@ alias[ai_strategy_rule:ai_strategy] = { ## cardinality = 0..inf area = ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. + ## cardinality = 0..1 ## replace_scope = { this = country root = country from = country } country_trigger = { ## cardinality = ~1..inf @@ -422,6 +423,7 @@ alias[ai_strategy_rule:ai_strategy] = { ## cardinality = 0..inf area = ### Trigger to check against a specific country. Scope is enemy country, FROM scope is our country. + ## cardinality = 0..1 ## replace_scope = { this = country root = country from = country } country_trigger = { ## cardinality = ~1..inf From 044b966576b4898ae5faf4b62d7997476b435cde Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 13:57:28 +0400 Subject: [PATCH 28/73] Add shortcut support for focus trees --- Config/common/national_focus.cwt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Config/common/national_focus.cwt b/Config/common/national_focus.cwt index 27b11ca8..ef8b9ac4 100644 --- a/Config/common/national_focus.cwt +++ b/Config/common/national_focus.cwt @@ -84,6 +84,17 @@ focus_tree = { y = int } + ## cardinality = 0..1 + shortcut = { + name = localisation + target = + scroll_wheel_factor = float + ## cardinality = 0..1 + trigger = { + alias_name[trigger] = alias_match_left[trigger] + } + } + ## cardinality = 0..1 initial_show_position = { ## cardinality = 0..1 From 3dd03d4d99be8fd08ead977168c00277ae09b281 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:03:13 +0400 Subject: [PATCH 29/73] Add float support to `add_breakthrough_points` --- Config/effects_gtd.cwt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index fb07d062..c8b8abc2 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -3,8 +3,7 @@ alias[effect:add_breakthrough_points] = { specialization = specialization = all - value = int - + value = float } ### Requires raid as ROOT scope. Reduce progress to the special project in state. Root scope is raid instance scope. The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1. From 49429f4043e01b820e740114ff4c761dedb5e606 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:12:03 +0400 Subject: [PATCH 30/73] Add landmark support to history files --- Config/common/buildings.cwt | 3 +++ Config/history/states.cwt | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Config/common/buildings.cwt b/Config/common/buildings.cwt index 827a241c..38936a2e 100644 --- a/Config/common/buildings.cwt +++ b/Config/common/buildings.cwt @@ -14,6 +14,9 @@ types = { province_max = scalar } } + subtype[landmark] = { + spawn_point = landmark_spawn + } subtype[state] = { } } diff --git a/Config/history/states.cwt b/Config/history/states.cwt index ca93e6fc..78397b2a 100644 --- a/Config/history/states.cwt +++ b/Config/history/states.cwt @@ -36,6 +36,14 @@ state = { enum[provinces] = { ## cardinality = 0..inf = int[0..20] + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + allowed = { + alias_name[trigger] = alias_match_left[trigger] + } + level = int + } } } alias_name[effect] = alias_match_left[effect] From a778b3298a92b99fbec96733796273738e8ca5ac Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:16:51 +0400 Subject: [PATCH 31/73] Experimental support for canals spawned in history files --- Config/common/buildings.cwt | 3 +++ Config/history/states.cwt | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Config/common/buildings.cwt b/Config/common/buildings.cwt index 38936a2e..9c3960b6 100644 --- a/Config/common/buildings.cwt +++ b/Config/common/buildings.cwt @@ -17,6 +17,9 @@ types = { subtype[landmark] = { spawn_point = landmark_spawn } + subtype[canal] = { + spawn_point = locks_spawn + } subtype[state] = { } } diff --git a/Config/history/states.cwt b/Config/history/states.cwt index 78397b2a..37b0d42d 100644 --- a/Config/history/states.cwt +++ b/Config/history/states.cwt @@ -36,7 +36,7 @@ state = { enum[provinces] = { ## cardinality = 0..inf = int[0..20] - ## cardinality = 0..inf + ## cardinality = 0..1 = { ## cardinality = 0..1 allowed = { @@ -44,6 +44,14 @@ state = { } level = int } + ## cardinality = 0..1 + = { + ## cardinality = 0..1 + allowed = { + alias_name[trigger] = alias_match_left[trigger] + } + level = int + } } } alias_name[effect] = alias_match_left[effect] From 3bc4e716bab0917e52f3d7c8eb18778a1005a470 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:19:49 +0400 Subject: [PATCH 32/73] Fix a typo in `tech_effect|` --- Config/effects.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/effects.cwt b/Config/effects.cwt index 4f78eca5..4f2aef41 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -20,7 +20,7 @@ alias[effect:custom_effect_tooltip] = single_alias_right[bindable_loc] alias[effect:custom_effect_tooltip] = character_name| ### Shows just a custom tooltip. ## scope = any -alias[effect:custom_effect_tooltip] = tech_effect| ### Shows event option tooltip ## scope = any From 96402838445ab8be363289a83316edbfd7034025 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:24:39 +0400 Subject: [PATCH 33/73] We can have more than one shortcut in focus tree --- Config/common/national_focus.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/common/national_focus.cwt b/Config/common/national_focus.cwt index ef8b9ac4..d9dc468e 100644 --- a/Config/common/national_focus.cwt +++ b/Config/common/national_focus.cwt @@ -84,7 +84,7 @@ focus_tree = { y = int } - ## cardinality = 0..1 + ## cardinality = 0..inf shortcut = { name = localisation target = From 70bdbca38ccbb342650725c16ce87eea43d3daac Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:42:05 +0400 Subject: [PATCH 34/73] Revert "Add float support to `add_breakthrough_points`" This reverts commit 3dd03d4d99be8fd08ead977168c00277ae09b281. --- Config/effects_gtd.cwt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index c8b8abc2..fb07d062 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -3,7 +3,8 @@ alias[effect:add_breakthrough_points] = { specialization = specialization = all - value = float + value = int + } ### Requires raid as ROOT scope. Reduce progress to the special project in state. Root scope is raid instance scope. The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1. From 16e4b06a9b76666ee86055e9b2537f352a2d761a Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 15 Nov 2024 14:52:43 +0400 Subject: [PATCH 35/73] raid_damage_units - you can use floats with ratio=no to simulate tiny losses --- Config/effects_gtd.cwt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index fb07d062..8e00b6f6 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -379,17 +379,18 @@ alias[effect:raid_damage_units] = { damage = float ## cardinality = 0..1 plane_loss = float + ### Ratio = yes will convert losses to % (so use floats, 1 = 100%), ratio = no instead inflicts flat dmg ratio = yes } ### Damage the units performing the raid in scope (the attackers inflict losses). Damage is applied to ground units while damage to plane is defined as the amount of planes lost.\nIf 'ratio = yes', then all damage / losses are applied as a fraction of the current amount. For units, damage can be defined through one value 'damage' or separately through 'org_damage' and 'str_damage' ## scope = raid alias[effect:raid_damage_units] = { ## cardinality = 0..1 - plane_loss = int + plane_loss = float ## cardinality = 0..1 - org_damage = int + org_damage = float ## cardinality = 0..1 - str_damage = int + str_damage = float ## cardinality = 0..1 ratio = no } From 340544fbd176ac80330b2c955f31622635d39ad0 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Sat, 16 Nov 2024 11:26:29 +0100 Subject: [PATCH 36/73] documentation copy paste fix --- Config/on_actions.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/on_actions.cwt b/Config/on_actions.cwt index a802f541..5a8310ae 100644 --- a/Config/on_actions.cwt +++ b/Config/on_actions.cwt @@ -1120,7 +1120,7 @@ on_action = { on_mio_industrial_manufacturer_unassigned = single_alias_right[on_action_effect] ### Triggered when a project is completed - ### ROOT is the Military Industrial Organization, FROM is the owner of the MIO country + ### ROOT is the owner of the special project, FROM is the special project ## cardinality = 0..inf ## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = special_project } on_project_completion = single_alias_right[on_action_effect] From 62805b0fc0cf15a754369876de6fa5a9dfddbe90 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Sat, 16 Nov 2024 23:53:46 +0100 Subject: [PATCH 37/73] added changes to damage/remove building effects --- Config/effects.cwt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index 4f2aef41..9aa61bca 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -174,6 +174,19 @@ alias[effect:remove_building] = { ##cardinality = 0..1 province = enum[provinces] } +### Removes specified building in specified state or province. +## scope = state +alias[effect:remove_building] = { + tag = value[building_tag] + tag = { + ##cardinality = 1..inf + value[building_tag] + } + level = int_variable_field + + ##cardinality = 0..1 + province = enum[provinces] +} ### Releases specified country as a free country. ## scope = country @@ -2090,6 +2103,10 @@ alias[effect:damage_building] = { ## scope = state alias[effect:damage_building] = { tags = value[building_tag] + tags = { + ## cardinality = 1..inf + value[building_tag] + } damage = variable_field ## cardinality = 0..1 province = enum[provinces] From 2aa7eded06cc34c2894dd8d86f8d97659bb2f8a5 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:29:45 +0100 Subject: [PATCH 38/73] fixing `scopes =` -> `scope =` and some other small scope issues --- Config/common/raids.cwt | 6 +- Config/effects_new.cwt | 254 ++++++++++++++++++++-------------------- Config/effects_nsb.cwt | 10 +- Config/triggers_gtd.cwt | 4 +- Config/triggers_new.cwt | 176 ++++++++++++++-------------- 5 files changed, 225 insertions(+), 225 deletions(-) diff --git a/Config/common/raids.cwt b/Config/common/raids.cwt index 79668368..b41546c1 100644 --- a/Config/common/raids.cwt +++ b/Config/common/raids.cwt @@ -314,7 +314,7 @@ single_alias[raid_outcome] = { alias_name[effect] = alias_match_left[effect] # And also use the dynamic variables to change scope (see the variable list below) - ## push_scope = { country } + ## push_scope = country ## cardinality = 0..1 var:actor_country = { ## cardinality = ~1..inf @@ -330,14 +330,14 @@ single_alias[raid_outcome] = { ## cardinality = ~1..inf alias_name[effect] = alias_match_left[effect] - ## push_scope = { country } + ## push_scope = country ## cardinality = 0..1 var:victim_country = { ## cardinality = ~1..inf alias_name[effect] = alias_match_left[effect] } - ## push_scope = { state } + ## push_scope = state ## cardinality = 0..1 var:target_state = { ## cardinality = ~1..inf diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index 9453839e..d8eae195 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -1,13 +1,13 @@ ###Effect not shown in tooltips -## scopes = { STATE COUNTRY } +## scope = { STATE COUNTRY } # alias[effect:hidden_effect] = replace_me ###Grant experience to the scoped in unit leader. Cannot be used to remove experience. The unit leader is promoted to the next skill level if applicable -## scopes = { UNIT_LEADER } +## scope = { UNIT_LEADER } alias[effect:gain_xp] = variable_field ###Delete units of a country. No tooltip is generated. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:delete_unit] = { ## error_if_only_match = "template" is replaced with "division_template" in docs, proceed with caution ## severity = warning @@ -26,34 +26,34 @@ alias[effect:delete_unit] = { } ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { operative } +## scope = { operative } alias[effect:free_operative] = enum[country_tags] ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { operative } +## scope = { operative } alias[effect:free_operative] = scope[country] ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:free_operative] = value[unit_leader_ids] ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:free_operative] = scope[unit_leader] ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { operative } +## scope = { operative } alias[effect:free_operative] = { captured_by = enum[country_tags] } ###Free an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { operative } +## scope = { operative } alias[effect:free_operative] = { captured_by = scope[country] } ###Free a random captured operative of a certain tag by a certain tag. Can be used from a country scope of the operative in question.`all` is optional, default value is no - if set to yes it will free all operatives captured by the target country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:free_random_operative] = { captured_by = enum[country_tags] captured_by = scope[country] @@ -62,7 +62,7 @@ alias[effect:free_random_operative] = { } ###Create operative for country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:create_operative_leader] = { ## cardinality = 0..1 name = scalar @@ -109,11 +109,11 @@ alias[effect:create_operative_leader] = { } ###Capture an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:capture_operative] = scope[operative] ###Capture an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:capture_operative] = { operative = scope[operative] ## cardinality = 0..1 @@ -121,7 +121,7 @@ alias[effect:capture_operative] = { } ###Capture an operative. Can be used from a scope and a target that is either a country or a unit leader. -## scopes = { operative } +## scope = { operative } alias[effect:capture_operative] = { captured_by = scope[country] captured_by = enum[country_tags] @@ -130,7 +130,7 @@ alias[effect:capture_operative] = { } ###Executes children effects on a random operatives that fulfils the "limit" trigger. -## scopes = { COUNTRY OPERATION } +## scope = { COUNTRY OPERATION } ## push_scope = operative alias[effect:random_operative] = { ## cardinality = 0..1 @@ -142,7 +142,7 @@ alias[effect:random_operative] = { ###Executes children effects on operatives that fulfils the "limit" trigger. tooltip=key can be added to override tooltip title -## scopes = { COUNTRY OPERATION } +## scope = { COUNTRY OPERATION } ## push_scope = operative alias[effect:every_operative] = { ### Apply the effect to this number of randomly selected entities @@ -159,7 +159,7 @@ alias[effect:every_operative] = { ###Sends to target scope specified fraction of equipment. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:send_equipment_fraction] = { target = enum[country_tags] target = scope[country] @@ -167,7 +167,7 @@ alias[effect:send_equipment_fraction] = { } ###Transfer units (air, army, navy) to another country. Also transfer the stockpiled equipment (you can set it to zero if it is undesired) as well as unit leaders. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:transfer_units_fraction] = { target = enum[country_tags] target = scope[country] @@ -198,61 +198,61 @@ alias[effect:transfer_units_fraction] = { } ###Removes a ideology leader as leader of his party, making the next in line the new party leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:kill_ideology_leader] = ###Removes a ideology leader as leader of his party, making the next in line the new party leader. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:kill_ideology_leader] = variable_field ###Adds/removes days to 'days_remove' value of a decision. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_days_remove] = { decision = days = int_variable_field } ###Add days to 'mission_timeout' value of a mission. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_days_mission_timeout] = { mission = days = int_variable_field } ###Add resistance to a state. -## scopes = { STATE } +## scope = { STATE } alias[effect:add_resistance] = variable_field ###Add compliance to a state. -## scopes = { STATE } +## scope = { STATE } alias[effect:add_compliance] = variable_field ###Starts resistance activity for a core country. Use along with force_enable_resistance if you are enabling resistance in a state that is not possible (ie core). -## scopes = { STATE } +## scope = { STATE } alias[effect:start_resistance] = enum[country_tags] ###Starts resistance activity for a core country. Use along with force_enable_resistance if you are enabling resistance in a state that is not possible (ie core). -## scopes = { STATE } +## scope = { STATE } alias[effect:start_resistance] = scope[country] ###Starts resistance activity for a core country. Use along with force_enable_resistance if you are enabling resistance in a state that is not possible (ie core). -## scopes = { STATE } +## scope = { STATE } alias[effect:start_resistance] = bool ###Cancels resistance activity for a core country. Use along with force_disable_resistance to disable resistance forever. -## scopes = { STATE } +## scope = { STATE } alias[effect:cancel_resistance] = bool ###Set resistance of a state. -## scopes = { STATE } +## scope = { STATE } alias[effect:set_resistance] = variable_field ###Set compliance of a state. -## scopes = { STATE } +## scope = { STATE } alias[effect:set_compliance] = variable_field ###Adds a specific token against against another country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_operation_token] = { tag = scope[country] tag = enum[country_tags] @@ -260,7 +260,7 @@ alias[effect:add_operation_token] = { } ###Remove a specific token against against another country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:remove_operation_token] = { tag = scope[country] tag = enum[country_tags] @@ -268,7 +268,7 @@ alias[effect:remove_operation_token] = { } ###Adds a random limited use tech bonus from country of categories that is it ahead in compared to you. It must have at least one category or folder. But it can contain any number of them in any combination. Note: if a country does not have a tech to be stolen a random tech bonus will be applied based on base_bonus. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:steal_random_tech_bonus] = { ## cardinality = 0..inf folder = enum[tech_folder] @@ -293,7 +293,7 @@ alias[effect:steal_random_tech_bonus] = { } ###Teleport armies in state to another state or province. -## scopes = { STATE } +## scope = { STATE } alias[effect:teleport_armies] = { ## cardinality = 0..1 ## replace_scope = { this = country } @@ -305,7 +305,7 @@ alias[effect:teleport_armies] = { } ###Teleport armies in state to another state or province. -## scopes = { STATE } +## scope = { STATE } alias[effect:teleport_armies] = { ## cardinality = 0..1 ## replace_scope = { this = country } @@ -317,7 +317,7 @@ alias[effect:teleport_armies] = { } ###Teleport armies in state to another state or province. -## scopes = { STATE } +## scope = { STATE } alias[effect:teleport_armies] = { ## cardinality = 0..1 ## replace_scope = { this = country } @@ -329,7 +329,7 @@ alias[effect:teleport_armies] = { } ###Teleport armies in state to another state or province. -## scopes = { STATE } +## scope = { STATE } alias[effect:teleport_armies] = { ## cardinality = 0..1 ## replace_scope = { this = country } @@ -339,7 +339,7 @@ alias[effect:teleport_armies] = { } ###Executes children effects on every controlled state that fulfils the "limit" trigger. tooltip=key can be added to override tooltip title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = state alias[effect:every_controlled_state] = { ### Apply the effect to this number of randomly selected entities @@ -358,7 +358,7 @@ alias[effect:every_controlled_state] = { ###Sets the controller of provinces belong to a state and fulfils a condition. No tooltip is built. -## scopes = { STATE } +## scope = { STATE } alias[effect:set_state_province_controller] = { controller = enum[country_tags] controller = scope[country] @@ -370,11 +370,11 @@ alias[effect:set_state_province_controller] = { } ###Reserves a dynamic country so it won't be recycled for civil wars. A dynamic country with no owned states must be reserved after it is created and unreserved once it is no longer going to be used. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:reserve_dynamic_country] = bool ###Calculates the highest scored country that is defined in a country scorer and sets it to a variable. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:get_highest_scored_country_temp] = { scorer = ## cardinality = 0..1 @@ -382,7 +382,7 @@ alias[effect:get_highest_scored_country_temp] = { } ###Creates a dynamic country and runs child effects on it. -## scopes = { any } +## scope = { any } ## push_scope = country alias[effect:create_dynamic_country] = { original_tag = enum[country_tags] @@ -395,7 +395,7 @@ alias[effect:create_dynamic_country] = { } ###Calculates & sorts all countries in a country scorer and stores them and their scores in temp arrays. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:get_sorted_scored_countries_temp] = { scorer = ## cardinality = 0..1 @@ -405,7 +405,7 @@ alias[effect:get_sorted_scored_countries_temp] = { } ###Executes children effects on random occupied country that fulfils the "limit" trigger. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[effect:random_occupied_country] = { ## cardinality = 0..1 @@ -417,7 +417,7 @@ alias[effect:random_occupied_country] = { ###Executes children effects on every occupied country that fulfils the "limit" trigger. tooltip=key can be defined to override tooltip title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[effect:every_occupied_country] = { ### Apply the effect to this number of randomly selected entities @@ -436,10 +436,10 @@ alias[effect:every_occupied_country] = { ###Adds resistance target to the scoped state. -## scopes = { STATE } +## scope = { STATE } alias[effect:add_resistance_target] = variable_field ###Adds resistance target to the scoped state. -## scopes = { STATE } +## scope = { STATE } alias[effect:add_resistance_target] = { amount = variable_field ## cardinality = ~0..1 @@ -459,11 +459,11 @@ alias[effect:add_resistance_target] = { } ###Removes a previously added resistance target using its id. No tooltips are generated. -## scopes = { STATE } +## scope = { STATE } alias[effect:remove_resistance_target] = value[resistance_target] ###Calculates the highest scored country that is defined in a country scorer and sets it to a temp variable. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:get_highest_scored_country] = { scorer = ## cardinality = 0..1 @@ -471,7 +471,7 @@ alias[effect:get_highest_scored_country] = { } ###Calculates & sorts all countries in a country scorer and stores them and their scores in arrays. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:get_sorted_scored_countries] = { scorer = ## cardinality = 0..1 @@ -481,7 +481,7 @@ alias[effect:get_sorted_scored_countries] = { } ###Executes children effects on a random country with original tag. -## scopes = { any } +## scope = { any } ## push_scope = country alias[effect:random_country_with_original_tag] = { original_tag_to_check = enum[country_tags] @@ -496,7 +496,7 @@ alias[effect:random_country_with_original_tag] = { ### random_country_division - Executes children effects on a random division that fulfill the "limit" trigger. tooltip=key can be added to override tooltip title ### Supported scopes: country ### Executes children effects on a random division that full the "limit" trigger. tooltip=key can be added to override to override tooltip title -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = unit alias[effect:random_country_division] = { ## cardinality = 0..1 @@ -508,7 +508,7 @@ alias[effect:random_country_division] = { ###Executes children effects on a all countries with original tag. tooltip=key can be defined to override tooltip title. -## scopes = { any } +## scope = { any } ## push_scope = country alias[effect:every_country_with_original_tag] = { ### Apply the effect to this number of randomly selected entities @@ -527,7 +527,7 @@ alias[effect:every_country_with_original_tag] = { ###Add decryption against a target country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_decryption] = { target = enum[country_tags] target = scope[country] @@ -536,7 +536,7 @@ alias[effect:add_decryption] = { } ###Add decryption against a target country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_decryption] = { target = enum[country_tags] target = scope[country] @@ -546,7 +546,7 @@ alias[effect:add_decryption] = { ###Deletes units that uses a specific template. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:delete_units] = { division_template = scalar ## cardinality = 0..1 @@ -554,15 +554,15 @@ alias[effect:delete_units] = { } ###Force enables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_enable_resistance] = scope[country] ###Force enables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_enable_resistance] = enum[country_tags] ###Force enables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_enable_resistance] = { ## cardinality = 0..1 clear = bool @@ -575,7 +575,7 @@ alias[effect:force_enable_resistance] = { } ###Force enables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_enable_resistance] = { ## cardinality = 0..1 clear = bool @@ -588,19 +588,19 @@ alias[effect:force_enable_resistance] = { } ###Force disables resistance for scoped state -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = bool ###Force disables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = scope[country] ###Force disables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = enum[country_tags] ###Force disables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = { ## cardinality = 0..1 clear = bool @@ -613,7 +613,7 @@ alias[effect:force_disable_resistance] = { } ###Force disables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = { ## cardinality = 0..1 clear = bool @@ -626,7 +626,7 @@ alias[effect:force_disable_resistance] = { } ###Force disables resistance for scoped state. The resistance will be active even if other conditions doesn't satisfy (even if it is core or resistance check trigger is false). -## scopes = { STATE } +## scope = { STATE } alias[effect:force_disable_resistance] = { clear = yes ## error_if_only_match = This has no effect @@ -644,22 +644,22 @@ alias[effect:force_disable_resistance] = { } ###Create an Intelligence Agency for the country, if it is not already done. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:create_intelligence_agency] = yes ###Create an Intelligence Agency for the country, if it is not already done. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:create_intelligence_agency] = { name = localisation icon = } ###Add an upgrade to the Intelligence Agency (must be created). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:upgrade_intelligence_agency] = ###Create a ship from another country and assign it to the reserve fleet. 'creator' is optional. If not set, it will be the scoped country. 'name' is optional. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:create_ship] = { type = equipment_variant = scalar @@ -672,33 +672,33 @@ alias[effect:create_ship] = { } ###Set current country as spy master of its faction. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:set_faction_spymaster] = bool ###Lock all the division template at the country level. Note that you need to unlock them in the same way (You can't use 'set_division_template_lock' individually, because the lock at the country level will not be removed). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:country_lock_all_division_template] = bool ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = value_set[variable] ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = value_set[variable] distribution = uniform } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = value_set[variable] distribution = binomial } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = value_set[variable] distribution = uniform @@ -707,7 +707,7 @@ alias[effect:randomize_temp_variable] = { } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = value_set[variable] distribution = binomial @@ -716,7 +716,7 @@ alias[effect:randomize_temp_variable] = { } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = value_set[variable] distribution = binomial @@ -726,25 +726,25 @@ alias[effect:randomize_temp_variable] = { } ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = variable_field_32 ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = { var = variable_field_32 distribution = uniform } ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = { var = variable_field_32 distribution = binomial } ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = { var = variable_field_32 distribution = uniform @@ -753,7 +753,7 @@ alias[effect:randomize_variable] = { } ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = { var = variable_field_32 distribution = binomial @@ -762,7 +762,7 @@ alias[effect:randomize_variable] = { } ###Randomize a variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_variable] = { var = variable_field_32 distribution = binomial @@ -772,18 +772,18 @@ alias[effect:randomize_variable] = { } ###Harm an operative. The specified value is subject to modifiers. -## scopes = { operative } +## scope = { operative } alias[effect:harm_operative_leader] = variable_field ###Force an operative into hiding, preventing them from performing mission. The specified values is subject to modifiers. -## scopes = { operative } +## scope = { operative } alias[effect:force_operative_leader_into_hiding] = bool ###Force an operative into hiding, preventing them from performing mission. The specified values is subject to modifiers. -## scopes = { operative } +## scope = { operative } alias[effect:force_operative_leader_into_hiding] = int[0..100] ###Add the specified amount of intel over a specified country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_intel] = { target = enum[country_tags] target = scope[country] @@ -798,7 +798,7 @@ alias[effect:add_intel] = { } ###Fires a operative leader event for owner country. -## scopes = { operative } +## scope = { operative } alias[effect:operative_leader_event] = { ### The event to fire. id = @@ -877,24 +877,24 @@ alias[effect:operative_leader_event] = { } ###Kills an operative. This will temporarily lock the slot they occupy. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:kill_operative] = scope[operative] ###Kills an operative. This will temporarily lock the slot they occupy. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:kill_operative] = { operative = scope[operative] } ###Kills an operative. This will temporarily lock the slot they occupy. -## scopes = { operative } +## scope = { operative } alias[effect:kill_operative] = { killed_by = scope[country] killed_by = enum[country_tags] } ###Executes children effects on random controlled state that fulfils the "limit" trigger. prioritize = { } to pick those states first if they fulfil the limit. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = state alias[effect:random_controlled_state] = { ## cardinality = 0..1 @@ -911,45 +911,45 @@ alias[effect:random_controlled_state] = { ###Forces the refresh of the tree layout for the scoped country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:mark_focus_tree_layout_dirty] = yes ###Adds a civil war target to a specific country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_civil_war_target] = scope[country] ###Adds a civil war target to a specific country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_civil_war_target] = enum[country_tags] ###Modulos a temp variable with another. -## scopes = { any } +## scope = { any } alias[effect:modulo_temp_variable] = { value_set[variable] = variable_field_32 } ###mMdulos a temp variable with another. -## scopes = { any } +## scope = { any } alias[effect:modulo_temp_variable] = { var = value_set[variable] value = variable_field_32 } ###Modulos a variable with another. -## scopes = { any } +## scope = { any } alias[effect:modulo_variable] = { value_set[variable] = variable_field_32 } ###Modulos a variable with another. -## scopes = { any } +## scope = { any } alias[effect:modulo_variable] = { var = value_set[variable] value = variable_field_32 } ###Adds the collaboration in a target country with our currently scoped country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:add_collaboration] = { target = scope[country] target = enum[country_tags] @@ -957,7 +957,7 @@ alias[effect:add_collaboration] = { } ###Sets the collaboration in a target country with our currently scoped country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:set_collaboration] = { target = scope[country] target = enum[country_tags] @@ -965,46 +965,46 @@ alias[effect:set_collaboration] = { } ###Special effect for executing the Coordinated Strike Operation. Amount determines how often the simulation is run. -## scopes = { OPERATION } +## scope = { OPERATION } alias[effect:execute_operation_coordinated_strike] = { amount = int } ###Add the specified nationality to the scoped-in operative. -## scopes = { operative } +## scope = { operative } alias[effect:add_nationality] = scope[country] ###Add the specified nationality to the scoped-in operative. -## scopes = { operative } +## scope = { operative } alias[effect:add_nationality] = enum[country_tags] ###The scoped in country recall the volunteers sent to the target country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:recall_volunteers_from] = scope[country] ###The scoped in country recall the volunteers sent to the target country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:recall_volunteers_from] = enum[country_tags] ###An operative is turned by the specified country. This transfers the operative to the target country and make it appear as killed to the country of origin (increases the death counter and lock the slot). This fires the on_action on_operative_death with as killer the target country. If the target country is the owner of the operative, this has no effect and an error is logged. WARN: the on_action might execute immediately, before any effect listed after the occurrence of turn_operative. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:turn_operative] = scope[operative] ###An operative is turned by the specified country. This transfers the operative to the target country and make it appear as killed to the country of origin (increases the death counter and lock the slot). This fires the on_action on_operative_death with as killer the target country. If the target country is the owner of the operative, this has no effect and an error is logged. WARN: the on_action might execute immediately, before any effect listed after the occurrence of turn_operative. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[effect:turn_operative] = { operative = scope[operative] } ###An operative is turned by the specified country. This transfers the operative to the target country and make it appear as killed to the country of origin (increases the death counter and lock the slot). This fires the on_action on_operative_death with as killer the target country. If the target country is the owner of the operative, this has no effect and an error is logged. WARN: the on_action might execute immediately, before any effect listed after the occurrence of turn_operative. -## scopes = { operative } +## scope = { operative } alias[effect:turn_operative] = { turned_by = scope[country] turned_by = enum[country_tags] } ###Set initial garrison strength. -## scopes = { STATE } +## scope = { STATE } alias[effect:set_garrison_strength] = variable_field ###Releases specified country as a puppet using your owned or controlled states. @@ -1074,11 +1074,11 @@ alias[effect:set_leader_portrait] = alias[effect:set_leader_description] = localisation ###Sets a variable to a random value. -## scopes = { any } +## scope = { any } alias[effect:set_variable_to_random] = value_set[variable] ###Sets a variable to a random value. -## scopes = { any } +## scope = { any } alias[effect:set_variable_to_random] = { var = value_set[variable] ## cardinality = 0..1 @@ -1090,11 +1090,11 @@ alias[effect:set_variable_to_random] = { } ###Sets a temp variable to a random value. -## scopes = { any } +## scope = { any } alias[effect:set_temp_variable_to_random] = value_set[variable] ###Sets a temp variable to a random value. -## scopes = { any } +## scope = { any } alias[effect:set_temp_variable_to_random] = { var = value_set[variable] ## cardinality = 0..1 @@ -1106,21 +1106,21 @@ alias[effect:set_temp_variable_to_random] = { } ###Adds victory point to province. -## scopes = { any } +## scope = { any } alias[effect:add_victory_points] = { province = enum[provinces] value = variable_field_32 } ###Sets victory point to province. -## scopes = { any } +## scope = { any } alias[effect:set_victory_points] = { province = enum[provinces] value = variable_field_32 } ###Removes wargoals of specified type for country in scope. -## scopes = { country } +## scope = { country } alias[effect:remove_wargoal] = { target = scope[country] target = enum[country_tags] @@ -1129,7 +1129,7 @@ alias[effect:remove_wargoal] = { } ### Start peace conference -## scopes = { country } +## scope = { country } alias[effect:start_peace_conference] = { tag = scope[country] tag = enum[country_tags] @@ -1153,29 +1153,29 @@ alias[effect:set_occupation_law_where_available] = default_law alias[effect:set_occupation_law_where_available] = ### Sets specific occupation law where available -## scopes = { state } +## scope = { state } alias[effect:set_occupation_law] = ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = variable_field ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = variable_field_32 distribution = uniform } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = variable_field_32 distribution = binomial } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = variable_field_32 distribution = uniform @@ -1184,7 +1184,7 @@ alias[effect:randomize_temp_variable] = { } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = variable_field_32 distribution = binomial @@ -1193,7 +1193,7 @@ alias[effect:randomize_temp_variable] = { } ###Randomize a temporary variable. -## scopes = { any } +## scope = { any } alias[effect:randomize_temp_variable] = { var = variable_field_32 distribution = binomial @@ -1203,5 +1203,5 @@ alias[effect:randomize_temp_variable] = { } ###Add divisional commander xp to unit -## scopes = { any } +## scope = { any } alias[effect:add_divisional_commander_xp] = int \ No newline at end of file diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index 750d491b..5cf3ffb3 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -641,7 +641,7 @@ alias[effect:set_nationality] = { alias[effect:set_nationality] = enum[country_tags] ### Executes children effects on every subject country that fulfills the "limit" trigger. tooltip=key can be defined to override tooltip title -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[effect:every_subject_country] = { ### Apply the effect to this number of randomly selected entities @@ -659,7 +659,7 @@ alias[effect:every_subject_country] = { } ### Executes child effects on random subject country that fulfills the limit. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[effect:random_subject_country] = { ## cardinality = 0..1 @@ -671,7 +671,7 @@ alias[effect:random_subject_country] = { ### Executes children effects on every country that fulfils the "limit" trigger. Difference with every_country is that it includes countries not yet present on the map. tooltip=key can be defined to override tooltip title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[effect:every_possible_country] = { ### Apply the effect to this number of randomly selected entities @@ -689,7 +689,7 @@ alias[effect:every_possible_country] = { } ### Display in tooltip every character that fulfils the "limit" trigger. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = character alias[effect:character_list_tooltip] = { ## cardinality = 0..1 @@ -807,7 +807,7 @@ alias[effect:create_railway_gun] = { } ### Generate character -## scopes = { country } +## scope = { country } alias[effect:generate_character] = { token_base = value_set[character_token] ## cardinality = 0..1 diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt index 49b62707..85773bb7 100644 --- a/Config/triggers_gtd.cwt +++ b/Config/triggers_gtd.cwt @@ -199,10 +199,10 @@ alias[trigger:has_unit_type] = alias[trigger:province_vp] = int ### Check if country has shine effect on focus (either manually achieved or by being worked on). -### scope = country +## scope = country alias[trigger:has_shine_effect_on_focus] = ### Check if country has shine effect on focus (either manually achieved or by being worked on). -### scope = country +## scope = country alias[trigger:has_shine_effect_on_focus] = alias[trigger:custom_override_tooltip] = { diff --git a/Config/triggers_new.cwt b/Config/triggers_new.cwt index c29f76e3..6ffde3e6 100644 --- a/Config/triggers_new.cwt +++ b/Config/triggers_new.cwt @@ -1,92 +1,92 @@ ###All inside trigger must be true. -## scopes = { any } +## scope = { any } # alias[trigger:and] = replace_me ###At least one entry inside trigger must be true. -## scopes = { any } +## scope = { any } # alias[trigger:or] = replace_me ###Negates content of trigger. -## scopes = { any } +## scope = { any } # alias[trigger:not] = replace_me ###Print message to game.log - Can be localized. -## scopes = { any } +## scope = { any } alias[trigger:log] = localisation_inline ###Checks if scoped unit leader, ace or country is female. -## scopes = { COUNTRY UNIT_LEADER ACE } +## scope = { COUNTRY UNIT_LEADER CHARACTER } alias[trigger:is_female] = bool ###Compares the current resistance level of a state to a value. -## scopes = { STATE } +## scope = { STATE } alias[trigger:resistance] = variable_field ###Checks if a country has a captured an operative (supports scoped variables). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_captured_operative] = scope[country] ###Checks if a country has a captured an operative (supports scoped variables). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_captured_operative] = enum[country_tags] ###Checks if a country has a captured an operative (supports scoped variables). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_captured_operative] = bool ###Check if a state has enough non damaged buildings. -## scopes = { STATE } +## scope = { STATE } alias[trigger:non_damaged_building_level] = { building = level = variable_field } ###Checks the number of days since the country last capitulated, even if it is no longer capitulated. If it has not ever capitulated, the value is extremely large. It is recommended to combine this with has_capitulated = yes when you specifically want to ignore non-active capitulations. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:days_since_capitulated] = variable_field ###Compares the current compliance level of a state to a value. -## scopes = { STATE } +## scope = { STATE } alias[trigger:compliance] = variable_field ###Compares the current compliance speed of a state to a value. -## scopes = { STATE } +## scope = { STATE } alias[trigger:compliance_speed] = variable_field ###Compares the current resistance speed of a state to a value. -## scopes = { STATE } +## scope = { STATE } alias[trigger:resistance_speed] = variable_field ###Compares occupied country that creates resistance to a tag. -## scopes = { STATE } +## scope = { STATE } alias[trigger:occupied_country_tag] = enum[country_tags] ###Compares occupied country that creates resistance to a tag. -## scopes = { STATE } +## scope = { STATE } alias[trigger:occupied_country_tag] = scope[country] ###Compares the target resistance level of a state to a value. -## scopes = { STATE } +## scope = { STATE } alias[trigger:resistance_target] = variable_field ###Returns true if state has a resistance. -## scopes = { STATE } +## scope = { STATE } alias[trigger:has_resistance] = bool ###Returns true if state has an active resistance (above zero). -## scopes = { STATE } +## scope = { STATE } alias[trigger:has_active_resistance] = bool ###Compares occupied country that creates resistance to a tag. -## scopes = { STATE } +## scope = { STATE } alias[trigger:has_occupation_modifier] = ###Returns true if game is in debug mode (launched with -debug argument). -## scopes = { any } +## scope = { any } alias[trigger:is_debug] = bool ###Compares the core (average of all occupied states) compliance value of occupied_country_tag that is occupied by the country in current scope. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:core_compliance] = { occupied_country_tag = enum[country_tags] occupied_country_tag = scope[country] @@ -94,7 +94,7 @@ alias[trigger:core_compliance] = { } ###Compares the core (average of all occupied states) resistance value of occupied_country_tag that is occupied by the country in current scope. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:core_resistance] = { occupied_country_tag = enum[country_tags] occupied_country_tag = scope[country] @@ -102,7 +102,7 @@ alias[trigger:core_resistance] = { } ###Checks network strength you have in a country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:network_strength] = { target = enum[country_tags] target = scope[country] @@ -114,7 +114,7 @@ alias[trigger:network_strength] = { } ###Checks network strength you have in a country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:network_strength] = { state = state = scope[state] @@ -122,7 +122,7 @@ alias[trigger:network_strength] = { } ###Checks if a country has a specific token against another country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_operation_token] = { tag = scope[country] tag = enum[country_tags] @@ -130,19 +130,19 @@ alias[trigger:has_operation_token] = { } ###Checks occupation law of state. -## scopes = { STATE } +## scope = { STATE } alias[trigger:occupation_law] = ###Checks if a country is ally with another country. Will check if two countries are same/in same faction/has subject master relation. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_ally_with] = scope[country] ###Checks if a country is ally with another country. Will check if two countries are same/in same faction/has subject master relation. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_ally_with] = enum[country_tags] ###Calculates the highest scored country that is defined in a country scorer and sets it to a variable. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:get_highest_scored_country_temp] = { scorer = ## cardinality = 0..1 @@ -150,7 +150,7 @@ alias[trigger:get_highest_scored_country_temp] = { } ###Calculates & sorts all countries in a country scorer and stores them and their scores in temp arrays. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:get_sorted_scored_countries_temp] = { scorer = ## cardinality = 0..1 @@ -160,7 +160,7 @@ alias[trigger:get_sorted_scored_countries_temp] = { } ###Checks decryption ratio against a country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:decryption_progress] = { target = enum[country_tags] target = scope[country] @@ -168,7 +168,7 @@ alias[trigger:decryption_progress] = { } ###Check if any any occupied meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[trigger:any_occupied_country] = { ## cardinality = 0..1 @@ -178,7 +178,7 @@ alias[trigger:any_occupied_country] = { ###Check if all occupied countries meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[trigger:all_occupied_country] = { ## cardinality = 0..1 @@ -187,7 +187,7 @@ alias[trigger:all_occupied_country] = { } ###Check if any country with current scope's original tag meets the trigger. -## scopes = { any } +## scope = { any } alias[trigger:any_country_with_original_tag] = { original_tag_to_check = enum[country_tags] original_tag_to_check = scope[country] @@ -198,7 +198,7 @@ alias[trigger:any_country_with_original_tag] = { ###Check if all country with current scope's original tag meets the trigger. -## scopes = { any } +## scope = { any } alias[trigger:all_country_with_original_tag] = { original_tag_to_check = enum[country_tags] original_tag_to_check = scope[country] @@ -208,31 +208,31 @@ alias[trigger:all_country_with_original_tag] = { } ###Has country done this intelligence agency upgrade (to its highest level). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_done_agency_upgrade] = ###Check if country is Spy Master. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_spymaster] = bool ###Check the amount of foreign garrison manpower we have. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:foreign_manpower] = variable_field ###Check the amount of manpower needed by garrisons. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:garrison_manpower_need] = variable_field ###Checks the number of upgrade done in the intelligence agency. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:agency_upgrade_number] = variable_field ###Checks whether the operative is performing the given mission. -## scopes = { operative } +## scope = { operative } alias[trigger:operative_leader_mission] = enum[operative_missions] ###Compare the intel of the scoped country with the specified one. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:compare_intel_with] = { target = enum[country_tags] target = scope[country] @@ -247,7 +247,7 @@ alias[trigger:compare_intel_with] = { } ###Check if all operatives meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY OPERATION } +## scope = { COUNTRY OPERATION } ## push_scope = operative alias[trigger:all_operative_leader] = { ## cardinality = 0..1 @@ -256,7 +256,7 @@ alias[trigger:all_operative_leader] = { } ###Check if any operatives meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY OPERATION } +## scope = { COUNTRY OPERATION } ## push_scope = operative alias[trigger:any_operative_leader] = { ## cardinality = 0..1 @@ -265,11 +265,11 @@ alias[trigger:any_operative_leader] = { } ###Checks whether the operative has the matching captured status. -## scopes = { operative } +## scope = { operative } alias[trigger:is_operative_captured] = bool ###Compare the absolute, percentage based, intel level the scoped country has over the specified one. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:intel_level_over] = { target = enum[country_tags] target = scope[country] @@ -282,7 +282,7 @@ alias[trigger:intel_level_over] = { } ###Check if any of the states controlled by the scope country meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = state alias[trigger:any_controlled_state] = { ## cardinality = 0..1 @@ -291,7 +291,7 @@ alias[trigger:any_controlled_state] = { } ###Check if all of the states controlled by the scope country meets the trigger. tooltip=key can be defined to override title. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = state alias[trigger:all_controlled_state] = { ## cardinality = 0..1 @@ -300,64 +300,64 @@ alias[trigger:all_controlled_state] = { } ###Checks the number of operatives the country controls. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_of_operatives] = variable_field ###Checks the number of available operative slots a country has. If this differs from the number of operative, this does not mean the country can recruit an operative, but that it will eventually be able to. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_operative_slots] = variable_field ###Checks the number of operative a country can recruit right now. Note that this is not necessarily greater than zero if num_operative_slots returned a number greater than the number of operative. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_free_operative_slots] = variable_field ###Has country an active cryptology department. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_cryptology_department_active] = bool ###Checks if is currently decrypting a cipher. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_decrypting] = scope[country] ###Checks if is currently decrypting a cipher. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_decrypting] = enum[country_tags] ###Checks if fully decrypted a cipher. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_fully_decrypted] = scope[country] ###Checks if fully decrypted a cipher. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_fully_decrypted] = enum[country_tags] ###Checks if the country activated their active cipher decryption bonuses. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_active_decryption_bonuses_enabled] = scope[country] ###Checks if the country activated their active cipher decryption bonuses. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_active_decryption_bonuses_enabled] = enum[country_tags] ###Will compare towards the amount of fake intel divisions a country has control over. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_fake_intel_divisions] = variable_field ###Modulos a temp variable with another. -## scopes = { any } +## scope = { any } alias[trigger:modulo_temp_variable] = { value_set[variable] = variable_field_32 } ###Modulos a temp variable with another. -## scopes = { any } +## scope = { any } alias[trigger:modulo_temp_variable] = { var = value_set[variable] value = variable_field_32 } ###Check if any country with current scoped country guarantees. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[trigger:any_guaranteed_country] = { alias_name[trigger] = alias_match_left[trigger] @@ -365,14 +365,14 @@ alias[trigger:any_guaranteed_country] = { ###Check if every country with current scoped country guarantees. -## scopes = { COUNTRY } +## scope = { COUNTRY } ## push_scope = country alias[trigger:all_guaranteed_country] = { alias_name[trigger] = alias_match_left[trigger] } ###Compares number of completed operations. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_finished_operations] = { operation = operation = value_set[token] @@ -382,7 +382,7 @@ alias[trigger:num_finished_operations] = { } ###Checks the collaboration in a target country with our currently scoped country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_collaboration] = { target = scope[country] target = enum[country_tags] @@ -390,37 +390,37 @@ alias[trigger:has_collaboration] = { } ###Checks if running a specific operation. Operation can be omitted to check for any operation. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_running_operation] = { target = scope[country] operation = } ###Checks if finished collecting of resources for an operation. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_finished_collecting_for_operation] = { target = scope[country] operation = } ###Checks conscription ratio of the country compared to target conscription ratio. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:conscription_ratio] = variable_field ###Checks the target conscription amount of the country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:target_conscription_amount] = variable_field ###Checks the current conscription amount of the country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:current_conscription_amount] = variable_field ###Checks the type of operation. -## scopes = { OPERATION } +## scope = { OPERATION } alias[trigger:is_operation_type] = ###Checks if preparing a specific operation. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:is_preparing_operation] = { operation = operation = variable_field @@ -428,27 +428,27 @@ alias[trigger:is_preparing_operation] = { } ###Checks whether the operative is performing the given operation. -## scopes = { operative } +## scope = { operative } alias[trigger:operative_leader_operation] = ###Checks if the country could potentially declare a war on the target (according to game rules, relationship, etc... ). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:can_declare_war_on] = scope[country] ###Checks if the country could potentially declare a war on the target (according to game rules, relationship, etc... ). -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:can_declare_war_on] = enum[country_tags] ###Checks whether the operative has the specified nationality. NOTE: this is invalid on non-operatives. -## scopes = { operative } +## scope = { operative } alias[trigger:has_nationality] = scope[country] ###Checks whether the operative has the specified nationality. NOTE: this is invalid on non-operatives. -## scopes = { operative } +## scope = { operative } alias[trigger:has_nationality] = enum[country_tags] ###Checks network national coverage you have over a country. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:network_national_coverage] = { target = enum[country_tags] target = scope[country] @@ -456,15 +456,15 @@ alias[trigger:network_national_coverage] = { } ###Checks whether a state is impassable. -## scopes = { state } +## scope = { state } alias[trigger:impassable] = bool ###Number of researched technologies. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:num_researched_technologies] = int_variable_field ###Checks if country has allowed ideas with specific traits more than limit. -## scopes = { COUNTRY } +## scope = { COUNTRY } alias[trigger:has_allowed_idea_with_traits] = { idea = idea = { @@ -487,27 +487,27 @@ alias[trigger:has_allowed_idea_with_traits] = { } ###Is leading volunteers in the target. -## scopes = { UNIT_LEADER character } +## scope = { UNIT_LEADER character } alias[trigger:is_leading_volunteer_group] = scope[country] ###Is leading volunteers in the target. -## scopes = { UNIT_LEADER character } +## scope = { UNIT_LEADER character } alias[trigger:is_leading_volunteer_group] = enum[country_tags] ###Is leading volunteers in a country with the original tag. -## scopes = { UNIT_LEADER character } +## scope = { UNIT_LEADER character } alias[trigger:is_leading_volunteer_group_with_original_country] = scope[country] ###Is leading volunteers in a country with the original tag. -## scopes = { UNIT_LEADER character } +## scope = { UNIT_LEADER character } alias[trigger:is_leading_volunteer_group_with_original_country] = enum[country_tags] ###Sets a temp variable to a random value. -## scopes = { any } +## scope = { any } alias[trigger:set_temp_variable_to_random] = value_set[variable] ###Sets a temp variable to a random value. -## scopes = { any } +## scope = { any } alias[trigger:set_temp_variable_to_random] = { var = value_set[variable] ## cardinality = 0..1 From 97fd757b239cf8d89e3fc4f80636e3c085737aa7 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:14:13 +0400 Subject: [PATCH 39/73] Update `gain_xp` effect scope --- Config/effects_new.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index d8eae195..01520e69 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -3,7 +3,7 @@ # alias[effect:hidden_effect] = replace_me ###Grant experience to the scoped in unit leader. Cannot be used to remove experience. The unit leader is promoted to the next skill level if applicable -## scope = { UNIT_LEADER } +## scope = { UNIT_LEADER character } alias[effect:gain_xp] = variable_field ###Delete units of a country. No tooltip is generated. From ff9ab3f89b1f8e6f2d5bdfbbf59cacd4a63b07f8 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:24:01 +0400 Subject: [PATCH 40/73] Update scope of `every_possible_country` --- Config/effects_nsb.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index 5cf3ffb3..c08c61ec 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -671,7 +671,7 @@ alias[effect:random_subject_country] = { ### Executes children effects on every country that fulfils the "limit" trigger. Difference with every_country is that it includes countries not yet present on the map. tooltip=key can be defined to override tooltip title. -## scope = { COUNTRY } +## scope = { any } ## push_scope = country alias[effect:every_possible_country] = { ### Apply the effect to this number of randomly selected entities From 47ff8633f297c2fa08e0362bb3e6a39802701d88 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:26:46 +0400 Subject: [PATCH 41/73] Fix `on_operation_completed` scope --- Config/on_actions.cwt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config/on_actions.cwt b/Config/on_actions.cwt index 5a8310ae..504fed3c 100644 --- a/Config/on_actions.cwt +++ b/Config/on_actions.cwt @@ -1021,7 +1021,7 @@ on_action = { ### Trigger the following commands whenever an operative completed. THIS - the operative, ROOT - the initiating country, FROM - the target country. ## cardinality = 0..inf - ## replace_scope = { THIS = operative ROOT = country FROM = country } + ## replace_scope = { THIS = operation ROOT = country FROM = country } on_operation_completed = single_alias_right[operative_event_effect] ### Trigger the following commands whenever an operative dies. From 157e2e4d2c2cfca5df9c5ba71e031d0381981aed Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:31:57 +0400 Subject: [PATCH 42/73] Update `add_random_valid_trait_from_unit` effect --- Config/effects_bba.cwt | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/effects_bba.cwt b/Config/effects_bba.cwt index 6a990d5f..20d9dff1 100644 --- a/Config/effects_bba.cwt +++ b/Config/effects_bba.cwt @@ -81,6 +81,7 @@ alias[effect:add_random_valid_trait_from_unit] = { character = value[event_target] character = value[global_event_target] character = scope[character] + character = scope[unit_leader] } ## scope = { country character unit_leader } alias[effect:set_can_be_fired_in_advisor_role] = { From 44f736abdda4fb1ffc3ea41fd5664f091c6d71a9 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:52:44 +0400 Subject: [PATCH 43/73] Update scope of `outcome_execute` and `outcome_extra_execute` --- Config/common/operations.cwt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/common/operations.cwt b/Config/common/operations.cwt index 9e6614ae..d4a86f49 100644 --- a/Config/common/operations.cwt +++ b/Config/common/operations.cwt @@ -234,14 +234,14 @@ operation = { } ### Executed when the operation has completed [ once per operation ] - ## replace_scope = { THIS = country ROOT = country FROM = country FROMFROM = state } + ## replace_scope = { THIS = operation ROOT = country FROM = country FROMFROM = state } ## cardinality = 0..1 outcome_execute = { alias_name[effect] = alias_match_left[effect] } ### Same as outcome_execute - ## replace_scope = { THIS = country ROOT = country FROM = country FROMFROM = state } + ## replace_scope = { THIS = operation ROOT = country FROM = country FROMFROM = state } ## cardinality = 0..1 outcome_extra_execute = { alias_name[effect] = alias_match_left[effect] From be44c7463705936e802a113b050d781506667ffb Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:53:03 +0400 Subject: [PATCH 44/73] Create a variation of `gain_xp_leader` for operatives --- Config/common/traits.cwt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Config/common/traits.cwt b/Config/common/traits.cwt index 5f1747cf..39a7a066 100644 --- a/Config/common/traits.cwt +++ b/Config/common/traits.cwt @@ -135,6 +135,10 @@ unit_leader_trait = { gain_xp_leader = { alias_name[trigger] = alias_match_left[trigger] } + ## replace_scope = { this = operative root = operative from = country } + gain_xp_leader = { + alias_name[trigger] = alias_match_left[trigger] + } cost = int gui_row = int ## cardinality = 0..1 From 7bbe42f8a24bb89d2c30d51da3577ecd63b72d96 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 21:57:43 +0400 Subject: [PATCH 45/73] Add country_leader var support to `promote_character` --- Config/effects_nsb.cwt | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index c08c61ec..bd07bccb 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -488,6 +488,7 @@ alias[effect:promote_character] = value[character_token] alias[effect:promote_character] = { character = character = value[character_token] + character = country_leader ### must match the character's country leader sub-ideology ideology = enum[sub_ideology] ideology = From 08e52b78fe0f735a514915350a87596eeaa23880 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Tue, 19 Nov 2024 22:13:31 +0400 Subject: [PATCH 46/73] Update `gain_xp_leader` scope --- Config/common/traits.cwt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/common/traits.cwt b/Config/common/traits.cwt index 39a7a066..9c871a96 100644 --- a/Config/common/traits.cwt +++ b/Config/common/traits.cwt @@ -131,11 +131,11 @@ unit_leader_trait = { gain_xp = { alias_name[trigger] = alias_match_left[trigger] } - ## replace_scope = { this = unit_leader root = unit_leader from = country } + ## replace_scope = { this = unit_leader root = country from = country } gain_xp_leader = { alias_name[trigger] = alias_match_left[trigger] } - ## replace_scope = { this = operative root = operative from = country } + ## replace_scope = { this = operative root = country from = country } gain_xp_leader = { alias_name[trigger] = alias_match_left[trigger] } From 53ff696f5ce95dce458790c3d76890ca4fa19901 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Wed, 20 Nov 2024 17:21:37 +0400 Subject: [PATCH 47/73] `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 48/73] 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 49/73] 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 50/73] 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 51/73] 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 52/73] 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 53/73] 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 54/73] 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 55/73] 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 56/73] 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| } } } From 95ff98d5a8fefd89edddea9750ddc5bfe2ed8118 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Mon, 2 Dec 2024 17:01:46 +0400 Subject: [PATCH 57/73] Update xp effects to support constants --- Config/effects.cwt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index d81ad158..ddbee2c0 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -1490,14 +1490,26 @@ alias[effect:remove_core_of] = enum[country_tags] ## scope = country alias[effect:army_experience] = variable_field +### Add army experience for country. +## scope = country +alias[effect:army_experience] = value[variable] + ### Add naval experience for country. ## scope = country alias[effect:navy_experience] = variable_field +### Add air experience for country. +## scope = country +alias[effect:navy_experience] = value[variable] + ### Add air experience for country. ## scope = country alias[effect:air_experience] = variable_field +### Add air experience for country. +## scope = country +alias[effect:air_experience] = value[variable] + ### Save an event target. ## scope = any alias[effect:save_event_target_as] = value_set[event_target] From da97e33489215992eeb694d25e3f78e61c12b9dc Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Mon, 2 Dec 2024 17:02:40 +0400 Subject: [PATCH 58/73] Update custom_override_tooltip to support character_name | tech_effect --- Config/effects_gtd.cwt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index 1cc973cc..960bd325 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -434,6 +434,8 @@ alias[effect:add_project_progress_ratio] = value[variable] alias[effect:custom_override_tooltip] = { tooltip = localisation tooltip = single_alias_right[bindable_loc] + tooltip = character_name| + tooltip = tech_effect| ## cardinality = 1..inf alias_name[effect] = alias_match_left[effect] } From 7ec61bbd46356e17101f5d2a21549f5884051bab Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:11:08 +0100 Subject: [PATCH 59/73] new strategy and new on_action in 1.15.2 --- Config/common/ai_strategy.cwt | 1 + Config/on_actions.cwt | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Config/common/ai_strategy.cwt b/Config/common/ai_strategy.cwt index e9c31598..5e7c1f23 100644 --- a/Config/common/ai_strategy.cwt +++ b/Config/common/ai_strategy.cwt @@ -509,6 +509,7 @@ enums = { equipment_market_spend_factories force_concentration_factor raid_target_country + become_spymaster } enum[pp_strats] = { pp_spend_amount diff --git a/Config/on_actions.cwt b/Config/on_actions.cwt index 504fed3c..591bc557 100644 --- a/Config/on_actions.cwt +++ b/Config/on_actions.cwt @@ -528,12 +528,20 @@ types = { path = "game/common/on_actions" skip_root_key = on_actions } + + # GTD ## type_key_filter = on_project_completion type[on_project_completion] = { path = "game/common/on_actions" skip_root_key = on_actions } + + ## type_key_filter = on_before_peace_conference_start + type[on_before_peace_conference_start] = { + path = "game/common/on_actions" + skip_root_key = on_actions + } } @@ -1119,11 +1127,17 @@ on_action = { ## replace_scope = { ROOT = military_industrial_organization this = military_industrial_organization FROM = COUNTRY } on_mio_industrial_manufacturer_unassigned = single_alias_right[on_action_effect] + # GTD -------------------- + ### Triggered when a project is completed ### ROOT is the owner of the special project, FROM is the special project ## cardinality = 0..inf ## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = special_project } on_project_completion = single_alias_right[on_action_effect] + + ### ROOT is winner, FROM is loser (called for all winners against all losers) + ## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = COUNTRY } + on_before_peace_conference_start = single_alias_right[on_action_effect] } single_alias[country_event_effect] = { From de3d95e184d03a27fa21226bbec4234deb8aad27 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Sat, 7 Dec 2024 10:52:11 +0100 Subject: [PATCH 60/73] added scope checks for the other scopes a dynamic modifier can be in --- Config/effects.cwt | 24 ++++++++++++++++++++++++ Config/triggers.cwt | 15 +++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index ddbee2c0..56ede3ad 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -3588,6 +3588,18 @@ alias[effect:remove_dynamic_modifier] = { ## cardinality = 0..1 ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. scope = scope[state] + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[character] + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[special_project] } ### Adds a dynamic modifier to country/state/unit leader. @@ -3611,6 +3623,18 @@ alias[effect:add_dynamic_modifier] = { ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. scope = scope[state] + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[character] + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[special_project] + ## cardinality = 0..1 ### Optional, makes the dynamic modifier acted as a timed modifier days = int_variable_field diff --git a/Config/triggers.cwt b/Config/triggers.cwt index 78043f60..f75eda11 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -2199,6 +2199,21 @@ alias[trigger:has_dynamic_modifier] = { ## cardinality = 0..1 ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. scope = scope[country] + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[state] + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = + + ## cardinality = 0..1 + ### Optional, state or country tag or a variable contains that. if specified the dynamic variable will target that scope. + scope = scope[special_project] } ### Runs a loop on for each element of an array, finds the lowest value and stores result in temp variables. From fddd0f78fe8fa88a1b0a6f63e2cbcfd722658ac9 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 8 Dec 2024 01:55:59 +0400 Subject: [PATCH 61/73] Add missing cardingality for on_before_peace_conference_start --- Config/on_actions.cwt | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/on_actions.cwt b/Config/on_actions.cwt index 591bc557..424ca1bb 100644 --- a/Config/on_actions.cwt +++ b/Config/on_actions.cwt @@ -1136,6 +1136,7 @@ on_action = { on_project_completion = single_alias_right[on_action_effect] ### ROOT is winner, FROM is loser (called for all winners against all losers) + ## cardinality = 0..inf ## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = COUNTRY } on_before_peace_conference_start = single_alias_right[on_action_effect] } From a9858a16dd3f6f3d9b0044adbfddeb917eff9557 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 8 Dec 2024 02:00:49 +0400 Subject: [PATCH 62/73] Apparently medals can have visible trigger --- Config/common/unit_medals.cwt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Config/common/unit_medals.cwt b/Config/common/unit_medals.cwt index 889990fe..192d5c92 100644 --- a/Config/common/unit_medals.cwt +++ b/Config/common/unit_medals.cwt @@ -13,6 +13,11 @@ unit_medal = { ## cardinality = ~1..inf alias_name[trigger] = alias_match_left[trigger] } + ## cardinality = 0..1 + visible = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + } frame = int icon = From d930ead329ea8056c708ebf4e932956a190644b5 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 8 Dec 2024 02:04:50 +0400 Subject: [PATCH 63/73] Add basic validation to division_template variable - still no validation for create_unit effect --- Config/effects.cwt | 14 +++++++------- Config/effects_bba.cwt | 2 +- Config/effects_gtd.cwt | 2 +- Config/effects_new.cwt | 4 ++-- Config/effects_nsb.cwt | 5 ++++- Config/history/oobs.cwt | 4 ++-- Config/triggers.cwt | 2 +- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Config/effects.cwt b/Config/effects.cwt index 56ede3ad..65f02f01 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -637,7 +637,7 @@ alias[effect:randomize_weather] = int ### Adds a division template to country. ## scope = country alias[effect:division_template] = { - name = localisation_inline + name = value_set[division_template_name] ## cardinality = 0..1 division_names_group = ## cardinality = 0..1 @@ -682,7 +682,7 @@ alias[effect:division_template] = { ### Adds units to a division template. ## scope = country alias[effect:add_units_to_division_template] = { - template_name = localisation_inline + template_name = value[division_template_name] ## cardinality = 0..1 regiments = { ## cardinality = 1..25 @@ -2997,27 +2997,27 @@ alias[effect:cancel_border_war] = { ### Set lock status for a division template. ## scope = country alias[effect:set_division_template_lock] = { - division_template = localisation_inline + division_template = value[division_template_name] is_locked = bool } ### Set cap for a division template. ## scope = country alias[effect:set_division_template_cap] = { - division_template = localisation_inline + division_template = value[division_template_name] division_cap = int_variable_field } ### Remove cap for a division template. ## scope = country alias[effect:clear_division_template_cap] = { - division_template = localisation_inline + division_template = value[division_template_name] } ### Set division template to allow force recruiting. force_allow_recruiting defaults to true if unset ## scope = country alias[effect:set_division_force_allow_recruiting] = { - division_template = localisation_inline + division_template = value[division_template_name] ## cardinality = 0..1 force_allow_recruiting = bool } @@ -3025,7 +3025,7 @@ alias[effect:set_division_force_allow_recruiting] = { ### Delete a template and its units. ## scope = country alias[effect:delete_unit_template_and_units] = { - division_template = localisation_inline + division_template = value[division_template_name] ## cardinality = 0..1 disband = bool } diff --git a/Config/effects_bba.cwt b/Config/effects_bba.cwt index 20d9dff1..cf8f3f04 100644 --- a/Config/effects_bba.cwt +++ b/Config/effects_bba.cwt @@ -151,7 +151,7 @@ alias[effect:random_state_division] = { ### Change divisions in scope to selected template ## scope = unit alias[effect:change_division_template] = { - division_template = localisation_inline + division_template = value[division_template_name] } ### Set unit org to a specific value diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index 960bd325..afcdc902 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -46,7 +46,7 @@ alias[effect:every_scientist] = { alias[effect:create_colonial_division_template] = { subject = scope[country] # Country tag division_template = { - name = scalar + name = value_set[division_template_name] ## cardinality = 0..1 division_names_group = ## cardinality = 0..1 diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index 01520e69..271bf67b 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -14,7 +14,7 @@ alias[effect:delete_unit] = { ## cardinality = 0..1 template = scalar ## cardinality = 0..1 - division_template = scalar + division_template = value[division_template_name] ## cardinality = 0..1 id = variable_field ## cardinality = 0..1 @@ -548,7 +548,7 @@ alias[effect:add_decryption] = { ###Deletes units that uses a specific template. ## scope = { COUNTRY } alias[effect:delete_units] = { - division_template = scalar + division_template = value[division_template_name] ## cardinality = 0..1 disband = bool } diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index bd07bccb..5b0ced6a 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -780,7 +780,10 @@ alias[effect:damage_units] = { ratio = bool ### you can limit army templates ## cardinality = 0..1 - template = localisation_inline + template = value[division_template_name] + ### you can limit army templates + ## cardinality = 0..1 + division_template = value[division_template_name] ### Damage armies ## cardinality = 0..1 army = bool diff --git a/Config/history/oobs.cwt b/Config/history/oobs.cwt index a7ad7b8f..9279d63c 100644 --- a/Config/history/oobs.cwt +++ b/Config/history/oobs.cwt @@ -18,7 +18,7 @@ oob = { ## cardinality = 0..inf division_template = { - name = scalar + name = value_set[division_template_name] ## cardinality = 0..1 division_names_group = ## cardinality = 0..1 @@ -76,7 +76,7 @@ oob = { name_order = int } location = enum[provinces] - division_template = scalar + division_template = value[division_template_name] ### Defines a unique name for this unit's division commander ## cardinality = 0..1 unique = { diff --git a/Config/triggers.cwt b/Config/triggers.cwt index f75eda11..afb36df0 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -1260,7 +1260,7 @@ alias[trigger:num_tech_sharing_groups] = int ### Check if country has a division template of specific name. ## scope = country -alias[trigger:has_template] = scalar +alias[trigger:has_template] = value[division_template_name] ### Check if state has a specific state category. ## scope = state From 3b16b145076188f394f2f519a746fd13f4f4d2f2 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:56:43 +0100 Subject: [PATCH 64/73] added validation for gui elements for sgui properties and dynamic list --- Config/common/scripted_guis.cwt | 72 ++++++++++++++++++++++++++++++++- Config/interface/gui.cwt | 56 ++++++++++++------------- 2 files changed, 99 insertions(+), 29 deletions(-) diff --git a/Config/common/scripted_guis.cwt b/Config/common/scripted_guis.cwt index a3c32238..ccbd95f8 100644 --- a/Config/common/scripted_guis.cwt +++ b/Config/common/scripted_guis.cwt @@ -78,7 +78,7 @@ scripted_gui = { ## cardinality = 0..1 properties = { ## cardinality = ~1..inf - scalar = { + value[gui_element_name] = { ## cardinality = 0..1 ### Should return name of the texture in gfx file. image = localisation_inline @@ -94,7 +94,7 @@ scripted_gui = { ## cardinality = 0..1 dynamic_lists = { ## cardinality = ~1..inf - scalar = { + value[gridBoxType_element_name] = { ### The array that will be used for populating the grid. array = variable_field ## cardinality = 0..1 @@ -628,4 +628,72 @@ enums = { test_contesded_states #(states that shares provinces between enemy countries) test_if_only_coastal } + + enum[click_modifiers] = { + _click + _right_click + _alt_click + _control_click + _shift_click + _right_alt_click + _right_control_click + _right_shift_click + _alt_right_click + _alt_control_click + _alt_shift_click + _control_right_click + _control_alt_click + _control_shift_click + _shift_right_click + _shift_alt_click + _shift_control_click + _right_alt_control_click + _right_alt_shift_click + _right_control_alt_click + _right_control_shift_click + _right_shift_alt_click + _right_shift_control_click + _alt_right_shift_click + _alt_right_control_click + _alt_control_shift_click + _alt_control_right_click + _alt_shift_control_click + _alt_shift_right_click + _control_right_alt_click + _control_right_shift_click + _control_alt_right_click + _control_alt_shift_click + _control_shift_right_click + _control_shift_alt_click + _shift_right_control_click + _shift_right_alt_click + _shift_alt_control_click + _shift_alt_right_click + _shift_control_alt_click + _shift_control_right_click + _right_alt_control_shift_click + _right_alt_shift_control_click + _right_control_alt_shift_click + _right_control_shift_alt_click + _right_shift_alt_control_click + _right_shift_control_alt_click + _alt_right_control_shift_click + _alt_right_shift_control_click + _alt_control_right_shift_click + _alt_control_shift_right_click + _alt_shift_right_control_click + _alt_shift_control_right_click + _control_right_shift_alt_click + _control_right_alt_shift_click + _control_alt_shift_right_click + _control_alt_right_shift_click + _control_shift_alt_right_click + _control_shift_right_alt_click + _shift_right_alt_control_click + _shift_right_control_alt_click + _shift_alt_right_control_click + _shift_alt_control_right_click + _shift_control_right_alt_click + _shift_control_alt_right_click + } } diff --git a/Config/interface/gui.cwt b/Config/interface/gui.cwt index d99954ff..71a407f4 100644 --- a/Config/interface/gui.cwt +++ b/Config/interface/gui.cwt @@ -25,7 +25,7 @@ containerWindowType = { ### Background texture background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -75,7 +75,7 @@ alias[gui:containerWindowType] = { ### Background texture background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -108,7 +108,7 @@ alias[gui:containerWindowType] = { } ###Drop Down Box, seems to be hardcoded alias[gui:dropDownBoxType] = { - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 ### Mouse Draggable moveable = bool @@ -128,7 +128,7 @@ alias[gui:dropDownBoxType] = { ### Background texture background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -160,7 +160,7 @@ alias[gui:dropDownBoxType] = { scroll_wheel_factor = float ##cardinality = 0..1 expandButton = { - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 ### Special size version for buttons size = { @@ -193,7 +193,7 @@ alias[gui:dropDownBoxType] = { } ## cardinality = 0..1 expandedWindow = { - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 ### Mouse Draggable moveable = bool @@ -209,7 +209,7 @@ alias[gui:dropDownBoxType] = { ### Background texture background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -243,7 +243,7 @@ alias[gui:dropDownBoxType] = { } ###Button Element alias[gui:buttonType] = { - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 ### Special size version for buttons size = { @@ -280,7 +280,7 @@ alias[gui:buttonType] = { ### Hardcoded alias[gui:OverlappingElementsBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] ## cardinality = 0..1 spacing = float @@ -292,7 +292,8 @@ alias[gui:OverlappingElementsBoxType] = { ### Dynamic List alias[gui:gridBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] + name = value_set[gridBoxType_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] ## cardinality = 0..1 @@ -332,7 +333,7 @@ alias[gui:gridBoxType] = { ## cardinality = 0..1 background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -345,7 +346,7 @@ alias[gui:gridBoxType] = { ### Dynamic List alias[gui:listBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] ## cardinality = 0..1 @@ -367,7 +368,7 @@ alias[gui:listBoxType] = { ### Dynamic List alias[gui:smoothListBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] ## cardinality = 0..1 @@ -393,6 +394,7 @@ alias[gui:smoothListBoxType] = { alias[gui:iconType] = { ### Name referenced by scripted gui name = value_set[iconType_name] + name = value_set[gui_element_name] ##cardinality = ~1..1 alias_name[any_image_type] = alias_match_left[any_image_type] alias_name[gui_image] = alias_match_left[gui_image] @@ -402,7 +404,7 @@ alias[gui:iconType] = { ###Unknown, seems to be only used with hardcoded things alias[gui:positionType] = { ## cardinality = ~1..1 - name = scalar + name = value_set[gui_element_name] position = { x = int[-3840..3840] x = float[-3840..3840] @@ -415,7 +417,7 @@ alias[gui:positionType] = { ###Browser, hardcoded alias[gui:browserType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] ##cardinality = ~1..1 alias_name[any_image_type] = alias_match_left[any_image_type] alias_name[gui_image] = alias_match_left[gui_image] @@ -425,7 +427,7 @@ alias[gui:browserType] = { ###Text box alias[gui:instantTextBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 ## cardinality = 0..1 font = scalar @@ -471,7 +473,7 @@ alias[gui:instantTextBoxType] = { ###Editable text box - only works with hardcoded HoI4 elements alias[gui:editBoxType] = { ### Name referenced by scripted gui - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 text = localisation ## cardinality = 0..1 @@ -527,7 +529,7 @@ alias[gui:editBoxType] = { } ### Checkbox alias[gui:checkboxType] = { - name = scalar + name = value_set[gui_element_name] ## cardinality = 0..1 buttonText = localisation ## cardinality = 0..1 @@ -540,7 +542,7 @@ alias[gui:checkboxType] = { alias_name[gui_localization] = alias_match_left[gui_localization] } alias[gui:scrollbarType] = { - name = scalar + name = value_set[gui_element_name] slider = scalar track = scalar leftbutton = scalar @@ -556,7 +558,7 @@ alias[gui:scrollbarType] = { horizontal = int ## cardinality = 4..4 guiButtonType = { - name = scalar + name = value_set[gui_element_name] quadTextureSprite = position = {x=int y=int} ## cardinality = 0..1 @@ -564,13 +566,13 @@ alias[gui:scrollbarType] = { } } alias[gui:extendedScrollbarType] = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] ## cardinality = 0..1 background = { ## cardinality = 0..1 - name = scalar + name = value_set[gui_element_name] alias_name[gui_standard] = alias_match_left[gui_standard] alias_name[gui_image] = alias_match_left[gui_image] ## cardinality = 0..1 @@ -609,7 +611,7 @@ alias[gui:extendedScrollbarType] = { ##cardinality = 1..1 ###Slider for scroll bar slider = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_image] = alias_match_left[gui_image] position = { x = int[-3840..3840] @@ -622,7 +624,7 @@ alias[gui:extendedScrollbarType] = { ##cardinality = 1..1 ###Slider for scroll bar track = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_image] = alias_match_left[gui_image] position = { x = int[-3840..3840] @@ -635,7 +637,7 @@ alias[gui:extendedScrollbarType] = { ##cardinality = 0..1 ###Increase button increaseButton = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_image] = alias_match_left[gui_image] alias_name[gui_sound] = alias_match_left[gui_sound] position = { @@ -649,7 +651,7 @@ alias[gui:extendedScrollbarType] = { ##cardinality = 0..1 ###Decrease button decreaseButton = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_image] = alias_match_left[gui_image] alias_name[gui_sound] = alias_match_left[gui_sound] position = { @@ -663,7 +665,7 @@ alias[gui:extendedScrollbarType] = { ##cardinality = 0..1 ###Decrease button slider = { - name = scalar + name = value_set[gui_element_name] alias_name[gui_image] = alias_match_left[gui_image] position = { x = int[-3840..3840] From d175a5c75cd270e2b2f228c1cf833b76023cc7d1 Mon Sep 17 00:00:00 2001 From: BiscuitCookies <25040791+BiscuitCookies@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:31:11 +0100 Subject: [PATCH 65/73] fix for remove_building from tag -> tags --- Config/effects.cwt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Config/effects.cwt b/Config/effects.cwt index 65f02f01..40e61967 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -177,8 +177,8 @@ alias[effect:remove_building] = { ### Removes specified building in specified state or province. ## scope = state alias[effect:remove_building] = { - tag = value[building_tag] - tag = { + tags = value[building_tag] + tags = { ##cardinality = 1..inf value[building_tag] } From 905f449205320794254c546d571b060e002d74a1 Mon Sep 17 00:00:00 2001 From: Alpinia Date: Fri, 13 Dec 2024 10:30:18 -0300 Subject: [PATCH 66/73] Added role property to division_template effects --- Config/effects.cwt | 2 ++ Config/effects_gtd.cwt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Config/effects.cwt b/Config/effects.cwt index 40e61967..05dda4c9 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -641,6 +641,8 @@ alias[effect:division_template] = { ## cardinality = 0..1 division_names_group = ## cardinality = 0..1 + role = value[ai_template_roles] + ## cardinality = 0..1 override_model = ## cardinality = 0..1 is_locked = bool diff --git a/Config/effects_gtd.cwt b/Config/effects_gtd.cwt index afcdc902..53c1ce73 100644 --- a/Config/effects_gtd.cwt +++ b/Config/effects_gtd.cwt @@ -50,6 +50,8 @@ alias[effect:create_colonial_division_template] = { ## cardinality = 0..1 division_names_group = ## cardinality = 0..1 + role = value[ai_template_roles] + ## cardinality = 0..1 override_model = ## cardinality = 0..1 template_counter = int From 7ed0d6c01f3455dd20f5d43f5d1ed8c8ab2bb2f4 Mon Sep 17 00:00:00 2001 From: Alpinia Date: Fri, 13 Dec 2024 10:38:27 -0300 Subject: [PATCH 67/73] any_state_in should change the scope to state --- Config/triggers_gtd.cwt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Config/triggers_gtd.cwt b/Config/triggers_gtd.cwt index b34ef710..eb1f5e4a 100644 --- a/Config/triggers_gtd.cwt +++ b/Config/triggers_gtd.cwt @@ -120,6 +120,7 @@ alias[trigger:has_naval_invasion_against_state] = { ### check if any state in the given category meets the trigger. ## scope = any +## push_scope = state alias[trigger:any_state_in] = { ## cardinality = 0..1 tooltip = localisation @@ -129,6 +130,7 @@ alias[trigger:any_state_in] = { } ### check if any state in the given category meets the trigger. ## scope = any +## push_scope = state alias[trigger:any_state_in] = { ## cardinality = 0..1 tooltip = localisation @@ -138,6 +140,7 @@ alias[trigger:any_state_in] = { } ### check if any state in the given category meets the trigger. ## scope = any +## push_scope = state alias[trigger:any_state_in] = { ## cardinality = 0..1 tooltip = localisation @@ -147,6 +150,7 @@ alias[trigger:any_state_in] = { } ### check if any state in the given category meets the trigger. ## scope = any +## push_scope = state alias[trigger:any_state_in] = { ## cardinality = 0..1 tooltip = localisation From f9afeb9bda0b72b5cb89142aba844db4ecc3fe27 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 20 Dec 2024 06:13:40 +0400 Subject: [PATCH 68/73] Update `start_peace_conference` effect --- Config/effects_new.cwt | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index 271bf67b..ac30196a 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -1133,7 +1133,17 @@ alias[effect:remove_wargoal] = { alias[effect:start_peace_conference] = { tag = scope[country] tag = enum[country_tags] - score_factor = float + score_factor = variable_field + ## cardinality = 0..1 + message = localisation + ### default is LIMITED_FACTION + ### ALL (all relevant countries), FACTION (members of main country's faction and overlordship), LIMITED_FACTION (faction members if main country is faction leader, and subjects if main country is overlord), LIMITED (main country and their subjects) + ## cardinality = 0..1 + winner_scope = enum[start_pc_scope_enum] +### default is LIMITED_FACTION + ### ALL (all relevant countries), FACTION (members of main country's faction and overlordship), LIMITED_FACTION (faction members if main country is faction leader, and subjects if main country is overlord), LIMITED (main country and their subjects) + ## cardinality = 0..1 + loser_scope = enum[start_pc_scope_enum] } ### Sets the occupation law for an occupied country, occupied state, or the default occupation law of an occupying country. @@ -1204,4 +1214,13 @@ alias[effect:randomize_temp_variable] = { ###Add divisional commander xp to unit ## scope = { any } -alias[effect:add_divisional_commander_xp] = int \ No newline at end of file +alias[effect:add_divisional_commander_xp] = int + +enums = { + enum[start_pc_scope_enum] = { + ALL + FACTION + LIMITED_FACTION + LIMITED + } +} From 04974db7126dd251b3b0fdfb6e6bc25642cdb735 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 20 Dec 2024 20:37:33 +0400 Subject: [PATCH 69/73] Adjust unit leader effects/triggers to work in char scope Character scope == init_leader scope --- Config/effects.cwt | 2 +- Config/effects_new.cwt | 4 ++-- Config/triggers.cwt | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Config/effects.cwt b/Config/effects.cwt index 05dda4c9..94370a3b 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -2738,7 +2738,7 @@ alias[effect:add_offsite_building] = { #wiki doesn't know ### Add trait to unit leader. -## scope = unit_leader +## scope = { character unit_leader } alias[effect:replace_unit_leader_trait] = replace_me ### Adds a max assignable trait slot for a general. diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index ac30196a..3980203e 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -1062,11 +1062,11 @@ alias[effect:set_country_leader_description] = { } ###Changes the name of unit leader. No tooltip is generated. -## scope = { unit_leader } +## scope = { unit_leader character } alias[effect:set_leader_name] = localisation_inline ###Changes the portrait of unit leader. No tooltip is generated. -## scope = { unit_leader } +## scope = { unit_leader character } alias[effect:set_leader_portrait] = ###Changes the description of unit leader. No tooltip is generated. diff --git a/Config/triggers.cwt b/Config/triggers.cwt index afb36df0..07c6e850 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -1824,23 +1824,23 @@ alias[trigger:has_border_war_with] = scope[country] alias[trigger:has_border_war_with] = enum[country_tags] ### Compares the average stats for a unit leader. -## scope = { unit_leader combat } +## scope = { unit_leader combat character } alias[trigger:average_stats] = int ### Compares attack skill level of a unit leader. -## scope = { unit_leader combat } +## scope = { unit_leader combat character } alias[trigger:attack_skill_level] = int ### Compares defense skill level of a unit leader. -## scope = { unit_leader combat } +## scope = { unit_leader combat character } alias[trigger:defense_skill_level] = int ### Compares logistics skill level of a unit leader. -## scope = { unit_leader combat } +## scope = { unit_leader combat character } alias[trigger:logistics_skill_level] = int ### Compares planning skill level of a unit leader. -## scope = { unit_leader combat } +## scope = { unit_leader combat character } alias[trigger:planning_skill_level] = int ### Is_leading_army_group = yes/no - Checks if the current unit leader is leading an army group (not single army). From edb7dad433f0998105e4279129b583dfbed2c2e4 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 20 Dec 2024 20:46:06 +0400 Subject: [PATCH 70/73] Advisor token is an optional argument --- Config/common/characters.cwt | 4 ++++ Config/effects_nsb.cwt | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Config/common/characters.cwt b/Config/common/characters.cwt index cddd8b03..c9206ad7 100644 --- a/Config/common/characters.cwt +++ b/Config/common/characters.cwt @@ -256,6 +256,8 @@ character = { name = localisation ## cardinality = 0..1 desc = localisation + ### Optional, defaults to _advisor_role + ## cardinality = 0..1 idea_token = value_set[advisor_token] ## replace_scope = { this = character root = country } ## cardinality = 0..1 @@ -509,6 +511,8 @@ character = { ## cardinality = 0..inf advisor = { slot = value[character_advisor_slot] + ### Optional, defaults to _advisor_role + ## cardinality = 0..1 idea_token = value_set[advisor_token] ## cardinality = 0..1 name = localisation diff --git a/Config/effects_nsb.cwt b/Config/effects_nsb.cwt index 5b0ced6a..53b2f222 100644 --- a/Config/effects_nsb.cwt +++ b/Config/effects_nsb.cwt @@ -366,6 +366,8 @@ alias[effect:add_advisor_role] = { activate = bool advisor = { slot = value[character_advisor_slot] + ### Optional, defaults to _advisor_role + ## cardinality = 0..1 idea_token = value_set[advisor_token] ## cardinality = 0..1 name = localisation @@ -823,6 +825,7 @@ alias[effect:generate_character] = { name = localisation ## cardinality = 0..1 desc = localisation + ### Optional, defaults to _advisor_role ## cardinality = 0..1 idea_token = value_set[advisor_token] ## replace_scope = { this = character root = country } From f89f4feac398614dbc91848f5e136e8611c346c2 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Fri, 20 Dec 2024 20:46:45 +0400 Subject: [PATCH 71/73] Update effects/triggers that push scope to unit leader, they support charaters as well --- Config/common/traits.cwt | 2 +- Config/effects.cwt | 12 ++++++------ Config/triggers.cwt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Config/common/traits.cwt b/Config/common/traits.cwt index 9c871a96..5c1fcfc0 100644 --- a/Config/common/traits.cwt +++ b/Config/common/traits.cwt @@ -86,7 +86,7 @@ country_leader_trait = { command_cap = enum[command_cap] } -## push_scope = unit_leader +## push_scope = { unit_leader character } unit_leader_trait = { type = enum[unit_leader_types] type = { diff --git a/Config/effects.cwt b/Config/effects.cwt index 94370a3b..c0941219 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -2391,7 +2391,7 @@ alias[effect:set_war_support] = variable_field[0..1] ### Executes children effects on random unit leader that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:random_unit_leader] = { ## cardinality = 0..1 limit = { @@ -2405,7 +2405,7 @@ alias[effect:random_unit_leader] = { ### Executes children effects on unit leaders that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:every_unit_leader] = { ### Apply the effect to this number of randomly selected entities ## cardinality = 0..1 @@ -2424,7 +2424,7 @@ alias[effect:every_unit_leader] = { ### Executes children effects on random army leader that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:random_army_leader] = { ## cardinality = 0..1 limit = { @@ -2438,7 +2438,7 @@ alias[effect:random_army_leader] = { ### Executes children effects on army leaders that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:every_army_leader] = { ### Apply the effect to this number of randomly selected entities ## cardinality = 0..1 @@ -2457,7 +2457,7 @@ alias[effect:every_army_leader] = { ### Executes children effects on random navy leader that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:random_navy_leader] = { ## cardinality = 0..1 limit = { @@ -2471,7 +2471,7 @@ alias[effect:random_navy_leader] = { ### Executes children effects on navy leaders that fulfills the "limit" trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[effect:every_navy_leader] = { ### Apply the effect to this number of randomly selected entities ## cardinality = 0..1 diff --git a/Config/triggers.cwt b/Config/triggers.cwt index 07c6e850..ba7e9ece 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -1565,7 +1565,7 @@ alias[trigger:has_war_support] = variable_field_32 ### Check if all unit leaders meets the trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[trigger:all_unit_leader] = { ## cardinality = 0..1 tooltip = localisation @@ -1574,7 +1574,7 @@ alias[trigger:all_unit_leader] = { ### Check if any unit leader meets the trigger. ## scope = country -## push_scope = unit_leader +## push_scope = { unit_leader character } alias[trigger:any_unit_leader] = { ## cardinality = 0..1 tooltip = localisation From 9368e144778c265b0e0a1599300c0e561197a149 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sat, 4 Jan 2025 04:28:45 +0400 Subject: [PATCH 72/73] Demote scripted loc errors to info Loc keys that are vaild but not supported by cwtools cause false positive warnings --- Config/common/scripted_effects_locs_and_triggers.cwt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Config/common/scripted_effects_locs_and_triggers.cwt b/Config/common/scripted_effects_locs_and_triggers.cwt index f7e08b2e..c4925cf9 100644 --- a/Config/common/scripted_effects_locs_and_triggers.cwt +++ b/Config/common/scripted_effects_locs_and_triggers.cwt @@ -37,6 +37,10 @@ scripted_loc = { localization_key = character_name| ## cardinality = 0..1 localization_key = tech_effect| + ## error_if_only_match = This key is not found by CWTools - please check that it is actually defined + ## severity = info + ## cardinality = 0..1 + localization_key = scalar ## cardinality = 0..1 random_list = { ## cardinality = 1..inf @@ -46,6 +50,10 @@ scripted_loc = { localization_key = localization_key = character_name| localization_key = tech_effect| + ## error_if_only_match = This key is not found by CWTools - please check that it is actually defined + ## severity = info + ## cardinality = 0..1 + localization_key = scalar } } } From 4936183565a7b95a1100e81a199d57b3874e4892 Mon Sep 17 00:00:00 2001 From: Pelmen323 Date: Sun, 5 Jan 2025 14:18:05 +0400 Subject: [PATCH 73/73] Update `country_leader_trait` code --- Config/common/traits.cwt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Config/common/traits.cwt b/Config/common/traits.cwt index 5c1fcfc0..c12b442d 100644 --- a/Config/common/traits.cwt +++ b/Config/common/traits.cwt @@ -69,6 +69,14 @@ country_leader_trait = { alias_name[naval_stat] = alias_match_left[naval_stat] alias_name[air_stat] = alias_match_left[air_stat] } + ## cardinality = 0..inf + = { + ## cardinality = 0..1 + instant = bool + alias_name[unit_stat] = alias_match_left[unit_stat] + alias_name[naval_stat] = alias_match_left[naval_stat] + alias_name[air_stat] = alias_match_left[air_stat] + } } ## cardinality = 0..inf # targeted_modifier = single_alias_right[targeted_modifier]