Files
azurlane-tj/src/common/ai_strategy/YUW.txt
2024-11-17 20:02:05 +00:00

708 lines
12 KiB
Plaintext
Executable File

# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
SGZ_start = {
allowed = {
original_tag = YUW
}
enable = {
NOT = {
has_idea = TY_dingzhenai
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = railway_gun_divisions_ratio
value = 1
}
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 100
}
ai_strategy = {
type = template_prio #训练模板倾向
id = infantry
value = 100
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 900
}
ai_strategy = {
type = template_prio #训练模板倾向
id = armor
value = 900
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = armor
value = 160
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = infantry_weapons
value = 80
}
ai_strategy = {
type = equipment_production_min_factories
id = land_medium_tank
value = 1
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "DOH"
value = 200
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "BYG"
value = 300
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
ai_strategy = {
type = build_army
id = infantry
value = 400
}
ai_strategy = {
type = build_army
id = armor
value = 400
}
ai_strategy = {
type = equipment_stockpile_surplus_ratio
value = 5
}
}
YUW_naval_role_ratios_historical = {
allowed = {
original_tag = YUW
}
enable = {
has_dlc = "Man the Guns"
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = naval_capital_bb
value = 10
}
ai_strategy = {
type = role_ratio
id = naval_capital_bc
value = -100
}
ai_strategy = {
type = role_ratio
id = naval_carrier
value = -10
}
ai_strategy = {
type = role_ratio
id = naval_submarine
value = -10
}
ai_strategy = {
type = role_ratio
id = naval_screen
value = 150
}
ai_strategy = {
type = role_ratio
id = naval_cruiser_light
value = 30
}
ai_strategy = {
type = role_ratio
id = naval_cruiser_heavy
value = -15
}
ai_strategy = {
type = unit_ratio
id = convoy
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = convoy
value = 1
}
}
YUW_chongya = {
allowed = {
original_tag = YUW
}
enable = {
has_completed_focus = YUW_rushensuoyuan
has_war_with = TIX
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_control
tag = TIX
ratio = 0.25
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}
YUW_wushibfl = {
enable = {
tag = YUW
}
ai_strategy = {
type = ignore
id = "BFL"
value = 500
}
}
YUW_fangyutiexue = {
# if SAD is going to war with us, consider TIX as a threat as well
allowed = {
original_tag = YUW
}
enable = {
TIX = {
has_government = fascism
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_armor_score #部署坦克
id = TIX
value = 300
}
ai_strategy = {
type = antagonize
id = "TIX"
value = 500
}
}
YUW_fangyutiexue2 = {
# if SAD is going to war with us, consider TIX as a threat as well
allowed = {
original_tag = YUW
}
enable = {
TIX = {
has_government = fascism
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = invade
id = TIX
value = 200
}
}
spanish_civil_war_YUW_resistance = {
allowed = {
original_tag = YUW
has_dlc = "La Resistance"
}
enable = {
country_exists = SPD
has_global_flag = spanish_civil_war
NOT = { has_global_flag = scw_over }
}
abort = {
has_global_flag = scw_over
}
ai_strategy = {
type = befriend
id = "SPD"
value = 30
}
ai_strategy = {
type = send_volunteers_desire
id = "SPD"
value = 100
}
}
YUW_area_priority = {
enable = {
original_tag = YUW
}
ai_strategy = {
type = area_priority
id = europe
value = 2000 #more focus here
}
ai_strategy = {
type = area_priority
id = scandinavia
value = -2000
}
ai_strategy = {
type = area_priority
id = north_america
value = -1000
}
ai_strategy = {
type = area_priority
id = south_america
value = -1000
}
ai_strategy = {
type = area_priority
id = asia
value = -500
}
ai_strategy = {
type = area_priority
id = middle_east
value = -1000
}
ai_strategy = {
type = area_priority
id = africa
value = -200
}
ai_strategy = {
type = area_priority
id = suez
value = -100
}
ai_strategy = {
type = area_priority
id = pacific
value = -2000 #less focus here
}
ai_strategy = {
type = area_priority
id = oceania
value = -2000
}
}
YUW_xp_upgrade_spending_land = {
allowed = {
original_tag = YUW
}
enable = {
date < 1942.6.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = land_xp_spend_priority
id = upgrade_xp_cutoff
value = 150
}
}
YUW_wants_civ = {
allowed = {
original_tag = YUW
}
enable = {
date < 1937.10.1
has_war = no
}
abort_when_not_enabled = yes
ai_strategy = {
type = building_target
id = industrial_complex
value = 10000
}
}
YUW_prio_military_even_at_peace = {
allowed = {
original_tag = YUW
}
enable = {
date > 1937.10.1
date < 1940.6.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = building_target
id = arms_factory
value = 10000
}
}
YUW_help_ally_in_europe = {
allowed = {
original_tag = YUW
}
enable = {
has_war = yes
}
abort_when_not_enabled = yes
ai_strategy = {
type = force_defend_ally_borders
value = 10000
target = europe
}
}
YUW_zhenduibfl = {
allowed = {
original_tag = YUW
}
enable = {
OR = {
has_completed_focus = YUW_jiuguoxingdong
has_completed_focus = YUW_rushensuoyuan
has_completed_focus = YUW_chedijingjigaige
}
BFL = {
has_government = communism
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_armor_score #部署坦克
id = BFL
value = 300
}
ai_strategy = {
type = invade
id = BFL
value = 200
}
ai_strategy = {
type = antagonize
id = "BFL"
value = 500
}
}
YUW_dont_do_so_many_naval_invasions_please = {
allowed = { original_tag = YUW }
enable = {
OR = {
has_completed_focus = YUW_jiuguoxingdong
has_completed_focus = YUW_rushensuoyuan
has_completed_focus = YUW_chedijingjigaige
}
}
ai_strategy = {
type = invasion_unit_request
tag = TIX
value = -200
}
ai_strategy = {
type = invasion_unit_request
tag = BFL
value = -200
}
ai_strategy = {
type = invasion_unit_request
tag = RAJ
value = -200
}
}
YUW_protect_bentu_ore = {
allowed = {
original_tag = YUW
}
enable = {
is_historical_focus_on = no
16 = { is_fully_controlled_by = ROOT }
}
abort_when_not_enabled = yes
ai_strategy = {
type = put_unit_buffers
# ratio of total armeis in country to be buffered
ratio = 0.5
# you can specify an order id. ratio of same orders ids will be share same ratio
order_id = 2
# states to put garrison orders (if no state is friendly, strat is invalid)
states = {
16
}
# ai areas that the orders will use these buffers in
area = europe
}
}
YUW_protect_maqinuo_ore = {
allowed = {
original_tag = YUW
}
enable = {
is_historical_focus_on = yes
16 = { is_fully_controlled_by = ROOT }
}
abort_when_not_enabled = yes
ai_strategy = {
type = put_unit_buffers
# ratio of total armeis in country to be buffered
ratio = 1.0
# you can specify an order id. ratio of same orders ids will be share same ratio
order_id = 1
# states to put garrison orders (if no state is friendly, strat is invalid)
states = {
28
}
# ai areas that the orders will use these buffers in
area = europe
}
}
YUW_accept_BYG_access = {
allowed = {
tag = YUW # not original_tag to avoid Vichy weirdness
}
enable = {
date > 1940.9.9
BYG = {
is_ai = yes
NOT = {
OR = {
is_in_faction_with = YUW
has_military_access_to = YUW
}
}
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = diplo_action_acceptance
id = BYG
target = military_access
value = 1000
}
}
TUW_TIX_will_probably_join_SAD = {
# if SAD is going to war with us, consider TIX as a threat as well
allowed = {
original_tag = YUW
}
enable = {
TIX = {
has_government = fascism
NOT = {
has_war_with = YUW
}
}
SAD = {
has_government = fascism
OR = {
is_in_faction = no
is_in_faction_with = TIX
}
OR = {
# check if we are declaring on YUW
OR = {
has_war_with = YUW
is_justifying_wargoal_against = YUW
has_wargoal_against = YUW
}
# check if we are declaring on any guarantee of YUW
YUW = {
any_guaranteed_country = {
SAD = {
OR = {
has_war_with = PREV
is_justifying_wargoal_against = PREV
has_wargoal_against = PREV
}
}
}
}
}
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = prepare_for_war
id = TIX
value = 100
}
}
YUW_why_push_into_germany_their_food_is_horrible = {
allowed = {
original_tag = YUW
}
enable = {
date < 1941.1.1 # Deactivate after some time
surrender_progress < 0.01 # We haven't lost territories
# Once Germany launches some kind of attack on the low countries, or if they go somewhere dangerous, we can try if we want to
GER = { NOT = { has_war_with = BEL } }
GER = { NOT = { has_war_with = HOL } }
GER = { NOT = { has_war_with = CZE } }
GER = { NOT = { has_war_with = AUS } }
GER = { NOT = { has_war_with = BFL } }
GER = { NOT = { has_war_with = SAD } }
28 = { # Alsace-Lorraine
is_fully_controlled_by = ROOT
}
42 = { # Moselland
is_controlled_by = GER
}
978 = { # Baden
is_controlled_by = GER
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = force_concentration_front_factor
state = 42 # Moselland
state = 978 # Baden
ratio = 0.95 # Only if > 95 % of the front consists of these states. This should make it deactivate if the frontline extends around the maginot
value = -100
}
ai_strategy = {
type = front_control
state = 42 # Moselland
state = 978 # Baden
ratio = 0.8
priority = 100
ordertype = front
execution_type = careful
execute_order = no # This should block France from attacking, It's a bit digital, but as the strategy should cancel if they do something weird, it should be fine
manual_attack = no
}
}
YUW_benelux_will_surely_not_fall = {
allowed = { original_tag = YUW }
enable = {
has_war_with = TIX
date < 1940.8.1
OR = {
HOL = { has_capitulated = no }
BEL = { has_capitulated = no }
}
}
abort = {
OR = {
date > 1940.8.1
AND = {
HOL = { surrender_progress > 0.30 }
BEL = { surrender_progress > 0.30 }
}
}
}
ai_strategy = {
type = dont_defend_ally_borders
id = "HOL"
value = 50
}
ai_strategy = {
type = dont_defend_ally_borders
id = "BEL"
value = 50
}
ai_strategy = {
type = dont_defend_ally_borders
id = "LUX"
value = 50
}
ai_strategy = {
type = put_unit_buffers
# french states bordering benelux
states = {
29
785
18
}
ratio = 0.1
area = europe
subtract_invasions_from_need = no
subtract_fronts_from_need = yes
}
}