Skip to content

Commit

Permalink
Merge pull request #199 from Kaiserreich/master
Browse files Browse the repository at this point in the history
Update Hoi4 CWTools config - modules/particles/misc
  • Loading branch information
Pelmen323 authored Jun 27, 2024
2 parents 7bfd8fc + ed75a5d commit 3e06501
Show file tree
Hide file tree
Showing 12 changed files with 214 additions and 74 deletions.
7 changes: 5 additions & 2 deletions Config/common/ai_strategy.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,17 @@ ai_strategy_plan = {

alias[ai_strategy_rule:ai_strategy] = {
type = enum[ai_role_strats]
id = value[ai_roles]
id = value[ai_template_roles]
id = value[ai_equipment_roles]
value = int
}

alias[ai_strategy_rule:ai_strategy] = {
type = enum[unit_strats]
id = <unit>
id = enum[unit_types]
id = value[ai_roles]
id = value[ai_template_roles]
id = value[ai_equipment_roles]
value = int
}
alias[ai_strategy_rule:ai_strategy] = {
Expand Down Expand Up @@ -418,6 +420,7 @@ enums = {
wanted_supply_trucks
min_wanted_supply_trains
wanted_supply_trains
ai_wanted_divisions_factor
equipment_market_spend_factories
}
enum[pp_strats] = {
Expand Down
9 changes: 5 additions & 4 deletions Config/common/consolidated_ai.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ 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_roles]
value_set[ai_template_roles]
}
# Restricts the template to only the specified tags. Optional.
## cardinality = 0..1
Expand Down Expand Up @@ -299,7 +299,7 @@ ai_equipment_design_group = {

### List of roles that this design group can be used for. AI will attempt to design and produce equipment to satisfy all roles that it can. So it will try to actively use one design per role for new production and upgrading/refitting. Roles here are dynamically generated and should work with role_ratio.
roles = {
value_set[ai_roles]
value_set[ai_equipment_roles]
}

### Base priority for creating a design in this group or for creating or upgrading equipment to use one of these designs. A higher number means higher priority.
Expand Down Expand Up @@ -427,7 +427,7 @@ ai_equipment_design_group = {
}

values = {
value[ai_roles] = {
value[ai_template_roles] = {
# infantry
infantry
anti_tank
Expand All @@ -451,7 +451,8 @@ values = {
medium_armor
heavy_armor
modern_armor

}
value[ai_equipment_roles] = {
# planes
fighter
cas
Expand Down
45 changes: 26 additions & 19 deletions Config/common/equipment.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,30 @@ module = {
## cardinality = 0..1
gui_category = enum[module_categories]
## cardinality = 0..1
gui_category = plane_special_module_electronics
## cardinality = 0..1
parent = <module>
## cardinality = 0..1
gfx = scalar
## cardinality = 0..1
sfx = scalar
## cardinality = 0..1
allow_equipment_type = enum[unit_types]
## cardinality = 0..1
forbid_equipment_type_exact_match = enum[unit_types]
## cardinality = 0..1
forbid_equipment_type = enum[unit_types]
## cardinality = 0..1
forbid_equipment_type = {
## cardinality = ~1..inf
enum[unit_types]
}
## cardinality = 0..1
forbid_equipment_type_exact_match_for_category = {
## cardinality = ~1..inf
enum[module_categories] = enum[unit_types]
}
## cardinality = 0..1
add_equipment_type = enum[unit_types]
## cardinality = 0..1
add_equipment_type = {
Expand All @@ -452,11 +470,8 @@ module = {
## cardinality = 0..1
### Adds the provided stats to the given module
add_stats = {
alias_name[unit_stat] = alias_match_left[naval_stat]
alias_name[naval_stat] = alias_match_left[naval_stat]
alias_name[air_stat] = alias_match_left[air_stat]
## cardinality = 0..1
build_cost_ic = float
## cardinality = ~1..inf
enum[equipment_stat] = float
}

## cardinality = 0..1
Expand All @@ -471,18 +486,17 @@ module = {
}
## cardinality = 0..1
add_average_stats = {
alias_name[unit_stat] = alias_match_left[naval_stat]
alias_name[naval_stat] = alias_match_left[naval_stat]
alias_name[air_stat] = alias_match_left[air_stat]
## cardinality = ~1..inf
enum[equipment_stat] = float
}
## cardinality = 0..10
## cardinality = 0..inf
multiply_stats = {
alias_name[unit_stat] = alias_match_left[naval_stat]
alias_name[naval_stat] = alias_match_left[naval_stat]
alias_name[air_stat] = alias_match_left[air_stat]
## cardinality = ~1..inf
enum[equipment_stat] = float
}
## cardinality = 0..1
forbid_module_categories = {
## cardinality = ~1..inf
enum[module_categories]
}
## cardinality = 0..10
Expand Down Expand Up @@ -562,13 +576,6 @@ module = {
}
}

## cardinality = 0..1
### Prevents equipment module from being added to a specific plane airframe type
forbid_equipment_type_exact_match_for_category = {
## cardinality = 0..inf
enum[module_categories] = enum[unit_types]
}

## cardinality = 0..1
xp_cost = int
}
Expand Down
34 changes: 26 additions & 8 deletions Config/common/peace_conference.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@ peace_action_categories = {

peace_ai_desires = {
peace_action_type = enum[peace_action]
peace_action_type = {
## cardinality 1..4
enum[peace_action]
}
# Cardinality magically stops working here, had to improvise. cardinality 1..4
peace_action_type = { enum[peace_action] }
peace_action_type = { take_states puppet }
peace_action_type = { take_states force_government }
peace_action_type = { take_states liberate }
peace_action_type = { puppet force_government }
peace_action_type = { puppet liberate }
peace_action_type = { force_government liberate }
peace_action_type = { take_states puppet force_government }
peace_action_type = { take_states puppet liberate }
peace_action_type = { take_states force_government liberate }
peace_action_type = { puppet force_government liberate }
peace_action_type = { take_states puppet force_government liberate }
### ROOT - Negotiator country (who is doing the negotiation)
### FROM - Taker country (who will be the owner after the conference)
### FROM.FROM - Giver country (who was the owner before the conference)
Expand All @@ -49,10 +58,19 @@ peace_ai_desires = {
peace_action_modifiers = {
category = <peace_action_categories>
peace_action_type = enum[peace_action]
peace_action_type = {
## cardinality 1..4
enum[peace_action]
}
# Cardinality magically stops working here, had to improvise. cardinality 1..4
peace_action_type = { enum[peace_action] }
peace_action_type = { take_states puppet }
peace_action_type = { take_states force_government }
peace_action_type = { take_states liberate }
peace_action_type = { puppet force_government }
peace_action_type = { puppet liberate }
peace_action_type = { force_government liberate }
peace_action_type = { take_states puppet force_government }
peace_action_type = { take_states puppet liberate }
peace_action_type = { take_states force_government liberate }
peace_action_type = { puppet force_government liberate }
peace_action_type = { take_states puppet force_government liberate }
### ROOT - Negotiator country (who is doing the negotiation)
### FROM - Taker country (who will be the owner after the conference)
### FROM.FROM - Giver country (who was the owner before the conference)
Expand Down
4 changes: 1 addition & 3 deletions Config/common/technologies.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@ technology = {
battalion_mult = {
## cardinality = 1..inf
category = enum[unit_category]
## cardinality = 0..inf
## cardinality = 1..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
add = bool
}
Expand Down
4 changes: 1 addition & 3 deletions Config/common/units.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,8 @@ unit = {
battalion_mult = {
## cardinality = 1..inf
category = enum[unit_category]
## cardinality = 0..inf
## cardinality = 1..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
add = bool
}
Expand Down
15 changes: 12 additions & 3 deletions Config/effects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,8 @@ alias[effect:declare_war_on] = {
## cardinality = 0..inf
<state>
}
## cardinality = 0..1
generator = value[array]
}

# not used in vanilla or documented in wiki
Expand Down Expand Up @@ -1538,7 +1540,12 @@ alias[effect:diplomatic_relation] = {

### Shows just tooltip of effects.
## scope = any
alias[effect:effect_tooltip] = { alias_name[effect] = alias_match_left[effect] }
alias[effect:effect_tooltip] = {
### You can show unit leader event names in effect_tooltip via 'country_event'
## cardinality = 0..1
country_event = <event.unit_leader_event>
alias_name[effect] = alias_match_left[effect]
}

### Adds resource production to state.
## scope = country
Expand Down Expand Up @@ -3591,7 +3598,8 @@ alias[effect:set_convoys] = int
## scope = country
alias[effect:add_ai_strategy] = {
type = enum[ai_role_strats]
id = value[ai_roles]
id = value[ai_template_roles]
id = value[ai_equipment_roles]
value = int
}

Expand All @@ -3601,7 +3609,8 @@ alias[effect:add_ai_strategy] = {
type = enum[unit_strats]
id = <unit>
id = enum[unit_types]
id = value[ai_roles]
id = value[ai_template_roles]
id = value[ai_equipment_roles]
value = int
}

Expand Down
16 changes: 4 additions & 12 deletions Config/gfx/model_entities.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -332,49 +332,41 @@ enums = {
a_1_bomb
a_1_crash
a_1_fire
a_1_fire
a_1_idle
a_1_firebomb
a_1_idle
a_1_supply
a_2_bomb
a_2_crash
a_2_fire
a_2_fire
a_2_idle
a_2_firebomb
a_2_idle
a_2_supply
a_3_bomb
a_3_crash
a_3_fire
a_3_idle
a_3_firebomb
a_3_idle
a_3_supply
a_bomb
a_crash
a_explode
a_fire
a_fire
a_idle
a_firebomb
a_idle
a_supply
d_1_crash
d_1_crash
d_1_fire
d_1_idle
d_2_crash
d_2_fire
d_2_fire
d_2_idle
d_2_idle
d_3_crash
d_3_fire
d_3_idle
d_bomb
d_crash
d_crash
d_fire
d_idle
d_idle
}

complex_enum[model_animations] = {
Expand Down
Loading

0 comments on commit 3e06501

Please sign in to comment.