2024-12-19 00:15:05

This commit is contained in:
actions[bot]
2024-12-19 00:15:05 +00:00
parent f47da26778
commit 0181f8042c
7059 changed files with 649516 additions and 0 deletions

1782
src/common/ai_strategy/BFL.txt Executable file

File diff suppressed because it is too large Load Diff

556
src/common/ai_strategy/BLI.txt Executable file
View File

@@ -0,0 +1,556 @@
# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
BLI_unit_production_volunteers = {
allowed = {
original_tag = BLI
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "CSA"
value = 200
}
}
BLI_unit_production_air_at_week = {
allowed = {
original_tag = BLI
}
enable = {
num_of_military_factories < 150
NOT = {
has_idea = TY_dingzhenai
}
}
abort = {
OR = {
num_of_military_factories < 150
has_idea = TY_dingzhenai
}
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = -10000
}
ai_strategy = {
type = unit_ratio
id = cas
value = 0
}
ai_strategy = {
type = unit_ratio
id = tactical_bomber
value = -10000
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = -10000
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = fighter
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = cas
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = tactical_bomber
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = naval_bomber
value = -10000
}
}
BLI_unit_production_air_at_strong = {
allowed = {
original_tag = BLI
}
enable = {
num_of_military_factories > 150
NOT = {
has_idea = TY_dingzhenai
}
}
abort = {
OR = {
num_of_military_factories < 150
has_idea = TY_dingzhenai
}
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = 15
}
ai_strategy = {
type = unit_ratio
id = cas
value = 1
}
ai_strategy = {
type = unit_ratio
id = tactical_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = fighter
value = 30
}
ai_strategy = {
type = equipment_production_factor
id = cas
value = 1
}
ai_strategy = {
type = equipment_production_factor
id = tactical_bomber
value = -80
}
ai_strategy = {
type = equipment_production_factor
id = naval_bomber
value = -30
}
}
BLI_unit_production_army_before_1940 = {
allowed = {
original_tag = BLI
}
enable = {
country_exists = SIR
}
abort = {
NOT = { country_exists = SIR }
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = armor
value = 0
}
ai_strategy = {
type = role_ratio
id = motorized
value = 0
}
ai_strategy = {
type = role_ratio
id = infantry
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 1100
}
ai_strategy = {
type = equipment_production_factor
id = motorized
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = artillery
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 0
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "CSA"
value = 200
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
BLI_unit_production_army_after_1940 = {
allowed = {
original_tag = BLI
}
enable = {
NOT = { country_exists = SIR }
}
abort = {
always = no
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 400
}
ai_strategy = {
type = template_prio #修改模板倾向
id = infantry
value = 50
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 2000
}
ai_strategy = {
type = template_prio #修改模板倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = infantry
value = 20
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = anti_air
value = 10
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = land_heavy_tank_destroyer
value = 500
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank_destroyer
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = train
value = 1
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
BLI_template_design = {
allowed = {
original_tag = BLI
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = template_prio
id = infantry
value = 10
}
ai_strategy = {
type = template_prio
id = artillery
value = 10
}
ai_strategy = {
type = template_prio
id = motorized
value = -100
}
ai_strategy = {
type = template_prio
id = cavalry
value = 1
}
ai_strategy = {
type = template_prio
id = light_armor
value = -10
}
ai_strategy = {
type = template_prio
id = medium_armor
value = 110
}
ai_strategy = {
type = template_prio
id = modern_armor
value = 0
}
ai_strategy = {
type = template_prio
id = heavy_armor
value = 120
}
ai_strategy = {
type = template_prio
id = paratroopers
value = -10
}
ai_strategy = {
type = template_prio
id = mechanized
value = 10
}
}
BLI_naval_role_ratios_historical = {
allowed = {
original_tag = BLI
}
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 = -5
}
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
}
}
BLI_war_with_SIR = {
allowed = {
original_tag = BLI
}
enable = {
has_war_with = SIR
}
abort_when_not_enabled = yes
ai_strategy = {
type = invade
id = "SIR"
value = -1000
}
ai_strategy = {
type = front_unit_request
tag = SIR
value = 200
}
ai_strategy = {
type = front_control
tag = SIR
ratio = 0.25
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}

1824
src/common/ai_strategy/BYG.txt Executable file

File diff suppressed because it is too large Load Diff

1237
src/common/ai_strategy/CHY.txt Executable file

File diff suppressed because it is too large Load Diff

442
src/common/ai_strategy/DH1.txt Executable file
View File

@@ -0,0 +1,442 @@
DH1_zhongnanbandao = {
allowed = {
original_tag = DH1
}
enable = {
has_completed_focus = DH1_zhongnanbandao
}
abort = {
DH1 = {
controls_state = VIN.core_states
controls_state = BRM.core_states
controls_state = LAO.core_states
controls_state = SIA.core_states
controls_state = MAL.core_states
}
}
ai_strategy = {
type = front_unit_request
tag = "VIN"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "HUJ"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "YUW"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "BRM"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "LAO"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "SIA"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "MAL"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "POR"
value = 200
}
ai_strategy = {
type = support
id = "DOH"
value = 1000
}
ai_strategy = {
type = befriend
id = "DOH"
value = 1000
}
}
DH1_nanyacidalu = {
allowed = {
original_tag = DH1
}
enable = {
has_completed_focus = DH1_nanyacidalu
}
abort = {
DH1 = {
controls_state = RAJ.core_states
controls_state = BAN.core_states
controls_state = PAK.core_states
}
}
ai_strategy = {
type = front_unit_request
tag = "RAJ"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "POR"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "HUJ"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "BAN"
value = 200
}
ai_strategy = {
type = front_unit_request
tag = "PAK"
value = 200
}
ai_strategy = {
type = support
id = "DOH"
value = 1000
}
ai_strategy = {
type = befriend
id = "DOH"
value = 1000
}
}
DH1_xinanshibian = {
allowed = {
original_tag = DH1
}
enable = {
has_completed_focus = DH1_xinanshibian
}
abort = {
has_country_flag = DH1_xinanshibian_success
}
ai_strategy = {
type = front_unit_request
tag = "DOH"
value = 200
}
}
DH1_you_should_be_prepared_for_war = {
allowed = {
original_tag = DH1
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = force_build_armies
value = 1000
}
}
DH1_unit_production_at_week = {
allowed = {
original_tag = DH1
}
enable = {
num_of_military_factories < 39
NOT = {
has_idea = TY_dingzhenai
}
}
abort = {
num_of_military_factories > 39
has_idea = TY_dingzhenai
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = armor
value = 0
}
ai_strategy = {
type = role_ratio
id = infantry
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 60
}
ai_strategy = {
type = equipment_production_factor
id = artillery
value = 10
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 0
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
DH1_unit_production_at_strong = {
allowed = {
original_tag = DH1
}
enable = {
num_of_military_factories > 40
NOT = {
has_idea = TY_dingzhenai
}
}
abort = {
num_of_military_factories < 40
has_idea = TY_dingzhenai
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 20
}
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_min_factories
id = train
value = 1
}
}
DH1_naval_role_ratios_historical_strong = {
allowed = {
original_tag = DH1
}
enable = {
has_dlc = "Man the Guns"
num_of_naval_factories > 4
}
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 = 60
}
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
}
}
DH1_naval_role_ratios_historical_week = {
allowed = {
original_tag = DH1
}
enable = {
has_dlc = "Man the Guns"
num_of_naval_factories < 5
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = naval_capital_bb
value = -100
}
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
}
}

769
src/common/ai_strategy/DOH.txt Executable file
View File

@@ -0,0 +1,769 @@
DOH_fangfanchongying = {
allowed = {
original_tag = DOH
}
enable = {
has_completed_focus = DOH_fangfanjinlin
}
abort = {
OR = {
NOT = { country_exists = CHY }
is_in_faction_with = CHY
has_war_with = BFL
has_war_with = HUJ
has_war_with = BYG
}
}
ai_strategy = {
type = antagonize
id = "CHY"
value = 100
}
ai_strategy = {
type = front_unit_request
tag = CHY
value = 200
}
ai_strategy = {
type = ignore
id = "AFG"
value = 1000
}
ai_strategy = {
type = ignore
id = "BFL"
value = 1000
}
ai_strategy = {
type = ignore
id = "MON"
value = 1000
}
ai_strategy = {
type = ignore
id = "RAJ"
value = 1000
}
ai_strategy = {
type = ignore
id = "YUW"
value = 1000
}
ai_strategy = {
type = ignore
id = "HUJ"
value = 1000
}
ai_strategy = {
type = ignore
id = "POR"
value = 1000
}
ai_strategy = {
type = ignore
id = "BHU"
value = 1000
}
ai_strategy = {
type = ignore
id = "NEP"
value = 1000
}
}
DOH_weishejunfa = {
allowed = {
original_tag = DOH
}
enable = {
NOT = { has_completed_focus = DOH_weishejunfa }
}
abort = {
has_completed_focus = DOH_fangfanjinlin
}
ai_strategy = {
type = ignore
id = "CHY"
value = 300
}
ai_strategy = {
type = prepare_for_war
id = "SHX"
value = 200
}
ai_strategy = {
type = prepare_for_war
id = "XSM"
value = 200
}
ai_strategy = {
type = prepare_for_war
id = "SIK"
value = 200
}
ai_strategy = {
type = prepare_for_war
id = "YUN"
value = 200
}
ai_strategy = {
type = prepare_for_war
id = "GXC"
value = 200
}
}
DOH_unit_production_except_army = {
allowed = {
original_tag = DOH
}
enable = {
always = yes
}
abort = {
always = no
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = 75 # From 70 to 75
}
ai_strategy = {
type = unit_ratio
id = cas
value = 1
}
ai_strategy = {
type = unit_ratio
id = tactical_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = 1
}
}
DOH_dont_waste_on_offensive_air_early = {
allowed = {
original_tag = DOH
}
enable = {
date < 1940.1.1
}
abort = {
date > 1940.1.1
}
ai_strategy = {
type = equipment_variant_production_factor
id = medium_plane_airframe
value = -100
}
ai_strategy = {
type = equipment_variant_production_factor
id = large_plane_airframe
value = -100
}
}
DOH_unit_production_at_week = {
allowed = {
original_tag = DOH
}
enable = {
num_of_military_factories < 149
NOT = {
has_idea = TY_dingzhenai
}
NOT = { has_global_flag = AZ_fengkuangAI_citiao_10 }
NOT = { has_global_flag = AZ_fengkuangAI_citiao_ex }
}
abort = {
OR = {
num_of_military_factories > 150
has_idea = TY_dingzhenai
has_global_flag = AZ_fengkuangAI_citiao_10
has_global_flag = AZ_fengkuangAI_citiao_ex
}
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = armor
value = 0
}
ai_strategy = {
type = role_ratio
id = infantry
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 60
}
ai_strategy = {
type = equipment_production_factor
id = artillery
value = 10
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 0
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
DOH_unit_production_at_strong = {
allowed = {
original_tag = DOH
}
enable = {
NOT = { has_idea = TY_dingzhenai }
OR = {
num_of_military_factories > 149
has_global_flag = AZ_fengkuangAI_citiao_10
has_global_flag = AZ_fengkuangAI_citiao_ex
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 20
}
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_min_factories
id = train
value = 1
}
}
DOH_naval_role_ratios_historical_strong = {
allowed = {
original_tag = DOH
}
enable = {
has_dlc = "Man the Guns"
num_of_naval_factories > 30
}
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 = 60
}
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
}
}
DOH_naval_role_ratios_historical_week = {
allowed = {
original_tag = DOH
}
enable = {
has_dlc = "Man the Guns"
num_of_naval_factories < 30
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = naval_capital_bb
value = -100
}
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
}
}
DOH_prio_military = {
allowed = {
original_tag = DOH
}
enable = {
date > 1937.7.1
date < 1941.1.1
}
abort = {
date > 1941.1.1
}
ai_strategy = {
type = added_military_to_civilian_factory_ratio
value = 200
}
}
DOH_prio_military_even_at_peace = {
allowed = {
original_tag = DOH
}
enable = {
date > 1936.1.1
}
abort = {
OR = {
NOT = { country_exists = CHY }
CHY = { is_subject = yes }
is_in_faction_with = CHY
DOH = { controls_state = 716 }
}
}
ai_strategy = {
type = building_target
id = arms_factory
value = 10000
}
}
DOH_some_safer_places_to_build = {
allowed = {
original_tag = DOH
}
enable = {
date < 1941.1.1
}
abort = {
date > 1941.1.1
}
ai_strategy = {
type = factory_build_score_factor
target = 617
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 605
value = 200
}
ai_strategy = {
type = factory_build_score_factor
target = 618
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 760
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 619
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 757
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 758
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 752
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 601
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 322
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 604
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 755
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 754
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 283
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 753
value = 300
}
}
DOH_you_should_be_prepared_for_war = {
allowed = {
original_tag = DOH
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = force_build_armies
value = 1000
}
}
DOH_hunker_down_now = {
allowed = {
original_tag = DOH
}
enable = {
date < 1942.1.1 #We accept our fate after this point
has_war_with = CHY
surrender_progress > 0.3
}
abort = {
OR = {
date > 1942.1.1 #We accept our fate after this point
CHY = { has_war_with = BFL }
CHY = { has_war_with = BYG }
CHY = { has_war_with = YUW }
CHY = { has_war_with = HUJ }
has_global_flag = AZ_fengkuangAI_citiao_10
has_global_flag = AZ_fengkuangAI_citiao_ex
}
}
ai_strategy = {
type = front_control
tag = CHY
ratio = 0.6
priority = 100
ordertype = front
execution_type = careful
}
ai_strategy = {
type = front_unit_request
tag = CHY
value = 200
}
ai_strategy = {
type = invade
id = "CHY"
value = -200
}
}
strike_CHY_fengkuangAI = {
allowed = {
original_tag = DOH
}
enable = {
has_war_with = CHY
OR = {
has_global_flag = AZ_fengkuangAI_citiao_10
has_global_flag = AZ_fengkuangAI_citiao_ex
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_control
tag = CHY
ratio = 0.25
priority = 100
ordertype = front
execution_type = rush
}
ai_strategy = {
type = front_unit_request
tag = CHY
value = 200
}
}
DOH_war_with_CHY_at_strong = {
allowed = {
original_tag = DOH
}
enable = {
has_war_with = CHY
num_of_military_factories > 150
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = CHY
value = 200
}
ai_strategy = {
type = invade
id = "CHY"
value = 200
}
}
DOH_protect_chongqing_ore = {
allowed = {
original_tag = DOH
}
enable = {
has_war_with = CHY
surrender_progress > 0.6
}
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 = 1
# states to put garrison orders (if no state is friendly, strat is invalid)
states = {
605
751
747
}
# ai areas that the orders will use these buffers in
area = asia
}
}

