Skip to content

Commit

Permalink
Merge pull request #208 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 Nov 20, 2024
2 parents 844bd7d + 08e52b7 commit 054d54b
Show file tree
Hide file tree
Showing 11 changed files with 259 additions and 234 deletions.
4 changes: 2 additions & 2 deletions Config/common/operations.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ operation = {
}

### Executed when the operation has completed [ once per operation ]
## replace_scope = { THIS = country ROOT = country FROM = country FROMFROM = state }
## replace_scope = { THIS = operation ROOT = country FROM = country FROMFROM = state }
## cardinality = 0..1
outcome_execute = {
alias_name[effect] = alias_match_left[effect]
}

### Same as outcome_execute
## replace_scope = { THIS = country ROOT = country FROM = country FROMFROM = state }
## replace_scope = { THIS = operation ROOT = country FROM = country FROMFROM = state }
## cardinality = 0..1
outcome_extra_execute = {
alias_name[effect] = alias_match_left[effect]
Expand Down
6 changes: 3 additions & 3 deletions Config/common/raids.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ single_alias[raid_outcome] = {
alias_name[effect] = alias_match_left[effect]

# And also use the dynamic variables to change scope (see the variable list below)
## push_scope = { country }
## push_scope = country
## cardinality = 0..1
var:actor_country = {
## cardinality = ~1..inf
Expand All @@ -330,14 +330,14 @@ single_alias[raid_outcome] = {
## cardinality = ~1..inf
alias_name[effect] = alias_match_left[effect]

## push_scope = { country }
## push_scope = country
## cardinality = 0..1
var:victim_country = {
## cardinality = ~1..inf
alias_name[effect] = alias_match_left[effect]
}

## push_scope = { state }
## push_scope = state
## cardinality = 0..1
var:target_state = {
## cardinality = ~1..inf
Expand Down
6 changes: 5 additions & 1 deletion Config/common/traits.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ unit_leader_trait = {
gain_xp = {
alias_name[trigger] = alias_match_left[trigger]
}
## replace_scope = { this = unit_leader root = unit_leader from = country }
## replace_scope = { this = unit_leader root = country from = country }
gain_xp_leader = {
alias_name[trigger] = alias_match_left[trigger]
}
## replace_scope = { this = operative root = country from = country }
gain_xp_leader = {
alias_name[trigger] = alias_match_left[trigger]
}
Expand Down
17 changes: 17 additions & 0 deletions Config/effects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ alias[effect:remove_building] = {
##cardinality = 0..1
province = enum[provinces]
}
### Removes specified building in specified state or province.
## scope = state
alias[effect:remove_building] = {
tag = value[building_tag]
tag = {
##cardinality = 1..inf
value[building_tag]
}
level = int_variable_field

##cardinality = 0..1
province = enum[provinces]
}

### Releases specified country as a free country.
## scope = country
Expand Down Expand Up @@ -2090,6 +2103,10 @@ alias[effect:damage_building] = {
## scope = state
alias[effect:damage_building] = {
tags = value[building_tag]
tags = {
## cardinality = 1..inf
value[building_tag]
}
damage = variable_field
## cardinality = 0..1
province = enum[provinces]
Expand Down
1 change: 1 addition & 0 deletions Config/effects_bba.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ alias[effect:add_random_valid_trait_from_unit] = {
character = value[event_target]
character = value[global_event_target]
character = scope[character]
character = scope[unit_leader]
}
## scope = { country character unit_leader }
alias[effect:set_can_be_fired_in_advisor_role] = {
Expand Down
10 changes: 6 additions & 4 deletions Config/effects_gtd.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
alias[effect:add_breakthrough_points] = {
specialization = <specialization>
specialization = all
value = float
value = int

}

### Requires raid as ROOT scope. Reduce progress to the special project in state. Root scope is raid instance scope. The input value is a ratio of the total needed progress to complete the special project, i.e. a decimal number between 0 and 1.
Expand Down Expand Up @@ -378,17 +379,18 @@ alias[effect:raid_damage_units] = {
damage = float
## cardinality = 0..1
plane_loss = float
### Ratio = yes will convert losses to % (so use floats, 1 = 100%), ratio = no instead inflicts flat dmg
ratio = yes
}
### Damage the units performing the raid in scope (the attackers inflict losses). Damage is applied to ground units while damage to plane is defined as the amount of planes lost.\nIf 'ratio = yes', then all damage / losses are applied as a fraction of the current amount. For units, damage can be defined through one value 'damage' or separately through 'org_damage' and 'str_damage'
## scope = raid
alias[effect:raid_damage_units] = {
## cardinality = 0..1
plane_loss = int
plane_loss = float
## cardinality = 0..1
org_damage = int
org_damage = float
## cardinality = 0..1
str_damage = int
str_damage = float
## cardinality = 0..1
ratio = no
}
Expand Down
Loading

0 comments on commit 054d54b

Please sign in to comment.