Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Hoi4 CWTools config (DLC_043) - more fixes #209

Merged
merged 10 commits into from
Dec 1, 2024
3 changes: 3 additions & 0 deletions Config/common/ideologies.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ ideology = {
}

ai_ideology_wanted_units_factor = float
### Extra threshold value added to DIPLOMATIC_ACTION_PROPOSE_SCORE for this ideology to give back core state control to other country
## cardinality = 0..1
ai_give_core_state_control_threshold = float

dynamic_faction_names = {
## cardinality = 0..inf
Expand Down
9 changes: 9 additions & 0 deletions Config/common/national_focus.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ focus_tree = {
}
}

## cardinality = 0..inf
inlay_window = {
id = <focus_inlay_window>
position = {
x = int
y = int
}
}

## cardinality = 0..1
initial_show_position = {
## cardinality = 0..1
Expand Down
38 changes: 38 additions & 0 deletions Config/common/national_focus_inlay_window.cwt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
types = {
type[focus_inlay_window] = {
path = "game/common/focus_inlay_windows"
}
}


focus_inlay_window = {
window_name = <containerWindowType>
### If true, then the inlay window is only visible to the country itself (defaults no)
## cardinality = 0..1
internal = bool
### When not visible, no evaluations will be done
## replace_scope = { this = country root = country }
## cardinality = 0..1
visible = {
alias_name[trigger] = alias_match_left[trigger]
}
### List of images that should have dynamic sprites
scripted_images = {
### Name of the icon (must be a subcomponent of "gui_component_name")
## cardinality = 1..inf
value[iconType_name] = {
### List of possible gfx:es for the icon, first that evaluates to true is selected (each update)
### Each entry consists of a gfx_name (the gfx that will be used if the trigger is true); and a trigger or "yes"
### If a trigger is provided, then it will be evaluated with the country scope of the focus tree.
## replace_scope = { this = country root = country }
## cardinality = 0..inf
<spriteType> = {
## cardinality = 1..inf
alias_name[trigger] = alias_match_left[trigger]
}
### If "yes" is set, then it will always be used. Note: "yes" is commonly the last entry in the list that acts as a default case.
## cardinality = 0..1
<spriteType> = yes
}
}
}
2 changes: 1 addition & 1 deletion Config/common/raids.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ single_alias[raid_outcome] = {
## cardinality = 0..1
custom_sound = scalar #<soundeffect> does not properly check for voices and other misc sounds and soundefects in mods since those are dlc files

## cardinality = 0..1
## cardinality = 0..inf
visual_effect = {
entity = <entity>
animation = <animation_id>
Expand Down
6 changes: 6 additions & 0 deletions Config/common/scripted_effects_locs_and_triggers.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ scripted_loc = {
## cardinality = 0..1
localization_key = <spriteType>
## cardinality = 0..1
localization_key = character_name|<character>
## cardinality = 0..1
localization_key = tech_effect|<technology>
## cardinality = 0..1
random_list = {
## cardinality = 1..inf
int = {
alias_name[modifier_rule] = alias_match_left[modifier_rule]
localization_key = localisation_inline
localization_key = <spriteType>
localization_key = character_name|<character>
localization_key = tech_effect|<technology>
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Config/common/special_projects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ special_project = {
}
### KR DLC triggers
## cardinality = 0..inf
has_dlc_got = yes
has_dlc_gtd = yes
## cardinality = 0..inf
has_dlc_mtg = yes
## cardinality = 0..inf
Expand Down
2 changes: 2 additions & 0 deletions Config/effects.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,8 @@ alias[effect:send_equipment] = {
## cardinality = 0..1
type = <equipment>
## cardinality = 0..1
type = value[variable]
## cardinality = 0..1
equipment = <equipment>
amount = int_variable_field
target = scope[country]
Expand Down
75 changes: 41 additions & 34 deletions Config/effects_gtd.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -284,52 +284,59 @@ alias[effect:generate_scientist_character] = {
}


### Add scientist role to a character. The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers.
## scope = country
alias[effect:add_scientist_role] = {
## cardinality = 0..1
portrait = GFX_portrait # optional - random portrait by default
## cardinality = 0..1
portrait_tag_override = scope[country] # optional - accepts variable and keyword - only relevant if using random portrait - by default use country in scope
## cardinality = 0..1
gender = enum[gender] # optional - by default random gender
## cardinality = 0..1
skills = {
# optional array
# same format as in scientist role in character DB
# by default all skills are at 1
## cardinality = ~1..inf
<specialization> = 2
}
## cardinality = 0..1
traits = {
<scientist_trait>
} # optional array

character = <character>
character = value[character_token]
character = value[variable]
character = value[event_target]
character = value[global_event_target]
character = scope[character]
scientist = {
## cardinality = 0..1
desc = localisation
## cardinality = 0..1
skills = {
# optional array
# same format as in scientist role in character DB
# by default all skills are at 1
## cardinality = ~1..inf
<specialization> = 2
}
## cardinality = 0..1
traits = {
<scientist_trait>
} # optional array
}
}
### Add scientist role to a character. The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers.
## scope = character
alias[effect:add_scientist_role] = {
## cardinality = 0..1
desc = localisation
## cardinality = 0..1
traits = {
## cardinality = ~1..inf
<scientist_trait>
}
## cardinality = 1..1
skills = {
## cardinality = 1..inf
<specialization> = int
}
scientist = {
## cardinality = 0..1
desc = localisation
## cardinality = 0..1
traits = {
## cardinality = ~1..inf
<scientist_trait>
}
## cardinality = 1..1
skills = {
## cardinality = 1..inf
<specialization> = int
}
}
}

### Remove the scientist role from a character.The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers.
## scope = country
## scope = character
alias[effect:remove_scientist_role] = bool
### Remove the scientist role from a character.The character can come from the scope or from an input parameter. The scientist role format is the same as in the character DB. Except the visible trigger - a scientist role created via effect cannot have triggers.
## scope = country
alias[effect:remove_scientist_role] = {
character = <character>
character = value[character_token]
character = <character>
character = value[character_token]
character = value[variable]
character = value[event_target]
character = value[global_event_target]
Expand Down
2 changes: 1 addition & 1 deletion Config/gfx/graphic_db.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ types = {
graphic_db = {
## cardinality = 1..inf
enum[equipment_bonus_type] ={
## cardinality = 1..inf
## cardinality = ~1..inf
pool = {
## cardinality = 0..1
limit = {
Expand Down
2 changes: 1 addition & 1 deletion Config/interface/gui.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ alias[gui:smoothListBoxType] = {
###Non-clickable icon
alias[gui:iconType] = {
### Name referenced by scripted gui
name = scalar
name = value_set[iconType_name]
##cardinality = ~1..1
alias_name[any_image_type] = alias_match_left[any_image_type]
alias_name[gui_image] = alias_match_left[gui_image]
Expand Down
7 changes: 7 additions & 0 deletions Config/triggers.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ alias[trigger:has_war_with] = scope[country]
## scope = country
alias[trigger:has_war_with] = enum[country_tags]

### Is countries at war.
## scope = country
alias[trigger:has_war_with] = value[variable]

### Checks for amount of divisions in specified state owned by current country.
## scope = country
alias[trigger:divisions_in_state] = {
Expand Down Expand Up @@ -865,6 +869,9 @@ alias[trigger:has_equipment] = { <equipment> = int_variable_field }
### Checks for amount of equipment stored.
## scope = country
alias[trigger:has_equipment] = { value[equipment_variant] = int_variable_field }
### Checks for amount of equipment stored.
## scope = country
alias[trigger:has_equipment] = { value[variable] = int_variable_field }

### Check amount of total factories.
## scope = country
Expand Down
14 changes: 13 additions & 1 deletion Config/triggers_gtd.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ alias[trigger:custom_override_tooltip] = {
tooltip = localisation
tooltip = single_alias_right[bindable_loc]
## cardinality = 0..1
alias_name[effect] = alias_match_left[effect]
alias_name[trigger] = alias_match_left[trigger]
}

### Checks if a state has the specified country as a contested owner. The trigger can be used either from a country or a state scope and accepts the other as parameter.
Expand Down Expand Up @@ -252,3 +252,15 @@ alias[trigger:num_nukes_being_dropped] = int
### number of nukes left to drop during this game tick (only useful in-between nuke drops, like in on_nuke_drop on-action, for example)
## scope = country
alias[trigger:num_nukes_left_to_drop] = int

### Are countries at peace.
## scope = country
alias[trigger:has_truce_with] = scope[country]

### Are countries at peace.
## scope = country
alias[trigger:has_truce_with] = enum[country_tags]

### Are countries at peace.
## scope = country
alias[trigger:has_truce_with] = value[variable]