Skip to content

Commit

Permalink
Merge pull request #210 from Kaiserreich/master
Browse files Browse the repository at this point in the history
Update Hoi4 CWTools config (DLC_043) - more fixes
  • Loading branch information
Pelmen323 authored Dec 7, 2024
2 parents ddd54a0 + d930ead commit a540525
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 15 deletions.
1 change: 1 addition & 0 deletions Config/common/ai_strategy.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ enums = {
equipment_market_spend_factories
force_concentration_factor
raid_target_country
become_spymaster
}
enum[pp_strats] = {
pp_spend_amount
Expand Down
5 changes: 5 additions & 0 deletions Config/common/unit_medals.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <spriteType>
Expand Down
50 changes: 43 additions & 7 deletions Config/effects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <division_name>
## cardinality = 0..1
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -2985,35 +2997,35 @@ 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
}

### 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
}
Expand Down Expand Up @@ -3576,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 = <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[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.
Expand All @@ -3599,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 = <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[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
Expand Down
2 changes: 1 addition & 1 deletion Config/effects_bba.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Config/effects_gtd.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <division_name>
## cardinality = 0..1
Expand Down Expand Up @@ -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|<character>
tooltip = tech_effect|<technology>
## cardinality = 1..inf
alias_name[effect] = alias_match_left[effect]
}
Expand Down
4 changes: 2 additions & 2 deletions Config/effects_new.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion Config/effects_nsb.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Config/history/oobs.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ oob = {

## cardinality = 0..inf
division_template = {
name = scalar
name = value_set[division_template_name]
## cardinality = 0..1
division_names_group = <division_name>
## cardinality = 0..1
Expand Down Expand Up @@ -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 = {
Expand Down
15 changes: 15 additions & 0 deletions Config/on_actions.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}

Expand Down Expand Up @@ -1119,11 +1127,18 @@ 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)
## cardinality = 0..inf
## replace_scope = { ROOT = COUNTRY this = COUNTRY FROM = COUNTRY }
on_before_peace_conference_start = single_alias_right[on_action_effect]
}

single_alias[country_event_effect] = {
Expand Down
17 changes: 16 additions & 1 deletion Config/triggers.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = <state>
## 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 = <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]
}

### Runs a loop on for each element of an array, finds the lowest value and stores result in temp variables.
Expand Down

0 comments on commit a540525

Please sign in to comment.