2780
src/common/ai_strategy/HUJ.txt Executable file

File diff suppressed because it is too large Load Diff

981
src/common/ai_strategy/SAD.txt Executable file
View File

@@ -0,0 +1,981 @@
# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
SAD_unit_production_expect_army = {
allowed = {
original_tag = SAD
}
enable = {
always = yes
}
abort = {
always = no
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = 1000 # From 70 to 75
}
ai_strategy = {
type = unit_ratio
id = cas
value = 5 # 15 to 10
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = 5
}
ai_strategy = {
type = equipment_production_min_factories
id = train
value = 1
}
}
SAD_unit_production_at_strong = {
allowed = {
original_tag = SAD
}
enable = {
NOT = {
has_idea = TY_dingzhenai
}
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = garrison
value = 0
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 800
}
ai_strategy = {
type = template_prio #修改模板倾向
id = infantry
value = 100
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 800
}
ai_strategy = {
type = template_prio #修改模板倾向
id = armor
value = 800
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
SAD_start_production_all_time = {
allowed = {
original_tag = SAD
}
enable = {
is_in_faction_with = TIX
date > 1939.1.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = equipment_production_factor
id = fighter
value = 1500
}
ai_strategy = {
type = equipment_production_factor
id = cas
value = 10
}
ai_strategy = {
type = equipment_production_min_factories
id = infantry
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = artillery
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = anti_air
value = 1
}
}
SAD_naval_role_ratios_historical = {
allowed = {
original_tag = SAD
}
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
}
}
anti_HUJ_war_goals = {
allowed = {
original_tag = SAD
}
enable = {
country_exists = HUJ
}
abort = {
NOT = {
country_exists = HUJ
}
}
ai_strategy = {
type = antagonize
id = "HUJ"
value = 200
}
}
SAD_war_GRE = {
allowed = {
original_tag = SAD
}
enable = {
has_completed_focus = SAD_lingxiudedierzhan
}
abort = {
NOT = {
country_exists = GRE
}
}
ai_strategy = {
type = front_unit_request
tag = GRE
value = 200
}
ai_strategy = {
type = declare_war
id = "GRE"
value = 2000
}
ai_strategy = {
type = front_control
tag = GRE
ratio = 0.25
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}
TIX_ally = {
allowed = {
original_tag = SAD
}
enable = {
country_exists = TIX
}
abort = {
OR = {
NOT = { country_exists = TIX }
TIX = { NOT = { has_government = fascism } }
}
}
ai_strategy = {
type = alliance
id = "TIX"
value = 20
}
}
SAD_hold_africa = {
allowed = {
original_tag = SAD
}
enable = {
date < 1941.6.1
}
abort = {
date > 1941.6.1
}
# Tripoli
ai_strategy = {
type = theatre_distribution_demand_increase
id = 448
value = 2
}
# Benghasi
ai_strategy = {
type = theatre_distribution_demand_increase
id = 450
value = 2
}
# Alexandria
ai_strategy = {
type = theatre_distribution_demand_increase
id = 447
value = 2
}
}
SAD_template_design = {
allowed = {
original_tag = SAD
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = template_prio
id = motorized
value = 0
}
ai_strategy = {
type = template_prio
id = cavalry
value = 1
}
ai_strategy = {
type = template_prio
id = light_armor
value = 40
}
ai_strategy = {
type = template_prio
id = medium_armor
value = 0
}
ai_strategy = {
type = template_prio
id = heavy_armor
value = -50
}
ai_strategy = {
type = template_prio
id = paratroopers
value = -50
}
}
# extra scaryness around italy, this together with sufficient enemy superiority will make ai avoid transports around its coast
SAD_be_careful_transporting_through_the_med = {
allowed = {
original_tag = SAD
}
enable = {
date < 1942.1.1
has_war = yes
enemies_naval_strength_ratio > 1
}
abort = {
OR = {
date > 1942.1.1
has_war = no
enemies_naval_strength_ratio < 1
}
}
ai_strategy = {
type = naval_avoid_region
id = 68
value = 50
}
ai_strategy = {
type = naval_avoid_region
id = 169
value = 50
}
ai_strategy = {
type = naval_avoid_region
id = 29
value = 50
}
ai_strategy = {
type = naval_avoid_region
id = 168
value = 50
}
ai_strategy = {
type = naval_avoid_region
id = 69
value = 50
}
}
SAD_stockpile_less_early_game = {
allowed = {
tag = SAD
}
enable = {
tag = SAD
date < 1939.1.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = equipment_stockpile_surplus_ratio
value = -25 # reduce while we build up troops for africa etc
}
}
SAD_build_civ = {
allowed = {
original_tag = SAD
}
enable = {
date < 1936.9.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = building_target
id = industrial_complex
value = 10000
}
}
SAD_please_help_me_buget_this_my_country_is_dieing = {
allowed = {
original_tag = SAD
}
enable = {
date > 1936.9.1
date < 1937.9.1
has_war = no
}
abort_when_not_enabled = yes
ai_strategy = {
type = building_target
id = industrial_complex
value = 10000
}
}
SAD_place_for_build_factory = {
allowed = {
original_tag = SAD
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = factory_build_score_factor
target = 2
value = 500
}
ai_strategy = {
type = factory_build_score_factor
target = 162
value = 500
}
ai_strategy = {
type = factory_build_score_factor
target = 158
value = 500
}
ai_strategy = {
type = factory_build_score_factor
target = 161
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 159
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 117
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 156
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 115
value = 500
}
ai_strategy = {
type = factory_build_score_factor
target = 114
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 160
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 157
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 1
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 735
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 851
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 852
value = 400
}
ai_strategy = {
type = factory_build_score_factor
target = 849
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 850
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 39
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 736
value = 300
}
ai_strategy = {
type = factory_build_score_factor
target = 448
value = 300
}
}
spain_scw_support_SAD_resistance = {
allowed = {
original_tag = SAD
}
enable = {
has_government = fascism
country_exists = SPA
has_dlc = "La Resistance"
}
abort = {
OR = {
NOT = { country_exists = SPA }
SPA = { has_completed_focus = SPA_join_the_allies }
}
}
ai_strategy = {
type = support
id = "SPA"
value = 100
}
ai_strategy = {
type = send_volunteers_desire
id = "SPA"
value = 100
}
}
SAD_baohu_TIX = {
allowed = {
original_tag = SAD
}
enable = {
is_in_faction_with = TIX
has_war_with = HUJ
YUW = { has_capitulated = yes } # Abort when France is out of the equation
date > 1941.1.1
2 = { is_controlled_by = SAD }
}
abort_when_not_enabled = yes
ai_strategy = {
type = force_defend_ally_borders
id = "TIX"
value = 5000
}
ai_strategy = {
type = force_defend_ally_borders
value = 2000
target = mainland_europe
}
}
SAD_war_with_ETH = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = ETH
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = ETH
value = 400
}
ai_strategy = {
type = invade
id = "ETH"
value = 400
}
ai_strategy = {
type = front_control
tag = ETH
ratio = 0.8
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}
SAD_war_with_HUJ = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = HUJ
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = HUJ
value = 40
}
ai_strategy = {
type = invade
id = "HUJ"
value = 200
}
}
SAD_war_with_YUW_before_YUW_capitulated = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = YUW
}
abort = {
YUW = { has_capitulated = yes }
}
ai_strategy = {
type = front_unit_request
tag = YUW
value = 200
}
ai_strategy = {
type = front_control
tag = YUW
ratio = 0.6
priority = 100
ordertype = front
execution_type = careful
}
}
SAD_war_with_YUW = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = YUW
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = YUW
value = 200
}
ai_strategy = {
type = invade
id = "YUW"
value = 200
}
}
SAD_war_with_BYG = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = BYG
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = BYG
value = 200
}
ai_strategy = {
type = invade
id = "BYG"
value = 200
}
}
SAD_war_with_BFL_fk = {
allowed = {
original_tag = SAD
}
enable = {
has_war_with = BFL
has_idea = SAD_fkAIbuff
}
abort_when_not_enabled = yes
ai_strategy = {
type = front_unit_request
tag = BFL
value = 200
}
ai_strategy = {
type = invade
id = "BFL"
value = 200
}
ai_strategy = {
type = front_control
tag = BFL
ratio = 0.5
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}
SAD_dont_do_so_many_naval_invasions_please = { #我求你啦不要让我再看见历史国策默认难度皇家被登陆死了
allowed = { original_tag = SAD }
enable = {
is_historical_focus_on = yes
HUJ = {
is_ai = yes
}
}
ai_strategy = {
type = invasion_unit_request
tag = HUJ
value = -200
}
ai_strategy = {
type = invasion_unit_request
tag = BYG
value = -200
}
ai_strategy = {
type = invasion_unit_request
tag = YUW
value = -200
}
}
SAD_protect_bentu_ore = {
allowed = {
original_tag = TIX
}
enable = {
has_war_with = HUJ
2 = { 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 = {
2
115
117
849
162
158
161
160
}
# ai areas that the orders will use these buffers in
area = europe
}
}
SAD_helpnor = {
allowed = {
original_tag = SAD
}
enable = {
country_exists = NOR
is_in_faction_with = NOR
}
abort_when_not_enabled = yes
ai_strategy = {
type = force_defend_ally_borders
id = "NOR"
value = 200
}
}
SAD_trade_with_sweden = {
allowed = {
original_tag = SAD
}
enable = {
# if we're not communist and they're not communist
NOT = { has_government = communism }
NOT = { SWE = { has_government = communism } }
}
abort_when_not_enabled = yes
ai_strategy = {
type = equipment_market_trade_desire
id = SWE
value = 60
}
}
SAD_trade_with_germany = {
allowed = {
original_tag = SAD
}
enable = {
has_government = fascism
TIX = { has_government = fascism }
}
abort_when_not_enabled = yes
ai_strategy = {
type = equipment_market_trade_desire
id = TIX
value = 40
}
}
# lets not invade until we have europe
SAD_dont_invade_NOR_until_YUW_falls = {
allowed = {
original_tag = SAD
is_historical_focus_on = yes
}
enable = {
has_war_together_with = TIX
date < 1942.1.1 # Italy should probably stay out of Norway for a while even if France has capitulated
#YUW = {
# has_capitulated = no
#}
}
abort_when_not_enabled = yes
ai_strategy = {
type = invasion_unit_request
tag = NOR
value = -100
}
}
SAD_invasion_buffer = {
allowed = {
original_tag = SAD
}
enable = {
is_historical_focus_on = yes
date > 1942.1.1
}
abort_when_not_enabled = yes
ai_strategy = {
type = put_unit_buffers
states = {
156
117
849
157
2
162
161
### Oh no we forgot sicily! What could possibly go wrong.
}
ratio = 0.20
area = italy
subtract_invasions_from_need = no
subtract_fronts_from_need = yes
}
}

683
src/common/ai_strategy/SIR.txt Executable file
View File

@@ -0,0 +1,683 @@
# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
SIR_unit_production_volunteers = {
allowed = {
original_tag = SIR
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "CSA"
value = 200
}
}
SIR_unit_production_air_at_week = {
allowed = {
original_tag = SIR
}
enable = {
num_of_military_factories < 150
}
abort = {
num_of_military_factories > 150
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = -10000
}
ai_strategy = {
type = unit_ratio
id = cas
value = 0
}
ai_strategy = {
type = unit_ratio
id = tactical_bomber
value = -10000
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = -10000
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = fighter
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = cas
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = tactical_bomber
value = -10000
}
ai_strategy = {
type = equipment_production_factor
id = naval_bomber
value = -10000
}
}
SIR_unit_production_air_at_strong = {
allowed = {
original_tag = SIR
}
enable = {
num_of_military_factories > 150
}
abort = {
num_of_military_factories < 150
}
#Air unit factors
ai_strategy = {
type = unit_ratio
id = fighter
value = 15
}
ai_strategy = {
type = unit_ratio
id = cas
value = 5
}
ai_strategy = {
type = unit_ratio
id = tactical_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = strategic_bomber
value = 0
}
ai_strategy = {
type = unit_ratio
id = naval_bomber
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = fighter
value = 30
}
ai_strategy = {
type = equipment_production_factor
id = cas
value = 10
}
ai_strategy = {
type = equipment_production_factor
id = tactical_bomber
value = -80
}
ai_strategy = {
type = equipment_production_factor
id = naval_bomber
value = -30
}
}
SIR_unit_production_army_before_1940 = {
allowed = {
original_tag = SIR
}
enable = {
country_exists = BLI
NOT = {
has_idea = TY_dingzhenai
}
NOT = { has_global_flag = modoption_historicalbossai_on }
}
abort = {
NOT = { country_exists = BLI }
has_idea = TY_dingzhenai
has_global_flag = modoption_historicalbossai_on
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio
id = armor
value = 0
}
ai_strategy = {
type = role_ratio
id = motorized
value = 0
}
ai_strategy = {
type = role_ratio
id = infantry
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = infantry
value = 1100
}
ai_strategy = {
type = equipment_production_factor
id = motorized
value = 0
}
ai_strategy = {
type = equipment_production_factor
id = artillery
value = 1000
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 0
}
ai_strategy = {
type = send_volunteers_desire #志愿军
id = "CSA"
value = 200
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
SIR_unit_production_army_after_1940 = {
allowed = {
original_tag = SIR
}
enable = {
NOT = { country_exists = BLI }
NOT = { has_idea = TY_dingzhenai }
has_global_flag = modoption_historicalbossai_on
}
abort = {
has_global_flag = modoption_historicalbossai_on
}
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 400
}
ai_strategy = {
type = template_prio #修改模板倾向
id = infantry
value = 50
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 2000
}
ai_strategy = {
type = template_prio #修改模板倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = infantry
value = 20
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = anti_air
value = 10
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = land_heavy_tank_destroyer
value = 500
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank_destroyer
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = train
value = 1
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
SIR_unit_production_army_historicalbossai_on = {
allowed = {
original_tag = SIR
}
enable = {
has_global_flag = modoption_historicalbossai_on
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio
id = garrison
value = -100
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = 0
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = 0
}
ai_strategy = {
type = role_ratio
id = marines
value = 0
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -100
}
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 400
}
ai_strategy = {
type = template_prio #修改模板倾向
id = infantry
value = 50
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 2000
}
ai_strategy = {
type = template_prio #修改模板倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = infantry
value = 20
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = anti_air
value = 10
}
ai_strategy = {
type = equipment_production_factor #装备倾向
id = land_heavy_tank_destroyer
value = 500
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = land_heavy_tank_destroyer
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = train
value = 1
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}
SIR_template_design = {
allowed = {
original_tag = SIR
}
enable = {
always = yes
}
abort = {
always = no
}
ai_strategy = {
type = template_prio
id = infantry
value = 10
}
ai_strategy = {
type = template_prio
id = artillery
value = 10
}
ai_strategy = {
type = template_prio
id = motorized
value = -100
}
ai_strategy = {
type = template_prio
id = cavalry
value = 1
}
ai_strategy = {
type = template_prio
id = light_armor
value = -10
}
ai_strategy = {
type = template_prio
id = medium_armor
value = 110
}
ai_strategy = {
type = template_prio
id = modern_armor
value = 0
}
ai_strategy = {
type = template_prio
id = heavy_armor
value = 120
}
ai_strategy = {
type = template_prio
id = paratroopers
value = -10
}
ai_strategy = {
type = template_prio
id = mechanized
value = 10
}
}
SIR_naval_role_ratios_historical = {
allowed = {
original_tag = SIR
}
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 = cv_naval_bomber
value = 1
}
ai_strategy = {
type = unit_ratio
id = cv_fighter
value = 1
}
ai_strategy = {
type = equipment_production_factor
id = cv_fighter
value = 1
}
ai_strategy = {
type = equipment_production_factor
id = cv_naval_bomber
value = 1
}
ai_strategy = {
type = unit_ratio
id = convoy
value = 1
}
ai_strategy = {
type = equipment_production_min_factories
id = convoy
value = 1
}
}
SIR_war_with_BLI = {
allowed = {
original_tag = SIR
}
enable = {
has_war_with = BLI
}
abort_when_not_enabled = yes
ai_strategy = {
type = invade
id = "BLI"
value = -1000
}
ai_strategy = {
type = front_unit_request
tag = BLI
value = 200
}
ai_strategy = {
type = front_control
tag = BLI
ratio = 0.25
priority = 100
ordertype = front
execution_type = rush
execute_order = yes
}
}

2910
src/common/ai_strategy/TIX.txt Executable file

File diff suppressed because it is too large Load Diff

708
src/common/ai_strategy/YUW.txt Executable file
View File

@@ -0,0 +1,708 @@
# 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
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,92 @@
az_ai_jianniangshi = {
enable = {
OR = {
tag = YUW
}
date > 1938.1.1
}
ai_strategy = {
type = role_ratio
id = marines
value = 8
}
}
az_ai_highered_armored_production0 = {
enable = {
AND = {
OR = {
tag = WEX
}
num_of_military_factories > 55
}
}
ai_strategy = {
type = role_ratio
id = armor
value = 25
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 10
}
}
az_ai_highered_armored_production1 = {
enable = {
AND = {
OR = {
tag = WEX
}
num_of_military_factories > 109
}
}
ai_strategy = {
type = role_ratio
id = armor
value = 50
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 50
}
ai_strategy = {
type = role_ratio
id = infantry
value = -30
}
}
az_ai_highered_armored_production2 = {
enable = {
AND = {
OR = {
tag = WEX
}
num_of_military_factories > 209
}
}
ai_strategy = {
type = role_ratio
id = armor
value = 70
}
ai_strategy = {
type = equipment_production_factor
id = armor
value = 100
}
ai_strategy = {
type = role_ratio
id = infantry
value = -80
}
}

1760
src/common/ai_strategy/default.txt Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
dingzhenai_unit_production = {
allowed = {
OR = {
original_tag = YUW
original_tag = HUJ
original_tag = BYG
original_tag = BFL
original_tag = SAD
original_tag = TIX
original_tag = CHY
original_tag = DOH
original_tag = BLI
original_tag = SIR
original_tag = DH1
}
}
enable = {
has_idea = TY_dingzhenai
}
abort_when_not_enabled = yes
ai_strategy = {
type = role_ratio #模板倾向
id = infantry
value = 1000
}
ai_strategy = {
type = template_prio #修改模板倾向
id = infantry
value = 100
}
ai_strategy = {
type = role_ratio #模板倾向
id = armor
value = 50
}
ai_strategy = {
type = template_prio #修改模板倾向
id = armor
value = 1000
}
ai_strategy = {
type = equipment_production_min_factories #装备倾向
id = infantry
value = 1
}
ai_strategy = {
type = equipment_variant_production_factor
id = train
value = 200
}
ai_strategy = {
type = equipment_production_min_factories
id = train
value = 1
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = ignore_army_incompetence
value = 10000
}
ai_strategy = {
type = force_build_armies
value = 100
}
}