Skip to content

Commit

Permalink
enaepta
Browse files Browse the repository at this point in the history
enaepta 0.26
  • Loading branch information
AndHope committed May 28, 2024
1 parent 38cad41 commit 761bb4f
Show file tree
Hide file tree
Showing 28 changed files with 1,400 additions and 473 deletions.
138 changes: 115 additions & 23 deletions common/ai_strategies/00_default_strategy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ ai_strategy_default = {
state_value = {
value = 0

if = { # PUT STATE SCORES INSIDE br_taurica BELOW IF STATEMENT TO PREVENT AI FROM TAKING UNREACHABLE STATES
if = { # PUT STATE SCORES INSIDE THE BELOW IF STATEMENT TO PREVENT AI FROM TAKING UNREACHABLE STATES

limit = {
OR = {
Expand Down Expand Up @@ -902,7 +902,7 @@ ai_strategy_default = {
subject_value = {
value = 0

# PUT ALL REGULAR SUBJECT SCORES INSIDE br_taurica BELOW IF STATEMENT TO PREVENT AI FROM TAKING UNREACHABLE SUBJECTS
# PUT ALL REGULAR SUBJECT SCORES INSIDE THE BELOW IF STATEMENT TO PREVENT AI FROM TAKING UNREACHABLE SUBJECTS
if = {
limit = {
OR = {
Expand Down Expand Up @@ -1496,17 +1496,40 @@ ai_strategy_default = {
add = 25
}

# Extra french aggression for Haiti renouncing debt payments
if = {
limit = {
has_variable = haiti_stops_paying_france_aggressor
scope:target_country = {
has_variable = haiti_stops_paying_france_target
any_state = {
has_claim_by = root
}
}
}
limit = { has_modifier = norse_military_doctrine }
add = 5
}
if = {
limit = { has_modifier = br_modifier_anti_colonialism }
add = 5
}
if = {
limit = { has_modifier = br_modifier_horde_khanate }
add = 15
}
if = {
limit = { has_modifier = br_modifier_holy_warriors }
add = 5
}
if = {
limit = { has_modifier = br_modifier_jihad_called }
add = 10
}
if = {
limit = { has_modifier = br_modifier_aggressive_bonus }
add = 10
}
if = {
limit = { has_modifier = autocephalous_patriarchate_moscow }
add = 15
}
if = {
limit = { has_modifier = br_modifier_african_colony }
add = 5
}
if = {
limit = { has_modifier = spice_income }
add = 5
}

Expand Down Expand Up @@ -1638,7 +1661,7 @@ ai_strategy_default = {
value = cached_ai_incorporated_population
divide = 100000 # 1 level of barracks per 100k incorporated population

max = 10
max = 20
}

add = {
Expand All @@ -1661,27 +1684,27 @@ ai_strategy_default = {
# More advanced standing armies are expensive and should be smaller relative to population
if = {
limit = { has_technology_researched = line_infantry }
multiply = 0.9
multiply = 0.8
}

if = {
limit = { has_technology_researched = general_staff }
multiply = 0.9
multiply = 0.8
}

if = {
limit = { has_technology_researched = trench_works }
multiply = 0.9
multiply = 0.8
}

if = {
limit = { has_technology_researched = nco_training }
multiply = 0.9
multiply = 0.8
}

if = {
limit = { has_technology_researched = mobile_armor }
multiply = 0.9
multiply = 0.8
}

if = {
Expand All @@ -1708,6 +1731,30 @@ ai_strategy_default = {
limit = { has_modifier = br_modifier_jihad_called }
multiply = 5
}
if = {
limit = { has_modifier = br_modifier_aggressive_bonus }
multiply = 5
}
if = {
limit = { has_modifier = br_modifier_defensive_bonus }
multiply = 3
}
if = {
limit = { has_modifier = autocephalous_patriarchate_moscow }
multiply = 2
}
if = {
limit = { has_modifier = autocephalous_patriarchate_belgrade }
multiply = 2
}
if = {
limit = { has_modifier = br_modifier_african_colony }
multiply = 2
}
if = {
limit = { has_modifier = spice_income }
multiply = 2
}

# Factor in strategies
if = {
Expand Down Expand Up @@ -1783,7 +1830,15 @@ ai_strategy_default = {

if = {
limit = { has_modifier = br_modifier_italy_gunboat_trade_diplomacy }
multiply = 5
multiply = 4
}
if = {
limit = { has_modifier = spice_income }
multiply = 2
}
if = {
limit = { has_modifier = norse_naval_tradition }
multiply = 3
}

# Factor in strategies
Expand Down Expand Up @@ -2003,6 +2058,12 @@ ai_strategy_default = {
country_rank >= rank_value:major_power
}
}
horse = {
stance = wants_high_supply
trigger = {
country_rank >= rank_value:major_power
}
}
clippers = {
stance = wants_high_supply
trigger = {
Expand Down Expand Up @@ -2078,6 +2139,13 @@ ai_strategy_default = {
has_technology_researched = lathe
}
}
spices = {
stance = wants_high_supply
trigger = {
has_building = building_food_industry
total_population >= 1000000
}
}
silk = {
stance = wants_high_supply
trigger = {
Expand Down Expand Up @@ -2310,8 +2378,21 @@ ai_strategy_default = {

}

add = 100
}
add = 100

if = {
limit = {
scope:target_country = {
has_secret_goal = {
who = root
secret_goal = reconcile
}
}
}

add = 200
}
}

multiply = {
value = "ai_ideological_opinion(scope:target_country)"
Expand Down Expand Up @@ -3183,6 +3264,17 @@ ai_strategy_default = {
multiply = 0.0
}

# AI shouldn't be aggressive against subjects of subjects
if = {
limit = {
scope:target_country = {
is_subject_of = root
NOT = { is_direct_subject_of = root }
}
}
multiply = 0.0
}

if = {
limit = { scope:target_country = { is_still_learning = yes } }
multiply = 0
Expand All @@ -3191,11 +3283,11 @@ ai_strategy_default = {
# Countries scripted to have a friendly pact, historical overlord status or same power bloc shouldn't start with randomly generated hostile goals
if = {
limit = {
game_date < 1836.1.2
game_date < 1736.1.2
OR = {
is_in_same_power_bloc = scope:target_country
has_friendly_diplomatic_pact = { TARGET = scope:target_country }
scope:target_country = { NOT = { any_overlord_or_above = { this = root } } }
scope:target_country = { is_subject_of = root }
}
}
multiply = 0
Expand Down
Loading

0 comments on commit 761bb4f

Please sign in to comment.