##Japan unique AI for combat units JAP_stop_selling_our_weapons = { #Japan is banned from exporting weapon but can still import. allowed = { original_tag = JAP } enable = { country_exists = JAP } abort_when_not_enabled = yes ai_strategy = { type = equipment_market_for_sale_factor id = anti_air value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = anti_tank value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = infantry value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = artillery value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = motorized value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = mechanized value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = armor value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = fighter value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = tactical_bomber value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = cas value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = naval_bomber value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = strategic_bomber value = -500 } ai_strategy = { type = equipment_market_for_sale_factor id = support value = -500 } } JAP_default_naval_breakdown = { allowed = { original_tag = JAP } enable = { NOT = { has_completed_focus = JAP_blue_water_navy } } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = naval_corvettes value = 10 } ai_strategy = { type = role_ratio id = naval_frigate value = 12 } ai_strategy = { type = role_ratio id = naval_destroyer value = 12 } ai_strategy = { type = role_ratio id = naval_screen_destroyer value = 10 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = 10 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = 24 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = 6 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = 10 } ai_strategy = { type = role_ratio id = naval_carrier value = 3 } ai_strategy = { type = role_ratio id = naval_battleship value = 1 } ai_strategy = { type = role_ratio id = naval_cruiser value = 5 } } JAP_no_war_if_at_war = { allowed = { original_tag = JAP } enable = { NOT = { has_completed_focus = JAP_imperial_war_cabinet } OR = { has_war = yes is_subject = yes } } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = "CHI" value = -200 } ai_strategy = { type = declare_war id = "NKO" value = -200 } ai_strategy = { type = declare_war id = "KOR" value = -200 } ai_strategy = { type = declare_war id = "MON" value = -200 } ai_strategy = { type = declare_war id = "SOV" value = -200 } ai_strategy = { type = declare_war id = "KAZ" value = -200 } ai_strategy = { type = declare_war id = "TAJ" value = -200 } ai_strategy = { type = declare_war id = "TRK" value = -200 } ai_strategy = { type = declare_war id = "PAP" value = -200 } ai_strategy = { type = declare_war id = "IND" value = -200 } ai_strategy = { type = declare_war id = "SIN" value = -200 } ai_strategy = { type = declare_war id = "LAO" value = -200 } ai_strategy = { type = declare_war id = "WAA" value = -200 } ai_strategy = { type = declare_war id = "KAC" value = -200 } ai_strategy = { type = declare_war id = "PHI" value = -200 } ai_strategy = { type = declare_war id = "BRM" value = -200 } ai_strategy = { type = declare_war id = "RAJ" value = -200 } ai_strategy = { type = declare_war id = "UZB" value = -200 } ai_strategy = { type = declare_war id = "KYR" value = -200 } ai_strategy = { type = declare_war id = "AFG" value = -200 } ai_strategy = { type = declare_war id = "VIE" value = -200 } ai_strategy = { type = declare_war id = "MAY" value = -200 } ai_strategy = { type = declare_war id = "BRU" value = -200 } ai_strategy = { type = declare_war id = "PAK" value = -200 } ai_strategy = { type = declare_war id = "TAI" value = -200 } ai_strategy = { type = declare_war id = "HKG" value = -200 } ai_strategy = { type = declare_war id = "BAN" value = -200 } ai_strategy = { type = declare_war id = "BHU" value = -200 } ai_strategy = { type = declare_war id = "NEP" value = -200 } } JAP_historical_no_offensive_wars = { allowed = { original_tag = JAP } enable = { JAP_ai_historical_path = yes JAP_ai_not_historical_path = no has_war = no } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = "CHI" value = -200 } ai_strategy = { type = declare_war id = "KOR" value = -200 } ai_strategy = { type = declare_war id = "TAI" value = -200 } ai_strategy = { type = declare_war id = "SOV" value = -200 } ai_strategy = { type = declare_war id = "PHI" value = -200 } ai_strategy = { type = declare_war id = "VIE" value = -200 } ai_strategy = { type = declare_war id = "IND" value = -200 } ai_strategy = { type = declare_war id = "MAY" value = -200 } ai_strategy = { type = declare_war id = "AST" value = -200 } ai_strategy = { type = declare_war id = "NKO" value = -200 } ai_strategy = { type = declare_war id = "NZL" value = -200 } ai_strategy = { type = declare_war id = "CBD" value = -200 } ai_strategy = { type = declare_war id = "LAO" value = -200 } ai_strategy = { type = declare_war id = "BRM" value = -200 } } JAP_construct_additional_microchips = { allowed = { original_tag = JAP } enable = { check_variable = { resource@microchips < 0 } check_variable = { microchip_plant_total < 50 } num_of_available_civilian_factories > 14 } abort_when_not_enabled = yes ai_strategy = { type = build_building id = microchip_plant value = 50 } ai_strategy = { type = building_target id = microchip_plant value = 50 } } # JAP Air Doctrine — heavy intercept focus, strong ASW maritime patrol JAP_air_doctrine = { allowed = { original_tag = JAP } enable = { always = yes } abort_when_not_enabled = yes ai_strategy = { type = unit_ratio id = fighter value = 10 } ai_strategy = { type = unit_ratio id = cas value = 10 } ai_strategy = { type = unit_ratio id = naval_bomber value = 20 } ai_strategy = { type = unit_ratio id = tactical_bomber value = 15 } ai_strategy = { type = unit_ratio id = interceptor value = 40 } ai_strategy = { type = unit_ratio id = scout_plane value = 5 } ai_strategy = { type = unit_ratio id = suicide value = 3 } ai_strategy = { type = unit_ratio id = strategic_bomber value = 5 } } # JAP Army Doctrine — island nation, marines priority, strong SF, moderate armor JAP_army_doctrine = { allowed = { original_tag = JAP } enable = { num_of_military_factories > 10 } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = infantry value = 20 } ai_strategy = { type = role_ratio id = apc_mechanized value = 20 } ai_strategy = { type = role_ratio id = ifv_mechanized value = 30 } ai_strategy = { type = role_ratio id = armor value = 25 } ai_strategy = { type = role_ratio id = marines value = 40 } ai_strategy = { type = role_ratio id = Air_mech value = 10 } ai_strategy = { type = role_ratio id = Special_Forces value = 23 } ai_strategy = { type = force_build_armies value = 35 } } JAP_empire_naval_breakdown = { allowed = { original_tag = JAP } enable = { original_tag = JAP has_completed_focus = JAP_blue_water_navy } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = naval_corvettes value = 4 } ai_strategy = { type = role_ratio id = naval_frigate value = 8 } ai_strategy = { type = role_ratio id = naval_destroyer value = 14 } ai_strategy = { type = role_ratio id = naval_screen_destroyer value = 12 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = 14 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = 16 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = 8 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = 10 } ai_strategy = { type = role_ratio id = naval_carrier value = 12 } ai_strategy = { type = role_ratio id = naval_cruiser value = 12 } ai_strategy = { type = role_ratio id = naval_battleship value = 6 } } JAP_empire_naval_arms_race_vs_CHI = { allowed = { original_tag = JAP } enable = { has_global_flag = JAP_RETURN_OF_THE_EMPIRE_FOCUS_PATH country_exists = CHI naval_strength_ratio = { tag = CHI ratio < 1.2 } } abort_when_not_enabled = yes ai_strategy = { type = build_building id = dockyard value = 80 } ai_strategy = { type = building_target id = dockyard value = 40 } } JAP_empire_naval_arms_race_vs_USA = { allowed = { original_tag = JAP } enable = { has_global_flag = JAP_RETURN_OF_THE_EMPIRE_FOCUS_PATH country_exists = USA naval_strength_ratio = { tag = CHI ratio > 1.2 } naval_strength_ratio = { tag = USA ratio < 1.5 } } abort_when_not_enabled = yes ai_strategy = { type = build_building id = dockyard value = 120 } ai_strategy = { type = building_target id = dockyard value = 60 } } JAP_empire_industrial_base = { allowed = { original_tag = JAP } enable = { has_global_flag = JAP_RETURN_OF_THE_EMPIRE_FOCUS_PATH has_completed_focus = JAP_formalize_national_defense } abort_when_not_enabled = yes ai_strategy = { type = build_building id = arms_factory value = 40 } ai_strategy = { type = building_target id = arms_factory value = 60 } ai_strategy = { type = building_target id = industrial_complex value = 140 } } JAP_empire_indochina = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_indochina NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "VIE" value = 200 } ai_strategy = { type = antagonize id = "CBD" value = 200 } ai_strategy = { type = antagonize id = "LAO" value = 200 } ai_strategy = { type = consider_weak id = "VIE" value = 100 } ai_strategy = { type = consider_weak id = "CBD" value = 100 } ai_strategy = { type = consider_weak id = "LAO" value = 100 } ai_strategy = { type = prepare_for_war id = VIE value = 100 } ai_strategy = { type = prepare_for_war id = CBD value = 100 } ai_strategy = { type = prepare_for_war id = LAO value = 100 } } JAP_empire_myanmar = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_myanmar NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "BRM" value = 200 } ai_strategy = { type = antagonize id = "KAC" value = 200 } ai_strategy = { type = antagonize id = "WAA" value = 200 } ai_strategy = { type = antagonize id = "SHN" value = 200 } ai_strategy = { type = antagonize id = "KAR" value = 200 } ai_strategy = { type = consider_weak id = "BRM" value = 100 } ai_strategy = { type = prepare_for_war id = BRM value = 100 } } JAP_empire_pacific_islands = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_the_pacific NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = consider_weak id = "PAU" value = 100 } ai_strategy = { type = consider_weak id = "MIC" value = 100 } ai_strategy = { type = consider_weak id = "NAU" value = 100 } ai_strategy = { type = consider_weak id = "KIR" value = 100 } ai_strategy = { type = consider_weak id = "MAR" value = 100 } ai_strategy = { type = consider_weak id = "TUL" value = 100 } ai_strategy = { type = consider_weak id = "SOL" value = 100 } ai_strategy = { type = consider_weak id = "PAP" value = 100 } ai_strategy = { type = consider_weak id = "VAN" value = 100 } ai_strategy = { type = consider_weak id = "FIJ" value = 100 } ai_strategy = { type = consider_weak id = "SAM" value = 100 } ai_strategy = { type = consider_weak id = "TON" value = 100 } ai_strategy = { type = area_priority id = pacific value = 300 } } JAP_empire_south_china_sea = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_south_chinese_sea NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "PHI" value = 200 } ai_strategy = { type = antagonize id = "MAY" value = 200 } ai_strategy = { type = antagonize id = "IND" value = 200 } ai_strategy = { type = consider_weak id = "PHI" value = 100 } ai_strategy = { type = consider_weak id = "MAY" value = 100 } ai_strategy = { type = prepare_for_war id = PHI value = 100 } ai_strategy = { type = prepare_for_war id = MAY value = 100 } ai_strategy = { type = prepare_for_war id = IND value = 100 } } JAP_empire_korea = { allowed = { original_tag = JAP } enable = { OR = { has_completed_focus = JAP_reclaim_north_korea has_completed_focus = JAP_reclaim_south_korea } NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "NKO" value = 200 } ai_strategy = { type = antagonize id = "KOR" value = 200 } ai_strategy = { type = prepare_for_war id = NKO value = 150 } ai_strategy = { type = prepare_for_war id = KOR value = 150 } } JAP_empire_australia = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_australia NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "AST" value = 200 } ai_strategy = { type = antagonize id = "NZL" value = 200 } ai_strategy = { type = prepare_for_war id = AST value = 150 } ai_strategy = { type = prepare_for_war id = NZL value = 150 } } JAP_empire_taiwan = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_reclaim_taiwan NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "TAI" value = 200 } ai_strategy = { type = prepare_for_war id = TAI value = 150 } } JAP_empire_china = { allowed = { original_tag = JAP } enable = { has_completed_focus = JAP_fight_china_again naval_strength_ratio = { tag = CHI ratio > 1.5 } NOT = { surrender_progress > 0.15 } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "CHI" value = 200 } ai_strategy = { type = contain id = "CHI" value = 200 } ai_strategy = { type = prepare_for_war id = CHI value = 150 } ai_strategy = { type = area_priority id = chinese_coast value = 300 } } JAP_empire_blitz_indochina = { allowed = { original_tag = JAP } enable = { OR = { has_war_with = VIE has_war_with = CBD has_war_with = LAO } OR = { naval_strength_ratio = { tag = VIE ratio > 1 } naval_strength_ratio = { tag = CBD ratio > 1 } naval_strength_ratio = { tag = LAO ratio > 1 } } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "VIE" value = 400 } ai_strategy = { type = conquer id = "VIE" value = 400 } ai_strategy = { type = conquer id = "CBD" value = 400 } ai_strategy = { type = conquer id = "LAO" value = 400 } } JAP_empire_blitz_myanmar = { allowed = { original_tag = JAP } enable = { has_war_with = BRM naval_strength_ratio = { tag = BRM ratio > 1 } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "BRM" value = 400 } ai_strategy = { type = conquer id = "BRM" value = 400 } } JAP_empire_blitz_south_china_sea = { allowed = { original_tag = JAP } enable = { OR = { has_war_with = PHI has_war_with = MAY has_war_with = IND } OR = { naval_strength_ratio = { tag = PHI ratio > 1 } naval_strength_ratio = { tag = MAY ratio > 1 } naval_strength_ratio = { tag = IND ratio > 1 } } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "PHI" value = 400 } ai_strategy = { type = invade id = "MAY" value = 400 } ai_strategy = { type = invade id = "IND" value = 400 } ai_strategy = { type = conquer id = "PHI" value = 400 } ai_strategy = { type = conquer id = "MAY" value = 400 } ai_strategy = { type = conquer id = "IND" value = 400 } } JAP_empire_blitz_korea = { allowed = { original_tag = JAP } enable = { OR = { has_war_with = NKO has_war_with = KOR } OR = { naval_strength_ratio = { tag = NKO ratio > 1 } naval_strength_ratio = { tag = KOR ratio > 1 } } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "NKO" value = 400 } ai_strategy = { type = invade id = "KOR" value = 400 } ai_strategy = { type = conquer id = "NKO" value = 400 } ai_strategy = { type = conquer id = "KOR" value = 400 } } JAP_empire_blitz_australia = { allowed = { original_tag = JAP } enable = { OR = { has_war_with = AST has_war_with = NZL } OR = { naval_strength_ratio = { tag = AST ratio > 1 } naval_strength_ratio = { tag = NZL ratio > 1 } } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "AST" value = 400 } ai_strategy = { type = invade id = "NZL" value = 400 } ai_strategy = { type = conquer id = "AST" value = 400 } ai_strategy = { type = conquer id = "NZL" value = 400 } } JAP_empire_blitz_taiwan = { allowed = { original_tag = JAP } enable = { has_war_with = TAI naval_strength_ratio = { tag = TAI ratio > 1 } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "TAI" value = 400 } ai_strategy = { type = conquer id = "TAI" value = 400 } } JAP_empire_blitz_china = { allowed = { original_tag = JAP } enable = { has_war_with = CHI naval_strength_ratio = { tag = CHI ratio > 1.5 } } abort_when_not_enabled = yes ai_strategy = { type = invade id = "CHI" value = 400 } ai_strategy = { type = conquer id = "CHI" value = 400 } }