diff --git a/Config/common/military_industrial_organizations.cwt b/Config/common/military_industrial_organizations.cwt index c1339ddd..cfff7629 100644 --- a/Config/common/military_industrial_organizations.cwt +++ b/Config/common/military_industrial_organizations.cwt @@ -118,7 +118,7 @@ military_industrial_organization = { ## cardinality = 0..1 initial_trait = { ## cardinality = 0..1 - token = value_set[mio_token] + token = value_set[mio_trait_token] ## cardinality = 0..1 name = scalar ## cardinality = 0..1 @@ -151,7 +151,7 @@ military_industrial_organization = { ## cardinality = 0..inf trait = { - token = value_set[mio_token] + token = value_set[mio_trait_token] ### Same naming rules as with MIO itself ## cardinality = 0..1 name = scalar @@ -169,7 +169,7 @@ military_industrial_organization = { parent = { traits = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The number of parents that needs to be unlocked, default 1 ## cardinality = 0..1 @@ -179,13 +179,13 @@ military_industrial_organization = { ## cardinality = 0..inf any_parent = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### Short hand for "parent = { traits = { parent traits } num_parents_needed = N }" where N is the number of parent traits ## cardinality = 0..inf all_parents = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The trait can be mutually exclusive with another (or more) @@ -193,7 +193,7 @@ military_industrial_organization = { ## cardinality = 0..1 mutually_exclusive = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ## cardinality = 0..1 @@ -245,7 +245,7 @@ military_industrial_organization = { ### By default position is the absolute coordinate in the tree grid. ### If relative_position_id is provided, it becomes a delta applied to the input trait position ## cardinality = 0..1 - relative_position_id = value[mio_token] + relative_position_id = value[mio_trait_token] ### AI weight modifier for this trait. ### Warning : if the trait is part of a central tree, the trait's ai_will_do will override the central tree's! @@ -300,7 +300,7 @@ military_industrial_organization = { ### Use this parameter to add traits when inheriting another MIO's tree ## cardinality = 0..inf add_trait = { - token = value_set[mio_token] + token = value_set[mio_trait_token] ### Same naming rules as with MIO itself ## cardinality = 0..1 name = scalar @@ -318,7 +318,7 @@ military_industrial_organization = { parent = { traits = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The number of parents that needs to be unlocked, default 1 ## cardinality = 0..1 @@ -328,13 +328,13 @@ military_industrial_organization = { ## cardinality = 0..inf any_parent = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### Short hand for "parent = { traits = { parent traits } num_parents_needed = N }" where N is the number of parent traits ## cardinality = 0..inf all_parents = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The trait can be mutually exclusive with another (or more) @@ -342,7 +342,7 @@ military_industrial_organization = { ## cardinality = 0..1 mutually_exclusive = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ## cardinality = 0..1 @@ -394,7 +394,7 @@ military_industrial_organization = { ### By default position is the absolute coordinate in the tree grid. ### If relative_position_id is provided, it becomes a delta applied to the input trait position ## cardinality = 0..1 - relative_position_id = value[mio_token] + relative_position_id = value[mio_trait_token] ### AI weight modifier for this trait. ### Warning : if the trait is part of a central tree, the trait's ai_will_do will override the central tree's! @@ -410,12 +410,12 @@ military_industrial_organization = { ## cardinality = 0..inf remove_trait = { ## cardinality = ~1..inf - value[mio_token] + value[mio_trait_token] } ### Override specific trait when inheriting another MIO's tree ## cardinality = 0..inf override_trait = { - token = value[mio_token] + token = value[mio_trait_token] ### Same naming rules as with MIO itself ## cardinality = 0..1 name = scalar @@ -433,7 +433,7 @@ military_industrial_organization = { parent = { traits = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The number of parents that needs to be unlocked, default 1 ## cardinality = 0..1 @@ -443,13 +443,13 @@ military_industrial_organization = { ## cardinality = 0..inf any_parent = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### Short hand for "parent = { traits = { parent traits } num_parents_needed = N }" where N is the number of parent traits ## cardinality = 0..inf all_parents = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ### The trait can be mutually exclusive with another (or more) @@ -457,7 +457,7 @@ military_industrial_organization = { ## cardinality = 0..1 mutually_exclusive = { ## cardinality = 1..inf - value[mio_token] + value[mio_trait_token] } ## cardinality = 0..1 @@ -510,7 +510,7 @@ military_industrial_organization = { ### By default position is the absolute coordinate in the tree grid. ### If relative_position_id is provided, it becomes a delta applied to the input trait position ## cardinality = 0..1 - relative_position_id = value[mio_token] + relative_position_id = value[mio_trait_token] ### AI weight modifier for this trait. ### Warning : if the trait is part of a central tree, the trait's ai_will_do will override the central tree's! diff --git a/Config/effects.cwt b/Config/effects.cwt index 2e8cbff3..b5f46fac 100644 --- a/Config/effects.cwt +++ b/Config/effects.cwt @@ -2770,19 +2770,51 @@ alias[effect:clamp_temp_variable] = { ### Start a border war between two states. ## scope = { state country } alias[effect:start_border_war] = { + ### Overrides the transfer of state at the end of war change_state_after_war = bool + ### Combat width for border war + ## cardinality = 0..1 + combat_width = int + ### Minimum duration for combat + ## cardinality = 0..1 + minimum_duration_in_days = int attacker = { + ### State to start border war state = scope[state] state = + ### Number of provinces we want border war to be num_provinces = int[1..100] on_win = on_lose = ## cardinality = ~0..1 on_cancel = + ### Score for selecting a leader + ## cardinality = 0..1 + leader_score = { + ## cardinality = 0..1 + base = variable_field + ## cardinality = 0..inf + enum[add_factor] = float + ## cardinality = 0..inf + modifier = { + ## cardinality = ~1..inf + alias_name[trigger] = alias_match_left[trigger] + ## cardinality = ~1..1 + enum[add_factor] = float + } + } + ### Dig in modifier factor (default value: 1.0) + ## cardinality = 0..1 + dig_in_factor = float + ### Terrain modifier factor (default value: 1.0) + ## cardinality = 0..1 + terrain_factor = float } defender = { + ### State to start border war state = scope[state] state = + ### Number of provinces we want border war to be num_provinces = int[1..100] on_win = on_lose = diff --git a/Config/effects_aat.cwt b/Config/effects_aat.cwt index fa218d6b..63c5859b 100644 --- a/Config/effects_aat.cwt +++ b/Config/effects_aat.cwt @@ -17,60 +17,117 @@ alias[effect:every_military_industrial_organization] = { alias_name[effect] = alias_match_left[effect] } -### Unlock MIO trait tooltip +### Display a tooltip saying the trait is made available (aka unlocked) ## scope = military_industrial_organization -alias[effect:unlock_mio_trait_tooltip] = value[mio_token] +alias[effect:unlock_mio_trait_tooltip] = value[mio_trait_token] -### Unlock MIO trait tooltip +### Display a tooltip saying the trait is made available (aka unlocked) ## scope = military_industrial_organization alias[effect:unlock_mio_trait_tooltip] = { - trait = value[mio_token] - ## cardinality = 0..1 - show_modifiers = bool + trait = value[mio_trait_token] + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + show_modifiers = yes + ## cardinality = 0..1 + show_modifiers = no } -### Increase MIO funds gain factor +### Add to the factor applied when gaining funds in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised) ## scope = military_industrial_organization alias[effect:add_mio_funds_gain_factor] = variable_field -### Increase MIO size (level) +### Add size levels to the military industrial organization in scope. Input value cannot be negative. The MIO will keep the same amount of funds it had before the effect ## scope = military_industrial_organization -alias[effect:add_mio_size] = int_variable_field +alias[effect:add_mio_size] = int_variable_field[1..inf] -### Increase MIO research bonus +### Add to the research bonus in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce research bonus but final research bonus cannot be negative (capped at 0, no error raised) ## scope = military_industrial_organization alias[effect:add_mio_research_bonus] = variable_field -### Complete specific MIO trait. Make sure the trait is actually available for current MIO +### Complete a trait in the military industrial organization in scope. This effect will not take into account the current state of the trait tree and will allow you to unlock a trait even if the one before is not unlocked. Will also add 1 size to the MIO so that size and numbers of unlocked traits are always aligned ## scope = military_industrial_organization -alias[effect:complete_mio_trait] = value[mio_token] +alias[effect:complete_mio_trait] = value[mio_trait_token] + +### Complete a trait in the military industrial organization in scope. This effect will not take into account the current state of the trait tree and will allow you to unlock a trait even if the one before is not unlocked. Will also add 1 size to the MIO so that size and numbers of unlocked traits are always aligned +## scope = military_industrial_organization +alias[effect:complete_mio_trait] = { + trait = value[mio_trait_token] + ## error_if_only_match = This is the default value and can be omitted + ## severity = info + ## cardinality = 0..1 + show_modifiers = yes + ## cardinality = 0..1 + show_modifiers = no +} -### Change MIO political power assign cost to research tech (base - 0.1 pp daily) +### Add percentage to the daily PP cost to assign to research in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised). 0.1 - 10% increase ## scope = military_industrial_organization alias[effect:add_mio_design_team_assign_cost] = variable_field -### Has no effect? +### Set the daily PP cost to assign to research in the military industrial organization in scope.This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = military_industrial_organization +alias[effect:set_mio_design_team_assign_cost] = variable_field[0..inf] + +### Add percentage to the daily PP cost to assign to production line in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised). 0.1 - 10% increase +## scope = military_industrial_organization +alias[effect:add_mio_industrial_manufacturer_assign_cost] = variable_field + +### Set the daily PP cost to assign to production line in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = military_industrial_organization +alias[effect:set_mio_industrial_manufacturer_assign_cost] = variable_field[0..inf] + +### Add percentage to the XP cost to change MIO in equipment designer for the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised). !!! NOTE that the result is rounded down so that i.e. 5 + 10% is still 5 = 5.5 rounded down !!! ## scope = military_industrial_organization alias[effect:add_mio_design_team_change_cost] = variable_field -### Add MIO funds. Level 1 -> Level 2 to costs 1k, costs increase per each level +### Set the XP cost to change MIO in equipment designer for the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = military_industrial_organization +alias[effect:set_mio_design_team_change_cost] = variable_field[0..inf] + +### Add funds to the military industrial organization in scope. Value can be negative to substract funds.If the new total funds go over the Size Up limit, the MIO will gain size(s). If the new total funds is negative, it will be capped at 0 without retracting size. Default Level 1 -> Level 2 to costs 1k, costs increase per each level ## scope = military_industrial_organization alias[effect:add_mio_funds] = variable_field -### Display a tooltip of provided MIO +### Set the amount of funds for the military industrial organization in scope. Input value cannot be negative. If the new total funds go over the Size Up limit, the MIO will gain size(s) +## scope = military_industrial_organization +alias[effect:set_mio_funds] = variable_field + +### Set the factor applied when gaining funds in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative. Base - 1? +## scope = military_industrial_organization +alias[effect:set_mio_funds_gain_factor] = variable_field[0..inf] + +### Add to the factor applied to funds required to size up in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce assign cost but final value cannot be negative (capped at 0, no error raised) +## scope = military_industrial_organization +alias[effect:add_mio_size_up_requirement_factor] = variable_field + +### Set to the factor applied to funds required to size up in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = military_industrial_organization +alias[effect:set_mio_size_up_requirement_factor] = variable_field[0..inf] + +### Display a tooltip saying the MIO is made available (aka unlocked). Accepts MIO token, variables or keywords ## scope = country alias[effect:unlock_military_industrial_organization_tooltip] = mio: -### Display a tooltip of provided MIO +### Display a tooltip saying the MIO is made available (aka unlocked). Accepts MIO token, variables or keywords +## scope = country +alias[effect:unlock_military_industrial_organization_tooltip] = value[variable] + +### Show the name of the input MIO with the name of the initial trait (if any) ## scope = country alias[effect:show_mio_tooltip] = -### Displays a tooltip that says that the policy is made available. +### Show the name of the input MIO with the name of the initial trait (if any) +## scope = country +alias[effect:show_mio_tooltip] = value[variable] + +### Display a tooltip saying the MIO policy is made available (aka unlocked) ## scope = country -alias[unlock_mio_policy_tooltip] = -### Displays a tooltip that says that the policy is made available. +alias[effect:unlock_mio_policy_tooltip] = + +### Display a tooltip saying the MIO policy is made available (aka unlocked) ## scope = country -alias[unlock_mio_policy_tooltip] = { +alias[effect:unlock_mio_policy_tooltip] = { policy = ## error_if_only_match = This is the default value and can be omitted ## severity = info @@ -80,6 +137,34 @@ alias[unlock_mio_policy_tooltip] = { show_modifiers = no } +### Add to the base cost (in PP) for attaching a policy in the MIO policy, found in country in scope with input policy token. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce cost, but final cost cannot be negative (capped at 0, no error raised) +## scope = country +alias[effect:add_mio_policy_cost] = { + policy = + value = int_variable_field +} + +### Set the base cost (in PP) for attaching a policy in the MIO policy, found in country in scope with input policy token. This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = country +alias[effect:set_mio_policy_cost] = { + policy = + value = int_variable_field[0..inf] +} + +### Add to the base cooldown (in days) after attaching a policy in the MIO policy, found in country in scope with input policy token. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce cost, but final cooldown cannot be negative (capped at 0, no error raised) +## scope = country +alias[effect:add_mio_policy_cooldown] = { + policy = + value = int_variable_field +} + +### Set the base cooldown (in days) after attaching a policy in the MIO policy, found in country in scope with input policy token. This changes the base value. Modifiers will still apply over it. Input value cannot be negative +## scope = country +alias[effect:set_mio_policy_cooldown] = { + policy = + value = int_variable_field[0..inf] +} + ### Add CIC funds to the tag ## scope = country alias[effect:add_cic] = variable_field @@ -106,53 +191,61 @@ alias[effect:add_equipment_subsidy] = { } } -### Change MIO name +### Set the localisation key used to generate the name of the military industrial organization in scope. The localisation key may be a scripted localisation (triggers evaluated in MIO scope) ## scope = military_industrial_organization alias[effect:set_mio_name_key] = localisation -### Change MIO icon +### Set the localisation key used to generate the name of the military industrial organization in scope. The localisation key may be a scripted localisation (triggers evaluated in MIO scope) +## scope = military_industrial_organization +alias[effect:set_mio_name_key] = + +### Set the icon GFX for the military industrial organization in scope ## scope = military_industrial_organization alias[effect:set_mio_icon] = -### Set mio flag +### Set flag in the military industrial organization in scope ## scope = military_industrial_organization alias[effect:set_mio_flag] = value_set[mio_flag] -### Set mio flag. +### Set flag in the military industrial organization in scope ## scope = military_industrial_organization alias[effect:set_mio_flag] = { flag = value_set[mio_flag] + ### Default - 1 ## cardinality = 0..1 value = int + ### Default = 0. if > 0, the flag will be deleted after this number of days ## cardinality = 0..1 days = int } -### Modify mio flag. +### Modify the matching flag in the military industrial organization in scope. Happens only if the flag already exists ## scope = military_industrial_organization alias[effect:modify_mio_flag] = { flag = value[mio_flag] + ### Default = 0. Will be added to the current value ## cardinality = 0..1 value = int + ### Default = 0. if > 0, the flag will be deleted after this number of days ## cardinality = 0..1 days = int } -### Clear mio flag +### Clear the matching flag in the military industrial organization in scope ## scope = military_industrial_organization alias[effect:clr_mio_flag] = value[mio_flag] -### Set mio funds gain factor +### Set the research bonus in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative ## scope = military_industrial_organization -alias[effect:set_mio_funds_gain_factor] = variable_field +alias[effect:set_mio_research_bonus] = variable_field[0..inf] -### Set mio research bonus +### Set the maximum task capacity in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Input value cannot be negative. If the capacity is reduced and the MIO becomes over-assigned, the current tasks will be allowed. It's only later that the player will feel the new restrictions ## scope = military_industrial_organization -alias[effect:set_mio_research_bonus] = variable_field +alias[effect:set_mio_task_capacity] = int_variable_field[0..inf] -### Set mio design team assign cost +### Add to the maximum task capacity in the military industrial organization in scope. This changes the base value. Modifiers will still apply over it. Value can be negative to reduce capacity, but final capacity cannot be negative (capped at 0, no error raised). If the capacity is reduced and the MIO becomes over-assigned, the current tasks will be allowed. It's only later that the player will feel the new restrictions ## scope = military_industrial_organization -alias[effect:set_mio_design_team_assign_cost] = variable_field +alias[effect:add_mio_task_capacity] = int_variable_field ### Give market access to x ## scope = country diff --git a/Config/effects_new.cwt b/Config/effects_new.cwt index 40f137ac..c1842725 100644 --- a/Config/effects_new.cwt +++ b/Config/effects_new.cwt @@ -951,7 +951,7 @@ alias[effect:modulo_temp_variable] = { ###mMdulos a temp variable with another. ## scopes = { any } -alias[trigger:modulo_temp_variable] = { +alias[effect:modulo_temp_variable] = { var = value_set[variable] value = variable_field_32 } @@ -964,7 +964,7 @@ alias[effect:modulo_variable] = { ###Modulos a variable with another. ## scopes = { any } -alias[trigger:modulo_variable] = { +alias[effect:modulo_variable] = { var = value_set[variable] value = variable_field_32 } diff --git a/Config/triggers.cwt b/Config/triggers.cwt index 50f9ca09..b8d9189b 100644 --- a/Config/triggers.cwt +++ b/Config/triggers.cwt @@ -1190,7 +1190,7 @@ alias[trigger:has_non_aggression_pact_with] = enum[country_tags] ### Compares the number of members in the faction for the current country. ## scope = country -alias[trigger:num_faction_members] = int +alias[trigger:num_faction_members] = variable_field ### Compares the estimated army strength between the scope country and all its enemies. ## scope = country diff --git a/Config/triggers_aat.cwt b/Config/triggers_aat.cwt index 1b8157b6..da986ff9 100644 --- a/Config/triggers_aat.cwt +++ b/Config/triggers_aat.cwt @@ -7,19 +7,19 @@ alias[trigger:is_one_state_island] = bool ## scope = military_industrial_organization alias[trigger:is_military_industrial_organization] = -### Checks the size of the MIO +### Make comparaison on the size of the military industrial organization in the scope. Can use < or > to compare the value with either a fixed value or with a variable ## scope = military_industrial_organization -alias[trigger:has_mio_size] = int[1..inf] +alias[trigger:has_mio_size] = variable_field -### Checks if MIO is affecting specific equipment +### Checks if the Military Industrial Organisation in scope has the input equipment type (possible values can be found in script_enum_equipment_bonus_type and in common/equipment_groups) ## scope = military_industrial_organization alias[trigger:has_mio_equipment_type] = enum[equipment_bonus_type] -### Checks if MIO is affecting specific equipment +### Checks if the Military Industrial Organisation in scope has the input equipment type (possible values can be found in script_enum_equipment_bonus_type and in common/equipment_groups) ## scope = military_industrial_organization alias[trigger:has_mio_equipment_type] = -### Checks if MIO is affecting specific equipment +### Checks if the Military Industrial Organisation in scope has the input equipment type (possible values can be found in script_enum_equipment_bonus_type and in common/equipment_groups) ## scope = military_industrial_organization alias[trigger:has_mio_equipment_type] = @@ -31,25 +31,51 @@ alias[trigger:has_military_industrial_organization] = to compare the value with either a fixed value or from a variable ## scope = military_industrial_organization -alias[trigger:has_mio_number_of_completed_traits] = int +alias[trigger:has_mio_number_of_completed_traits] = variable_field ### Checks num of planes stationed in a region ## scope = country @@ -61,11 +87,11 @@ alias[trigger:num_planes_stationed_in_regions] = { } } -### Checks mio flag +### Check if flag has been set within the military industrial organization in scope. May checks on the value or date/days since last modified date ## scope = military_industrial_organization alias[trigger:has_mio_flag] = value[mio_flag] -### Checks mio flag +### Check if flag has been set within the military industrial organization in scope. May checks on the value or date/days since last modified date ## scope = military_industrial_organization alias[trigger:has_mio_flag] = { flag = value[mio_flag] @@ -74,3 +100,23 @@ alias[trigger:has_mio_flag] = { ## cardinality = 0..1 days = int } + +### Checks if the Military Industrial Organisation in scope has an allowed policy matching the input token +## scope = military_industrial_organization +alias[trigger:has_mio_policy] = + +### Checks if the Military Industrial Organisation in scope has the input research category +## scope = military_industrial_organization +alias[trigger:has_mio_research_category] = enum[tech_category] + +### Checks if the Military Industrial Organisation in scope has the input research category +## scope = military_industrial_organization +alias[trigger:has_mio_research_category] = + +### Checks if the Military Industrial Organisation in scope has the input research category +## scope = military_industrial_organization +alias[trigger:has_mio_research_category] = + +### Checks if the Military Industrial Organisation in scope has an allowed matching the input token, which is currently attached to the MIO +## scope = military_industrial_organization +alias[trigger:has_mio_policy_active] = diff --git a/Config/triggers_toa.cwt b/Config/triggers_toa.cwt index facffbce..87b6e646 100644 --- a/Config/triggers_toa.cwt +++ b/Config/triggers_toa.cwt @@ -6,5 +6,6 @@ alias[trigger:longest_war_length] = int ## scope = country alias[trigger:war_length_with] = { tag = enum[country_tags] + tag = scope[country] months = int } diff --git a/Config/variables.cwt b/Config/variables.cwt index 8c97597a..f86c0b53 100644 --- a/Config/variables.cwt +++ b/Config/variables.cwt @@ -1129,5 +1129,8 @@ values = { # ======================== ### How faster is tech researching with mio assigned research_bonus + + ### Current number of funds MIO has access to + funds } }