default_naval_role_ratios = { allowed = { OR = { #Random land-locked nations should never have functionoing naval AI unless they get contnet. Can reowrk at a later date any_owned_state = { is_coastal = yes } # Custom Content Nations - These can become coastal through generic means - Add if they can change their situation original_tag = BOL original_tag = ETH original_tag = AFG original_tag = TAL original_tag = ISI original_tag = SER original_tag = PAR } #Menial Nations and Custom AI Nations - Add to Custom AI if you are buildng custom AI- Default should not apply ai_for_units_is_not_disabled = yes NOT = { original_tag = USA } #United States NOT = { original_tag = CHI } #China NOT = { original_tag = AST } #Australia NOT = { original_tag = BRA } #Brazil NOT = { original_tag = CAN } #Canada NOT = { original_tag = DEN } #Denmark NOT = { original_tag = ENG } #United Kingdom NOT = { original_tag = FRA } #France NOT = { original_tag = GER } #Germany NOT = { original_tag = GRE } #Greece NOT = { original_tag = HOL } #Netherlands NOT = { original_tag = ITA } #Italy NOT = { original_tag = JAP } #Japan NOT = { original_tag = KOR } #South Korea NOT = { original_tag = NKO } #North Korea NOT = { original_tag = POR } #Portugal NOT = { original_tag = RAJ } #India NOT = { original_tag = SOV } #Russia NOT = { original_tag = SPR } #Spain NOT = { original_tag = TUR } #Turkey NOT = { original_tag = SWE } #Sweden NOT = { original_tag = IND } #Indonesia NOT = { original_tag = SIA } #Thailand NOT = { original_tag = TAI } #Taiwan NOT = { original_tag = EGY } #Egypt } enable = { always = yes } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = naval_corvettes value = 30 } ai_strategy = { type = role_ratio id = naval_frigate value = 20 } ai_strategy = { type = role_ratio id = naval_destroyer value = 10 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = 1 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = 25 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = 1 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = 1 } ai_strategy = { type = role_ratio id = naval_carrier value = 1 } ai_strategy = { type = role_ratio id = naval_cruiser value = 1 } ai_strategy = { type = role_ratio id = naval_mine_sweeper value = 5 } #ai_strategy = { type = role_ratio id = naval_mine_layer value = 5 } } global_support_naval_production = { allowed = { any_owned_state = { is_coastal = yes } ai_for_units_is_not_disabled = yes } enable = { always = yes } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = naval_support_ship value = 2 } ai_strategy = { type = role_ratio id = naval_repair_ship value = 2 } ai_strategy = { type = equipment_production_min_factories_archetype id = support_ship_hull value = 1 } ai_strategy = { type = equipment_production_min_factories_archetype id = repair_ship_hull value = 1 } } global_produce_floating_harbors = { allowed = { any_owned_state = { is_coastal = yes } ai_for_units_is_not_disabled = yes } enable = { has_war = yes has_tech = tech_landing_craft_1 num_of_naval_factories > 15 } abort_when_not_enabled = yes # unit_ratio on floating_harbor is an absolute desired count, not a ratio ai_strategy = { type = unit_ratio id = floating_harbor value = 5 } } ##Generic Naval peace_time_naval_missions = { allowed = { ai_for_units_is_not_disabled = yes } enable = { has_war = no } abort_when_not_enabled = yes ai_strategy = { type = naval_mission_threshold id = "MISSION_PATROL" value = 20000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_STRIKE_FORCE" value = 18000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_ESCORT" value = 22000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_RAIDING" value = 18000 } } halt_sub_missions = { allowed = { ai_for_units_is_not_disabled = yes } enable = { OR = { fuel_ratio < 0.20 alliance_naval_strength_ratio < 0.25 AND = { has_war = yes any_enemy_country = { strength_ratio = { tag = ROOT ratio = 0.25 } } } } } abort_when_not_enabled = yes ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_RAIDING" value = 50000 } } conserve_fuel = { allowed = { ai_for_units_is_not_disabled = yes } enable = { fuel_ratio < 0.15 } abort_when_not_enabled = yes ai_strategy = { type = naval_mission_threshold id = "MISSION_STRIKE_FORCE" value = 120000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_RAIDING" value = 120000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_PLANTING" value = 120000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_SWEEPING" value = 120000 } } conserve_fuel_if_fighting_landlocked_nations = { allowed = { ai_for_units_is_not_disabled = yes } enable = { has_war = yes all_enemy_country = { NOT = { any_owned_state = { is_coastal = yes } } } } abort_when_not_enabled = yes ai_strategy = { type = naval_mission_threshold id = "MISSION_PATROL" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_STRIKE_FORCE" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_ESCORT" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_RAIDING" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_PLANTING" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_SWEEPING" value = 200000 } } conserve_fuel_peace_time = { allowed = { ai_for_units_is_not_disabled = yes } enable = { has_war = no has_navy_size = { size > 0 } fuel_ratio < 1.0 } abort_when_not_enabled = yes ai_strategy = { type = naval_mission_threshold id = "MISSION_PATROL" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_STRIKE_FORCE" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_ESCORT" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_CONVOY_RAIDING" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_PLANTING" value = 200000 } ai_strategy = { type = naval_mission_threshold id = "MISSION_MINES_SWEEPING" value = 200000 } } #Fighting across the entire pacific, so asian / oceanean vs north/south american north_pacific_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes OR = { any_enemy_country = { capital_scope = { OR = { is_on_continent = asia is_on_continent = australia } } } AND = { capital_scope = { OR = { is_on_continent = asia is_on_continent = australia } } any_enemy_country = { capital_scope = { OR = { is_on_continent = north_america is_on_continent = south_america } } } } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = hawaii_sea_control_zone value = 60 } ai_strategy = { type = naval_dominance id = west_pacific_sea_control_zone value = 60 } ai_strategy = { type = naval_dominance id = south_west_pacific_sea_control_zone value = 60 } } naval_war_chinese_coastline = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes OR = { has_war_with = CHI has_war_with = KOR has_war_with = JAP has_war_with = NKO has_war_with = TAI has_war_with = VIE } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = south_china_sea_control_zone value = 70 } ai_strategy = { type = naval_dominance id = tiawan_china_sea_control_zone value = 90 } ai_strategy = { type = naval_dominance id = north_china_sea_control_zone value = 40 } ai_strategy = { type = naval_dominance id = japan_sea_control_zone value = 80 } } middle_eastern_naval_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { capital_scope = { is_on_continent = middle_east } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = eastern_med_zone value = 60 } ai_strategy = { type = naval_dominance id = middle_eastern_coasts value = 80 } } med_naval_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { any_state_in = { ai_area = 12 } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = western_med_zone value = 80 } ai_strategy = { type = naval_dominance id = central_med_zone value = 80 } ai_strategy = { type = naval_dominance id = eastern_med_zone value = 80 } } north_atlantic_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes OR = { any_enemy_country = { capital_scope = { is_on_continent = europe } } AND = { any_enemy_country = { capital_scope = { is_on_continent = north_america } } capital_scope = { OR = { is_on_continent = south_america is_on_continent = europe is_on_continent = africa is_on_continent = middle_east } } } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = east_north_atlantic value = 80 } ai_strategy = { type = naval_dominance id = west_north_atlantic value = 80 } ai_strategy = { type = naval_dominance id = north_north_atlantic value = 80 } } south_atlantic_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { capital_scope = { OR = { is_on_continent = south_america is_on_continent = africa } } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = central_south_atlantic value = 80 } ai_strategy = { type = naval_dominance id = west_south_atlantic value = 80 } ai_strategy = { type = naval_dominance id = east_south_atlantic value = 80 } } indo_china_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { any_state_in = { ai_area = 18 } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = east_indo_pacific value = 80 } ai_strategy = { type = naval_dominance id = west_indo_pacific value = 80 } ai_strategy = { type = naval_dominance id = north_indo_pacific value = 80 } } east_indian_ocean_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { any_state_in = { ai_area = 19 } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = east_indian_ocean value = 80 } } west_indian_ocean_war = { allowed = { has_navy_size = { size > 0 } } enable = { has_war = yes any_enemy_country = { any_state_in = { ai_area = 20 } } } abort_when_not_enabled = yes ai_strategy = { type = naval_dominance id = west_indian_ocean value = 80 } } ship_limiter = { allowed = { has_game_rule = { rule = allow_division_limiter option = yes } ai_for_units_is_not_disabled = yes } enable = { check_variable = { num_ships > ship_limiter_limit } } abort_when_not_enabled = yes ai_strategy = { type = unit_ratio id = convoy value = 250 } ai_strategy = { type = role_ratio id = naval_corvettes value = -30 } ai_strategy = { type = role_ratio id = naval_frigate value = -30 } ai_strategy = { type = role_ratio id = naval_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_screen_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = -30 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = -30 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = -30 } ai_strategy = { type = role_ratio id = naval_carrier value = -30 } ai_strategy = { type = role_ratio id = naval_cruiser value = -30 } ai_strategy = { type = role_ratio id = naval_mine_sweeper value = -30 } } ship_limiter_potato_edition = { allowed = { has_game_rule = { rule = allow_division_limiter option = potato_edition } ai_for_units_is_not_disabled = yes } enable = { check_variable = { num_ships > ship_limiter_limit } } abort_when_not_enabled = yes ai_strategy = { type = equipment_variant_production_factor id = convoy value = 250 } ai_strategy = { type = unit_ratio id = convoy value = 250 } ai_strategy = { type = role_ratio id = naval_corvettes value = -30 } ai_strategy = { type = role_ratio id = naval_frigate value = -30 } ai_strategy = { type = role_ratio id = naval_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_screen_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = -30 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = -30 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = -30 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = -30 } ai_strategy = { type = role_ratio id = naval_carrier value = -30 } ai_strategy = { type = role_ratio id = naval_cruiser value = -30 } ai_strategy = { type = role_ratio id = naval_mine_sweeper value = -30 } }