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

Aroai alpha2 v2 #350

Merged
merged 10 commits into from
Jun 25, 2023
Merged
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
38 changes: 37 additions & 1 deletion common/ai_strategies/00_default_strategy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ ai_strategy_default = {
# How much value does the AI place on an obligation from another country?
# Using this value in other strategies will function additively
obligation_value = {
value = 15
value = 0
# Compare ranks - higher rank than us has increased value, lower rank decreased value
add = {
value = scope:target_country.country_rank
Expand Down Expand Up @@ -310,6 +310,42 @@ ai_strategy_default = {
}
add = 5
}
# Bonus if they have same alignment
if = {
limit = {
OR = {
AND = {
is_aligned_USA = yes
scope:target_country = { is_aligned_USA = yes}
}
AND = {
is_aligned_RUS = yes
scope:target_country = { is_aligned_RUS = yes}
}
}
}
add = 10
}
# Obligation has no value if they have opposite alignment
if = {
limit = {
OR = {
AND = {
is_aligned_RUS = yes
scope:target_country = { is_aligned_USA = yes}
}
AND = {
is_aligned_USA = yes
scope:target_country = { is_aligned_RUS = yes}
}
}
}
subtract = 100
}

# TODO remove value if a country with same alignement is an opponent


# If AI doesn't care about them, they don't want an obligation
if = {
limit = {
Expand Down
9 changes: 9 additions & 0 deletions common/defines/cwp_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ NAI = {

# If a front is worth less than this, the AI will not assign any generals to it
FRONT_IMPORTANCE_MIN_SCORE = 0.001

# diplo play
DIPLO_PLAY_SWAY_UNWANTED_OFFER = -1000 # For being offered unwanted wargoal or obligation

IDEOLOGICAL_OPINION_LAW_APPROVAL_THRESHOLD = 0.5 # If ruling IGs have at least this much approval/disapproval for a law on average, it affects ideological opinion
IDEOLOGICAL_OPINION_STRONG_STANCE_THRESHOLD = 1.5 # If ruling IGs have at least this much approval/disapproval for a law on average, IDEOLOGICAL_OPINION_STRONG_STANCE_EFFECT_MULT comes into effect
IDEOLOGICAL_OPINION_SAME_LAW_STANCE_EFFECT = 0.1 # Added to ideological opinion for each law both governments approve or disapprove of
IDEOLOGICAL_OPINION_DIFFERENT_LAW_STANCE_EFFECT = -0.2 # Added to ideological opinion for each law where one government approves and the other disapproves
IDEOLOGICAL_OPINION_STRONG_STANCE_EFFECT_MULT = 2 # If AI has a strong stance on a law, multiply its effects on ideological opinion by this
}

NCharacters = {
Expand Down
16 changes: 14 additions & 2 deletions common/history/buildings/07_south_america.txt
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,18 @@
}
s:STATE_BOLIVAR = {
region_state:VNZ = {
create_building = {
building = "building_paper_manufactories"
level = 2
reserves = 1
activate_production_methods = {
"pm_base_paper"
"pm_no_automation"
"pm_professional_service_industry_no"
"pm_no_environmental_tech"
"pm_privately_owned_general_industry"
}
}
create_building = {
building = "building_oil_rig"
level = 2
Expand Down Expand Up @@ -1143,7 +1155,7 @@
}
create_building = {
building = "building_railway"
level = 1
level = 2
reserves = 1
activate_production_methods = {
"pm_steam_trains"
Expand All @@ -1164,7 +1176,7 @@
}
create_building = {
building = "building_paper_manufactories"
level = 1
level = 3
reserves = 1
activate_production_methods = {
"pm_base_paper"
Expand Down
72 changes: 54 additions & 18 deletions common/history/buildings/08_middle_east.txt
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,45 @@
}
s:STATE_BAGHDAD = {
region_state:IRQ = {
create_building = {
building = "building_government_administration"
level = 3
reserves = 1
activate_production_methods = {
"pm_modern_bureaucracy"
"pm_professional_service_industry_no"
"pm_professional_bureaucrats"
}
}
create_building = {
building = "building_rice_farm"
level = 5
reserves = 1
activate_production_methods = {
"pm_simple_farming_building_rice_farm"
"pm_no_secondary"
"pm_no_honey_production"
"pm_manual_harvesting"
"pm_government_run_farm"
}
}
create_building = {
building = "building_oil_rig"
level = 10
reserves = 1
activate_production_methods = {
"pm_oil_rigs"
"pm_manual_transportation"
"pm_privately_owned_military_industry"
}
}
}
}
s:STATE_MOSUL = {
region_state:IRQ = {
create_building = {
building = "building_wheat_farm"
level = 1
level = 3
reserves = 1
activate_production_methods = {
"pm_simple_farming"
Expand Down Expand Up @@ -782,7 +814,7 @@
region_state:PER = {
create_building = {
building = "building_railway"
level = 3
level = 1
reserves = 1
activate_production_methods = {
"pm_steam_trains"
Expand Down Expand Up @@ -845,7 +877,7 @@
}
create_building = {
building = "building_government_administration"
level = 1
level = 2
reserves = 1
activate_production_methods = {
"pm_modern_bureaucracy"
Expand All @@ -862,7 +894,7 @@
region_state:PER = {
create_building = {
building = "building_railway"
level = 3
level = 1
reserves = 1
activate_production_methods = {
"pm_steam_trains"
Expand Down Expand Up @@ -904,7 +936,7 @@
}
create_building = {
building = "building_government_administration"
level = 1
level = 2
reserves = 1
activate_production_methods = {
"pm_modern_bureaucracy"
Expand Down Expand Up @@ -936,17 +968,6 @@
"pm_government_run_plantation"
}
}
create_building = {
building = "building_railway"
level = 1
reserves = 1
activate_production_methods = {
"pm_steam_trains"
"pm_paved_roads"
"pm_cargo_prioritization"
"pm_privately_owned_building_railway"
}
}
create_building = {
building = "building_logging_camp"
level = 1
Expand Down Expand Up @@ -998,7 +1019,7 @@
region_state:PER = {
create_building = {
building = "building_railway"
level = 3
level = 1
reserves = 1
activate_production_methods = {
"pm_steam_trains"
Expand Down Expand Up @@ -1183,7 +1204,7 @@
}
create_building = {
building = "building_railway"
level = 2
level = 1
reserves = 1
activate_production_methods = {
"pm_steam_trains"
Expand Down Expand Up @@ -1262,6 +1283,21 @@
}
s:STATE_IRAKAJEMI = {
region_state:PER = {
create_building = {
building = "building_barracks"
level = 3
reserves = 1
activate_production_methods = {
"pm_pre_war_infantry"
"pm_no_artillery"
"pm_no_armoured_integration"
"pm_no_motorized"
"pm_no_aircraft"
"pm_no_special_reconnaissance"
"pm_no_communications_support"
"pm_no_formal_medical_support"
}
}
create_building = {
building = "building_airport"
level = 1
Expand Down
8 changes: 8 additions & 0 deletions common/history/diplomacy/00_subject_relationships.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@
country = c:NZL # Until 1986
type = dominion
}
create_diplomatic_pact = {
country = c:NZL # Until 1986
type = dominion
}
create_diplomatic_pact = {
country = c:IRQ
type = dominion
}
}
c:SPA = {
create_diplomatic_pact = {
Expand Down
4 changes: 2 additions & 2 deletions common/history/global/00_global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ GLOBAL = {
# -1 < 0 < 1
every_country = {
every_scope_state = {
calc_starting_habitability = yes
set_habitability_effects = yes
onaction_calc_starting_habitability = yes
onaction_set_habitability_effects = yes
}
}
## Dynamic Peace deal State Setup
Expand Down
25 changes: 25 additions & 0 deletions common/history/trade_routes/00_trade_routes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,31 @@
direction = import
target = c:USA.market
}
create_trade_route = {
goods = engines
level = 4
direction = export
target = c:IRQ.market
}
create_trade_route = {
goods = tools
level = 4
direction = export
target = c:IRQ.market
}
create_trade_route = {
goods = oil
level = 14
direction = import
target = c:IRQ.market
}
create_trade_route = {
goods = paper
level = 2
direction = export
target = c:IRQ.market
}

}
c:CUB = {
create_trade_route = {
Expand Down
Loading