Skip to content

Commit ce24a3e

Browse files
authored
Merge pull request #232 from Kaiserreich/master
Update Hoi4 CWTools config - NCNS update - 1.17.1 compatibility
2 parents 24cb4f6 + 949af2d commit ce24a3e

36 files changed

Lines changed: 335 additions & 1386 deletions

Config/common/ai_strategy.cwt

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ alias[ai_strategy_rule:ai_strategy] = {
168168
value = int
169169
}
170170
alias[ai_strategy_rule:ai_strategy] = {
171-
type = area_priority
171+
type = enum[ai_area_id_strats]
172172
id = <ai_area>
173173
value = int
174174
}
@@ -183,6 +183,11 @@ alias[ai_strategy_rule:ai_strategy] = {
183183
target = <ai_area>
184184
value = int
185185
}
186+
alias[ai_strategy_rule:ai_strategy] = {
187+
type = enum[ai_diplo_strats_no_value]
188+
id = enum[country_tags]
189+
id = scope[country]
190+
}
186191
alias[ai_strategy_rule:ai_strategy] = {
187192
type = recruit_scientist
188193
id = <specialization>
@@ -203,6 +208,12 @@ alias[ai_strategy_rule:ai_strategy] = {
203208
id = <strategic_region>
204209
value = int
205210
}
211+
alias[ai_strategy_rule:add_ai_strategy] = {
212+
type = naval_dominance
213+
id = <strategic_region>
214+
id = <ai_area>
215+
value = int
216+
}
206217
alias[ai_strategy_rule:ai_strategy] = {
207218
type = enum[strat_region_strats_without_value]
208219
id = <strategic_region>
@@ -342,6 +353,9 @@ alias[ai_strategy_rule:ai_strategy] = {
342353
alias_name[trigger] = alias_match_left[trigger]
343354
}
344355
value = int
356+
### Untested - be careful
357+
## cardinality = 0..1
358+
ratio = float
345359
}
346360
alias[ai_strategy_rule:ai_strategy] = {
347361
type = intelligence_agency_branch_desire_factor
@@ -504,6 +518,11 @@ enums = {
504518
support
505519
raid_target_country
506520
}
521+
enum[ai_diplo_strats_no_value] = {
522+
conquer
523+
antagonize
524+
befriend
525+
}
507526
enum[equipment_strats] = {
508527
equipment_variant_production_factor
509528
save_equipment
@@ -514,6 +533,7 @@ enums = {
514533
equipment_market_for_sale_factor
515534
equipment_market_min_for_sale
516535
equipment_market_max_for_sale
536+
equipment_market_spend_factories
517537
}
518538
enum[no_id_strats] = {
519539
added_military_to_civilian_factory_ratio
@@ -580,6 +600,10 @@ enums = {
580600
enum[strat_region_strats_without_value] = {
581601
strike_force_home_base
582602
}
603+
enum[ai_area_id_strats] = {
604+
naval_dominance
605+
area_priority
606+
}
583607
enum[state_strats] = {
584608
theatre_distribution_demand_increase
585609
factory_build_score_factor

Config/common/characters.cwt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ types = {
55
path_strict = yes
66
skip_root_key = any
77
subtype[instanced] = {
8-
## cardinality = ~2..inf
8+
## cardinality = ~1..inf
99
instance = {
1010

1111
}
@@ -21,7 +21,7 @@ types = {
2121
}
2222
}
2323
subtype[country_leader] = {
24-
## cardinality = ~2..inf
24+
## cardinality = ~1..inf
2525
instance = {
2626
## cardinality = 1..inf
2727
country_leader = {
@@ -36,7 +36,7 @@ types = {
3636
}
3737
## only_if_not = { field_marshal navy_leader }
3838
subtype[corps_commander] = {
39-
## cardinality = ~2..inf
39+
## cardinality = ~1..inf
4040
instance = {
4141
corps_commander = {
4242

@@ -51,7 +51,7 @@ types = {
5151
}
5252
## only_if_not = { corps_commander navy_leader }
5353
subtype[field_marshal] = {
54-
## cardinality = ~2..inf
54+
## cardinality = ~1..inf
5555
instance = {
5656
field_marshal = {
5757
}
@@ -65,7 +65,7 @@ types = {
6565
}
6666
## only_if_not = { corps_commander field_marshal }
6767
subtype[navy_leader] = {
68-
## cardinality = ~2..inf
68+
## cardinality = ~1..inf
6969
instance = {
7070
navy_leader = {
7171
}
@@ -84,7 +84,7 @@ types = {
8484
}
8585
}
8686
subtype[advisor] = {
87-
## cardinality = ~2..inf
87+
## cardinality = ~1..inf
8888
instance = {
8989
## cardinality = 1..inf
9090
advisor = {
@@ -350,7 +350,7 @@ character = {
350350
}
351351
subtype[instanced] = {
352352
### Character instance, for use on startup checks (i.e. has_dlc, and similar) to create alternate versions of a character, usually two
353-
## cardinality = ~2..inf
353+
## cardinality = ~1..inf
354354
instance = {
355355
## replace_scope = { this = character root = country }
356356
allowed = {

Config/common/consolidated_ai.cwt

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,10 @@ types = {
3030
type[ai_equipment_design_group] = {
3131
path = "game/common/ai_equipment"
3232
}
33-
type[ai_equipment_design] = {
34-
path = "game/common/ai_equipment"
35-
skip_root_key = any
36-
subtype[design] = {
37-
target_variant = {
38-
39-
}
40-
}
41-
}
4233
type[ai_faction_theater] = {
4334
path = "game/common/ai_faction_theaters"
4435
}
4536
}
46-
# complex_enum[ai_equipment_design] = {
47-
# path = "game/common/ai_equipment"
48-
# name = {
49-
# enum_name = {
50-
# target_variant = {
51-
# }
52-
# }
53-
# }
54-
# }
5537

5638
ai_area = {
5739
## cardinality = 0..1
@@ -269,14 +251,14 @@ ai_equipment_design_group = {
269251
### Exclusionary list of countries that will not use this design group.
270252
## cardinality = 0..1
271253
blocked_for = {
272-
## cardinality = ~1..inf
254+
## cardinality = 0..inf
273255
enum[country_tags]
274256
}
275257

276258
### Inclusionary list of countries that will use this design group. If this list is empty, all countries not in the block list will be allowed. If this list is not empty, only countries that are in this list and not in the blocked list will be allowed.
277259
## cardinality = 0..1
278260
available_for = {
279-
## cardinality = ~1..inf
261+
## cardinality = 0..inf
280262
enum[country_tags]
281263
}
282264

@@ -294,7 +276,7 @@ ai_equipment_design_group = {
294276

295277
### One or more specifications of designs belonging to this design group.
296278
## cardinality = 1..inf
297-
<ai_equipment_design.design> = {
279+
value_set[ai_equipment_design_option] = {
298280
### Further priority for creating this design specifically or for creating or upgrading equipment to use this design.
299281
priority = {
300282
## cardinality = 0..1
@@ -534,13 +516,4 @@ enums = {
534516
}
535517
}
536518
}
537-
complex_enum[ai_equipment_design] = {
538-
path = "game/common/ai_equipment"
539-
name = {
540-
enum_name = {
541-
target_variant = {
542-
}
543-
}
544-
}
545-
}
546519
}

Config/common/countries.cwt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
types = {
2-
# better to use a value_set with set_cosmetic_tag, since a cosmetic tag doesn't need to be defined in cosmetic.txt
3-
#type[cosmetic_tag] = {
4-
# path = "game/common/countries"
5-
# path_file = "cosmetic.txt"
6-
#}
72
type[country_file] = {
83
path = "game/common/countries"
94
type_per_file = yes
@@ -72,16 +67,6 @@ country_file = {
7267
}
7368
}
7469
}
75-
#cosmetic_tag = {
76-
# color = {
77-
# colour[rgb]
78-
# colour[hsv]
79-
# }
80-
# color_ui = {
81-
# colour[rgb]
82-
# colour[hsv]
83-
# }
84-
#}
8570
enums = {
8671
# country tags + country tag aliases
8772
complex_enum[country_tags] = {
@@ -99,13 +84,4 @@ enums = {
9984
enum_name = scalar
10085
}
10186
}
102-
#complex_enum[comsmetic_tags] = {
103-
# path = "game/common/countries"
104-
# path_file = "cosmetic.txt"
105-
# start_from_root = yes
106-
# name = {
107-
# enum_name = {
108-
# }
109-
# }
110-
#}
11187
}

Config/common/doctrine_grand_doctrines.cwt

Lines changed: 23 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ grand_doctrine = {
4242
description = localisation
4343
icon = <spriteType>
4444
xp_cost = int
45-
xp_type = enum[xp_type]
45+
xp_type = enum[experience_types]
4646

4747
## cardinality = 0..1
4848
available = {
@@ -72,6 +72,14 @@ grand_doctrine = {
7272
<doctrine_track>
7373
}
7474

75+
### Optional: unlimited by default
76+
## cardinality = 0..1
77+
max_track_rows = int
78+
79+
### Optional: unlimited by default
80+
## cardinality = 0..1
81+
max_track_columns = int #
82+
7583
#### Scripting Activation Effects - Sync this between Grand Doctrines, Milestones, Subdoctrines, Rewards
7684
### Any scripted effects
7785
## cardinality = 0..1
@@ -113,16 +121,7 @@ grand_doctrine = {
113121
alias_name[naval_stat] = alias_match_left[naval_stat]
114122
alias_name[air_stat] = alias_match_left[air_stat]
115123
## cardinality = 0..inf
116-
battalion_mult = {
117-
## cardinality = 1..inf
118-
category = enum[unit_category]
119-
## cardinality = 1..inf
120-
alias_name[unit_stat] = alias_match_left[unit_stat]
121-
## cardinality = 0..1
122-
add = bool
123-
## cardinality = 0..1
124-
display_as_percentage = bool
125-
}
124+
battalion_mult = single_alias_right[battalion_mult]
126125
}
127126
### Add unit stat bonuses - units
128127
## cardinality = 0..inf
@@ -131,16 +130,7 @@ grand_doctrine = {
131130
alias_name[naval_stat] = alias_match_left[naval_stat]
132131
alias_name[air_stat] = alias_match_left[air_stat]
133132
## cardinality = 0..inf
134-
battalion_mult = {
135-
## cardinality = 1..inf
136-
category = enum[unit_category]
137-
## cardinality = 1..inf
138-
alias_name[unit_stat] = alias_match_left[unit_stat]
139-
## cardinality = 0..1
140-
add = bool
141-
## cardinality = 0..1
142-
display_as_percentage = bool
143-
}
133+
battalion_mult = single_alias_right[battalion_mult]
144134
}
145135

146136
### Enabling tactics
@@ -204,16 +194,7 @@ grand_doctrine = {
204194
alias_name[naval_stat] = alias_match_left[naval_stat]
205195
alias_name[air_stat] = alias_match_left[air_stat]
206196
## cardinality = 0..inf
207-
battalion_mult = {
208-
## cardinality = 1..inf
209-
category = enum[unit_category]
210-
## cardinality = 1..inf
211-
alias_name[unit_stat] = alias_match_left[unit_stat]
212-
## cardinality = 0..1
213-
add = bool
214-
## cardinality = 0..1
215-
display_as_percentage = bool
216-
}
197+
battalion_mult = single_alias_right[battalion_mult]
217198
}
218199
### Add unit stat bonuses - units
219200
## cardinality = 0..inf
@@ -222,16 +203,7 @@ grand_doctrine = {
222203
alias_name[naval_stat] = alias_match_left[naval_stat]
223204
alias_name[air_stat] = alias_match_left[air_stat]
224205
## cardinality = 0..inf
225-
battalion_mult = {
226-
## cardinality = 1..inf
227-
category = enum[unit_category]
228-
## cardinality = 1..inf
229-
alias_name[unit_stat] = alias_match_left[unit_stat]
230-
## cardinality = 0..1
231-
add = bool
232-
## cardinality = 0..1
233-
display_as_percentage = bool
234-
}
206+
battalion_mult = single_alias_right[battalion_mult]
235207
}
236208

237209
### Enabling tactics
@@ -251,15 +223,14 @@ grand_doctrine = {
251223
}
252224
}
253225

254-
enums = {
255-
enum[xp_type] = {
256-
army
257-
air
258-
navy
259-
}
260-
enum[doctrine_folder] = {
261-
land
262-
air
263-
naval
264-
}
226+
227+
single_alias[battalion_mult] = {
228+
## cardinality = 1..inf
229+
category = enum[unit_category]
230+
## cardinality = 1..inf
231+
alias_name[unit_stat] = alias_match_left[unit_stat]
232+
## cardinality = 0..1
233+
add = bool
234+
## cardinality = 0..1
235+
display_as_percentage = bool
265236
}

0 commit comments

Comments
 (0)