Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Cold-War-Project/CWP-Main in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
Arcadyi committed May 27, 2023
2 parents 625ab48 + 2c975c8 commit 985a226
Show file tree
Hide file tree
Showing 487 changed files with 83,642 additions and 18,136 deletions.
5 changes: 2 additions & 3 deletions .metadata/metadata.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Cold War Project",
"id": "",
"version": "0.1.1",
"supported_game_version": "1.2.7",
"version": "0.1.5",
"supported_game_version": "1.3.1",
"short_description": "",
"tags": [],
"relationships": [],
Expand Down Expand Up @@ -34,7 +34,6 @@
"common/history/trade_routes",
"common/scripted_effects",
"common/objective_subgoals",
"common/ideologies",
"common/laws",
"common/law_groups",
"common/parties",
Expand Down
206 changes: 198 additions & 8 deletions common/ai_strategies/00_default_strategy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,171 @@ ai_strategy_default = {
add = -0.1
}
}
# How many barracks relative to incorporated population should the AI have
# Using a different value in a strategy will override this value
wanted_army_ratio = {
value = 3000000 # 1 barrack per 3M incorporated population
# How many levels of barracks should the AI have
# Using this value in other strategies will function additively
wanted_army_size = {
value = 0

# To increase base army size for small countries, capped at 1 million population
add = {
value = cached_ai_incorporated_population
divide = 100000 # 1 level of barracks per 100k incorporated population

max = 10
}

add = {
value = cached_ai_incorporated_population
divide = 250000 # 1 level of barracks per 250k incorporated population
}

add = {
value = cached_ai_unincorporated_population
divide = 1000000 # 1 level of barracks per 1 million unincorporated population
}

max = 250 # No more than 250 from population

add = {
value = gdp
divide = 500000 # 1 level of barracks per 500k gdp
}

# Factor in strategies
if = {
limit = {
OR = {
has_strategy = ai_strategy_territorial_expansion
}
}
multiply = 1.25
}

max = 500
min = 1
}
# How many naval bases relative to incorporated coastal population should the AI have
# Using a different value in a strategy will override this value
wanted_navy_ratio = {
value = 10000000 # 1 naval base per 5M coastal incorporated population

# How many levels of naval base should the AI have
# Using this value in other strategies will function additively
wanted_navy_size = {
value = 0

# 1 level of naval base per 350k coastal incorporated population
add = {
value = cached_ai_incorporated_coastal_population
divide = 350000
}

# 1 level of naval base per 1 million coastal unincorporated population
add = {
value = cached_ai_unincorporated_coastal_population
divide = 1000000
}

# 1 level of naval base per 1 million population in direct overseas subjects
add = {
value = cached_ai_overseas_subject_population
divide = 1000000
}

max = 250 # No more than 250 from population

# 1 level of naval base per 1 million gdp, multiplied by relative incorporated coastal population to total incorporated population
add = {
value = gdp
divide = cached_ai_incorporated_population
multiply = cached_ai_incorporated_coastal_population
divide = 1000000
}

# Factor in strategies
if = {
limit = {
OR = {
has_strategy = ai_strategy_colonial_expansion
has_strategy = ai_strategy_economic_imperialism
}
}
multiply = 1.25
}

if = {
limit = { has_strategy = ai_strategy_armed_isolationism }
multiply = 0.75
}

if = {
limit = { country_rank < rank_value:major_power }
multiply = 0.75
}

if = {
limit = { is_country_type = unrecognized }
multiply = 0.5
}

max = 500
min = 0
}

# How many levels of naval base should the AI have
# Using this value in other strategies will function additively
wanted_navy_size = {
value = 0

# 1 level of naval base per 350k coastal incorporated population
add = {
value = cached_ai_incorporated_coastal_population
divide = 350000
}

# 1 level of naval base per 1 million coastal unincorporated population
add = {
value = cached_ai_unincorporated_coastal_population
divide = 1000000
}

# 1 level of naval base per 1 million population in direct overseas subjects
add = {
value = cached_ai_overseas_subject_population
divide = 1000000
}

max = 250 # No more than 250 from population

# 1 level of naval base per 1 million gdp, multiplied by relative incorporated coastal population to total incorporated population
add = {
value = gdp
divide = cached_ai_incorporated_population
multiply = cached_ai_incorporated_coastal_population
divide = 1000000
}


# Factor in strategies
if = {
limit = {
OR = {
has_strategy = ai_strategy_colonial_expansion
has_strategy = ai_strategy_economic_imperialism
}
}
multiply = 1.25
}

if = {
limit = { has_strategy = ai_strategy_armed_isolationism }
multiply = 0.75
}

if = {
limit = { country_rank < rank_value:major_power }
multiply = 0.75
}

max = 500
min = 0
}
# Chance each update that the AI is willing to start changing a law (1 = 1%)
# Using this value in other strategies will function additively
change_law_chance = {
Expand Down Expand Up @@ -1764,6 +1919,41 @@ ai_strategy_default = {
min = 0
max = 0
}
transfer_subject = {
if = {
limit = {
OR = {
has_secret_goal = {
who = scope:target_country
secret_goal = protect
}
has_secret_goal = {
who = scope:target_country
secret_goal = dominate
}
}
}

add = {
value = 50

add = {
value = scope:target_country.gdp
divide = 200000
max = 50
}

if = {
limit = {
has_strategic_adjacency = scope:target_country
}
multiply = 1.25
}
}
}
min = 0
max = 100
}
make_puppet = {
if = {
limit = {
Expand Down
36 changes: 0 additions & 36 deletions common/ai_strategies/02_diplomatic_strategies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@
ai_strategy_territorial_expansion = {
icon = "gfx/interface/icons/ai_strategy_icons/territorial_expansion.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 50
}
Expand Down Expand Up @@ -214,12 +208,6 @@ ai_strategy_territorial_expansion = {
ai_strategy_colonial_expansion = {
icon = "gfx/interface/icons/ai_strategy_icons/colonial_expansion.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 25
}
Expand Down Expand Up @@ -411,12 +399,6 @@ ai_strategy_colonial_expansion = {
ai_strategy_armed_isolationism = {
icon = "gfx/interface/icons/ai_strategy_icons/armed_isolationism.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 1
}
Expand Down Expand Up @@ -498,12 +480,6 @@ ai_strategy_armed_isolationism = {
ai_strategy_economic_imperialism = {
icon = "gfx/interface/icons/ai_strategy_icons/economic_imperialism.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 25
}
Expand Down Expand Up @@ -746,12 +722,6 @@ ai_strategy_economic_imperialism = {
ai_strategy_global_liberalism = {
icon = "gfx/interface/icons/ai_strategy_icons/economic_imperialism.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 25
}
Expand Down Expand Up @@ -952,12 +922,6 @@ ai_strategy_global_liberalism = {
ai_strategy_international_socialism = {
icon = "gfx/interface/icons/ai_strategy_icons/economic_imperialism.dds"
type = diplomatic
wanted_army_ratio = {
value = 3000000
}
wanted_navy_ratio = {
value = 5000000
}
undesirable_infamy_level = {
value = 50
}
Expand Down
Loading

0 comments on commit 985a226

Please sign in to comment.