Skip to content

Commit

Permalink
Merge pull request #203 from Kaiserreich/master
Browse files Browse the repository at this point in the history
Update Hoi4 CWTools config - maintenance
  • Loading branch information
Pelmen323 authored Aug 13, 2024
2 parents 82a31ad + 3d1c1d6 commit 54ebd82
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 7 deletions.
16 changes: 12 additions & 4 deletions Config/common/achievements.cwt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
types = {
type[achievement] = {
path = "game/common/achievements"
unique = yes
}
unique = yes
}
}

## replace_scope = { ROOT = country THIS = country }
Expand All @@ -16,13 +16,21 @@ achievement = {
## cardinality = ~1..inf
alias_name[trigger] = alias_match_left[trigger]
}

## cardinality = 0..1
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
}
Expand Down
9 changes: 9 additions & 0 deletions Config/common/decisions.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -486,6 +492,9 @@ decision = {
state = variable_field
}

## cardinality = 0..1
highlight_only_provinces = bool

## cardinality = 0..1
highlight_provinces = {
## cardinality = ~1..inf
Expand Down
4 changes: 2 additions & 2 deletions Config/common/peace_conference.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ alias[trigger:pc_is_forced_government_to] = <ideology>

### 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
Expand Down
13 changes: 13 additions & 0 deletions Config/common/scripted_guis.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ scripted_gui = {
## cardinality = 0..1
context_type = enum[context_type]

## cardinality = 0..1
mapmode = <scripted_map_modes>

## cardinality = 0..1
parent_window_token = enum[parent_window_token]

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
45 changes: 45 additions & 0 deletions Config/effects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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 = <state>
Expand Down
8 changes: 7 additions & 1 deletion Config/triggers.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -2362,9 +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 = <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
}
6 changes: 6 additions & 0 deletions Config/variables.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# =======================
Expand Down

0 comments on commit 54ebd82

Please sign in to comment.