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

Major Rework #11

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/chance_weight.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,33 @@ single_alias[weight_chance_modifier] = {
## cardinality = 0..inf
enum[weight_chance_modifier_operators] = value_field

## cardinality = 0..1
value = value_field

## cardinality = 0..1
max = value_field

## cardinality = 0..1
min = value_field

## cardinality = 0..1
limit = single_alias_right[trigger_clause]

## cardinality = 0..inf
enum[weight_chance_modifier_operators] = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
trigger = single_alias_right[trigger_clause]

## cardinality = 0..inf
if = single_alias_right[weight_chance_modifier]

## cardinality = 0..inf
else = single_alias_right[weight_chance_modifier]

## cardinality = 0..inf
else_if = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
desc = single_alias_right[complex_desc]
## cardinality = 0..1
Expand Down
11 changes: 11 additions & 0 deletions config/color.cwt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
single_alias[color] = <named_color>
single_alias[color] = colour[rgb]
single_alias[color] = colour[hsv]
single_alias[color] = {
## cardinality = 3..3
base = float
}
single_alias[color] = {
## cardinality = 3..3
base = int
}
5 changes: 1 addition & 4 deletions config/common/combat_unit_groups.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ combat_unit_group = {
manpower_max = int
## cardinality = 0..1
default_group = bool
color = {
## cardinality = 3..3
float
}
color = alias_match_right[color]
icon = filepath
}

Expand Down
3 changes: 3 additions & 0 deletions config/common/combat_unit_types.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ combat_unit_type = {
## cardinality = ~1..1
battle_modifier = single_alias_right[modifier_clause]

## cardinality = 0..1
formation_modifier = single_alias_right[modifier_clause]

## cardinality = 0..1
unlocking_technologies = {
## cardinality = 0..inf
Expand Down
9 changes: 1 addition & 8 deletions config/common/country_consolidated.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ types = {

country_definition = {
### Map color, use int with rgb (blank) or hsv360, float with hsv
color = {
## cardinality = 3..3
int
}
color = {
## cardinality = 3..3
float
}
color = alias_match_right[color]
### The country's 'type'
country_type = enum[country_type]

Expand Down
9 changes: 1 addition & 8 deletions config/common/culture_consolidated.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ types = {

culture = {
### Map color, use int with rgb or hsv360, float with hsv
color = {
## cardinality = 3..3
int
}
color = {
## cardinality = 3..3
float
}
color = alias_match_right[color]
### Default religion for culture
religion = <religion>

Expand Down
13 changes: 13 additions & 0 deletions config/common/decisions.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@ types = {
type[decision] = {
path = "game/common/decisions"
}
localisation = {
name = "$"
}
}

## replace_scope = { ROOT = country THIS = country }
decision = {
## cardinality = 0..1
### This trigger determines if a decision shows up at all (country scope)
is_shown = single_alias_right[trigger_clause]

## cardinality = 0..1
### This trigger determines if a decision can be taken (country scope)
possible = single_alias_right[trigger_clause]

### There is nothing special about this effect. It determines what happens when\na country takes the decision. It follows the same rules as any other effect.
when_taken = single_alias_right[effect_clause]

## cardinality = 0..1
### The scripted weight which determines how likely AI is to take it amongst all possible decisions (country scope).\nSimilar to event options. If it evaluates to 0, AI will not take the decision. Evaluates to 1 if unspecified
ai_chance = single_alias_right[ai_chance_block]
}
90 changes: 20 additions & 70 deletions config/common/diplomatic_actions.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,6 @@ types = {
}
}

diplomatic_action_docs = {
requires_approval = bool # Whether this action requires the approval of the target, default no

show_confirmation_box = bool # Whether player should be prompted with a confirmation box when taking this action, default yes

possible = {} # Trigger for whether action is possible, default evalutes to true

effect = {} # Effect of action on execution

is_hostile = bool # is this a hostile action, default no

pact = { # If no pact block is defined, the action will not create a diplomatic pact on execution
cost = x # Cost in diplo capital to maintain the pact
counts_for_tech_spread = x # Whether or not tech spreads through this pact

recipient_gets_income_transfer = yes/no # If yes, actor pays money to recipient, if no recipient pays to actor
income_transfer_based_on_recipient = yes/no # If yes, the amount of money transferred to the other part is based on a fraction of recipient's tax income, if no it's based on a fraction of actor's income.

propose_string = string # Loc string used when proposing pact, default PROPOSE
break_string = string # Loc string used when breaking pact, default BREAK
ask_to_end_string = string # Loc string used when proposing to break a pact, default ASK_TO_END

actor_requires_approval_to_break = bool # Whether this pact requires the approval of the other part for original initiator to break it off, default no
target_requires_approval_to_break = bool # Whether this pact requires the approval of the other part for original target to break it off, default no

is_breaking_hostile = yes/no # is breaking this pact by actor considered hostile, default no
is_target_breaking_hostile = yes/no # is breaking this pact by target considered hostile, default no

is_about_to_auto_break = {} # Trigger: if true, an alert warning the pact is about to break is showed, default evaluates to false (meaning no alert is ever added)
should_auto_break = {} # Trigger for whether the pact should automatically be broken off, default evaluates to false (This will not break a pact forced by a favor)
should_invalidate = {} # Trigger for whether the pact should automatically be invalidated, default evaluates to false (This *will* break a pact forced by a favor)
actor_can_break = {} # Trigger for whether the original initiator of a pact can break it off, default evaluates to true
target_can_break = {} # Trigger for whether the original target of a pact can break it off, default evaluates to true

daily_effect = {} # Effect of pact each day while active
weekly_effect = {} # Effect of pact each week while active
monthly_effect = {} # Effect of pact each month while active

break_effect = {} # Effect of pact on being broken

subject_relation = { # If a subject relation block is defined, this pact acts as a overlord/subject relationship
annex_on_country_formation = bool # If yes, appropriate-culture subjects of this type will be annexed when overlord forms a new country, default no
}
}

# IMPORTANT: In the AI block, the AI country is always root and the other country always scope:target, regardless of who proposed the diplomatic action
ai = {
will_propose = {} # Trigger for if AI will consider proposing this action (their acceptance if asked still has to be positive if action requires acceptance), default evalutes to true
will_break = {} # Trigger for if AI will consider breaking off an existing pact of this action (their acceptance as if asked still has to be significantly negative if action requires acceptance), default evalutes to true

accept_score = {} # If this value evaluates to above zero, AI will accept this action if proposed
accept_break_score = {} # If this value evaluates to above zero, AI will accept breaking this pact if proposed

propose_score = {} # This determines how much the AI will prioritize proposing this particular deal
propose_break_score = {} # This determines how much the AI will prioritize proposing breaking this particular pact

use_favor_chance = {} # The chance (0 - 100%) that AI is willing to call in a favor to force this through
owe_favor_chance = {} # The chance (0 - 100%) that AI is willing to owe a favor to get this accepted
}
}

## replace_scope = { ROOT = country THIS = country }
diplomatic_action = {
## cardinality = 0..1
Expand All @@ -80,12 +19,20 @@ diplomatic_action = {
## cardinality = 0..1
violates_sovereignty = bool

### Diplomatic action groups. Example: subject means a subject is taking an action.
groups = {
## cardinality = 1..inf
### Currently available: general, subject, overlord and power_bloc; for sorting these in different datamodels, general break actions supersede all other categories, while subject supersedes overlord supersedes power_bloc actions
enum[diplomatic_action_group]
}

## cardinality = 0..1
potential = single_alias_right[trigger_clause]
## cardinality = 0..1
possible = single_alias_right[trigger_clause]
## cardinality = 0..1
selectable = single_alias_right[trigger_clause]
## cardinality = 0..1
effect = single_alias_right[effect_clause]
## cardinality = 0..1
accept_effect = single_alias_right[effect_clause]
Expand Down Expand Up @@ -261,38 +208,41 @@ diplomatic_action = {
### Trigger for if AI will consider breaking off an existing pact of this action (their acceptance as if asked still has to be significantly negative if action requires acceptance), default evalutes to true
will_break = single_alias_right[trigger_clause]

## cardinality = 0..1
evaluation_chance = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### If this value evaluates to above zero, AI will accept this action if proposed
accept_score = value_field
accept_score = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
junior_accept_score = value_field
junior_accept_score = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### If this value evaluates to above zero, AI will accept breaking this pact if proposed
accept_break_score = value_field
accept_break_score = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### This determines how much the AI will prioritize proposing this particular deal
propose_score = value_field
propose_score = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### This determines how much the AI will prioritize proposing breaking this particular pact
propose_break_score = value_field
propose_break_score = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
use_obligation_chance = value_field
use_obligation_chance = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
owe_obligation_chance = value_field
owe_obligation_chance = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### The chance (0 - 100%) that AI is willing to call in a favor to force this through
use_favor_chance = value_field
use_favor_chance = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
### The chance (0 - 100%) that AI is willing to owe a favor to get this accepted
owe_favor_chance = value_field
owe_favor_chance = single_alias_right[weight_chance_modifier]

## cardinality = 0..1
check_acceptance_for_will_break = bool
Expand Down
6 changes: 5 additions & 1 deletion config/common/goods.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ types = {
subtype[consumable] = {
obsession_chance = float
}
images = {
## primary
texture = texture
}
}
}

Expand All @@ -22,7 +26,7 @@ enums = {
## replace_scope = { ROOT = goods THIS = goods }
goods = {
### The icon shown ingame
texture = filepath[game/gfx/interface/icons/goods_icons/]
texture = filepath

### The base cost
cost = int
Expand Down
4 changes: 3 additions & 1 deletion config/common/history/buildings.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_building = single_alias_right[effect_clause]
history_building = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/characters.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_character = single_alias_right[effect_clause]
history_character = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/conscriptions.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_conscriptions = single_alias_right[effect_clause]
history_conscriptions = {
alias_name[effect] = alias_match_left[effect]
}
5 changes: 3 additions & 2 deletions config/common/history/countries.cwt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
types = {
type[history_country] = {
path = "game/common/history/countries"

}
}

history_country = single_alias_right[effect_clause]
history_country = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/diplomacy.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_diplomacy = single_alias_right[effect_clause]
history_diplomacy = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/diplomatic_plays.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_diplomatic_play = single_alias_right[effect_clause]
history_diplomatic_play = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/globals.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_global = single_alias_right[effect_clause]
history_global = {
alias_name[effect] = alias_match_left[effect]
}
4 changes: 3 additions & 1 deletion config/common/history/interests.cwt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ types = {
}
}

history_interest = single_alias_right[effect_clause]
history_interest = {
alias_name[effect] = alias_match_left[effect]
}
10 changes: 10 additions & 0 deletions config/common/history/military_deployments.cwt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
types = {
type[history_military_deployments] = {
path = "game/common/history/military_deployments"

}
}

history_military_deployments = {
alias_name[effect] = alias_match_left[effect]
}
10 changes: 10 additions & 0 deletions config/common/history/military_formations.cwt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
types = {
type[history_military_formations] = {
path = "game/common/history/military_formations"

}
}

history_military_formations = {
alias_name[effect] = alias_match_left[effect]
}
Loading