From 4d93d252edf7b79541536c8b66a2e340773805c0 Mon Sep 17 00:00:00 2001 From: "actions[bot]" Date: Mon, 4 Aug 2025 04:03:05 +0000 Subject: [PATCH] 2025-08-04 04:03:05 --- src/common/ai_equipment/vnr_DD_leader.txt | 13 +- src/common/ai_equipment/vnr_battleships.txt | 20 +- src/common/ai_strategy/naval_production.txt | 175 +++-- src/common/ai_strategy/vnr_naval_strategy.txt | 608 +++++++++++++++--- src/common/decisions/MTG_naval_treaty.txt | 2 +- src/common/ideas/vnr_navy_spirits.txt | 4 + src/common/technologies/MTG_naval.txt | 66 +- src/common/technologies/MTG_naval_Support.txt | 6 +- src/events/ai_ships.txt | 49 +- 9 files changed, 758 insertions(+), 185 deletions(-) diff --git a/src/common/ai_equipment/vnr_DD_leader.txt b/src/common/ai_equipment/vnr_DD_leader.txt index 0e13b5a..f8108ce 100755 --- a/src/common/ai_equipment/vnr_DD_leader.txt +++ b/src/common/ai_equipment/vnr_DD_leader.txt @@ -47,7 +47,6 @@ naval_screen_leader = { priority = { base = 1 - modifier = { factor = 10 tag = BYG } modifier = { factor = 25 tag = YUW } modifier = { factor = 0.1 has_tech = improved_ship_hull_light } } @@ -59,7 +58,7 @@ naval_screen_leader = { type = vnr_ship_hull_light_3 modules = { - fixed_ship_engine_slot = light_ship_engine + fixed_ship_engine_slot = { upgrade = current any_of = { light_ship_engine_6 light_ship_engine_3 light_ship_engine_2 light_ship_engine_1 } } fixed_ship_battery_slot = ship_light_battery fixed_ship_torpedo_slot = ship_torpedo fixed_ship_fire_control_system_slot = ship_fire_control_system @@ -81,9 +80,8 @@ naval_screen_leader = { role_icon_index = 33 priority = { - base = 1 - modifier = { factor = 10 tag = BYG } - modifier = { factor = 25 tag = YUW } + base = 0 + modifier = { add = 25 tag = YUW } modifier = { factor = 0.1 has_tech = advanced_ship_hull_light } } @@ -116,9 +114,8 @@ naval_screen_leader = { role_icon_index = 33 priority = { - base = 1 - modifier = { factor = 10 tag = BYG } - modifier = { factor = 25 tag = YUW } + base = 0 + modifier = { add = 25 tag = YUW } } diff --git a/src/common/ai_equipment/vnr_battleships.txt b/src/common/ai_equipment/vnr_battleships.txt index 22ca0aa..471de9f 100755 --- a/src/common/ai_equipment/vnr_battleships.txt +++ b/src/common/ai_equipment/vnr_battleships.txt @@ -3,7 +3,7 @@ naval_capital_battleship = { #available_for = {} #blocked_for = {} roles = { vnr_naval_capital_bb } - priority = { base = 50 } + priority = { base = 75 } capital_battleship_1924 = { name = vnr_bb_1924 @@ -61,8 +61,8 @@ naval_capital_battleship = { modules = { fixed_ship_battery_slot = ship_heavy_battery_triple fixed_ship_anti_air_slot = ship_anti_air - fixed_ship_fire_control_system_slot = ship_fire_control_system - fixed_ship_radar_slot = { any_of = { ship_radar ship_mast } } + fixed_ship_fire_control_system_slot = { upgrade > current any_of = { ship_fire_control_system } } + fixed_ship_radar_slot = { upgrade > current any_of = { ship_radar ship_mast } } fixed_ship_engine_slot = { upgrade = current any_of = { heavy_ship_engine_3 heavy_ship_engine_2 heavy_ship_engine_1 } } fixed_ship_secondaries_slot = ship_dp_secondaries_bb fixed_ship_armor_slot = { upgrade = current any_of = { ship_armor_bb_2 ship_armor_bb_1 } } @@ -97,8 +97,8 @@ naval_capital_battleship = { modules = { fixed_ship_battery_slot = ship_heavy_battery_triple fixed_ship_anti_air_slot = ship_anti_air - fixed_ship_fire_control_system_slot = ship_fire_control_system - fixed_ship_radar_slot = ship_radar + fixed_ship_fire_control_system_slot = { upgrade > current any_of = { ship_fire_control_system } } + fixed_ship_radar_slot = { upgrade > current any_of = { ship_radar } } fixed_ship_engine_slot = { upgrade = current any_of = { heavy_ship_engine_4 heavy_ship_engine_3 heavy_ship_engine_2 heavy_ship_engine_1 } } fixed_ship_secondaries_slot = ship_dp_secondaries_bb fixed_ship_armor_slot = { any_of = { ship_armor_bb_3 ship_armor_bb_2 ship_armor_bb_1 } } @@ -135,8 +135,8 @@ naval_capital_battleship = { modules = { fixed_ship_battery_slot = ship_heavy_battery_triple fixed_ship_anti_air_slot = ship_anti_air - fixed_ship_fire_control_system_slot = ship_fire_control_system - fixed_ship_radar_slot = ship_radar + fixed_ship_fire_control_system_slot = { upgrade > current any_of = { ship_fire_control_system } } + fixed_ship_radar_slot = { upgrade > current any_of = { ship_radar } } fixed_ship_engine_slot = { upgrade = current any_of = { heavy_ship_engine_5 heavy_ship_engine_4 heavy_ship_engine_3 heavy_ship_engine_2 heavy_ship_engine_1 } } fixed_ship_secondaries_slot = ship_dp_secondaries_bb fixed_ship_armor_slot = { any_of = { ship_armor_bb_4 ship_armor_bb_3 ship_armor_bb_2 ship_armor_bb_1 } } @@ -173,8 +173,8 @@ naval_capital_battleship = { modules = { fixed_ship_battery_slot = ship_heavy_battery_triple fixed_ship_anti_air_slot = ship_missile_aa - fixed_ship_fire_control_system_slot = ship_fire_control_system - fixed_ship_radar_slot = ship_radar + fixed_ship_fire_control_system_slot = { upgrade > current any_of = { ship_fire_control_system } } + fixed_ship_radar_slot = { upgrade > current any_of = { ship_radar } } fixed_ship_engine_slot = { any_of = { heavy_ship_engine_4_gas heavy_ship_engine_nuclear } } fixed_ship_secondaries_slot = ship_dp_secondaries_bb fixed_ship_armor_slot = { any_of = { ship_armor_bb_4 ship_armor_bb_3 ship_armor_bb_2 ship_armor_bb_1 } } @@ -199,7 +199,7 @@ naval_capital_battleship = { priority = { base = 0 modifier = { add = 50 tag = CHY } - modifier = { factor = 0 has_navy_size = { unit = SH_battleship size > 3 } } + modifier = { factor = 0 has_navy_size = { unit = SH_battleship size > 2 } } modifier = { factor = 0 expert_ai_style = yes } } diff --git a/src/common/ai_strategy/naval_production.txt b/src/common/ai_strategy/naval_production.txt index 43b349c..23b41d1 100755 --- a/src/common/ai_strategy/naval_production.txt +++ b/src/common/ai_strategy/naval_production.txt @@ -378,7 +378,7 @@ naval_unit_role_ratios_GER_prewar_early = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 20 + value = 200 } } @@ -421,7 +421,7 @@ naval_unit_role_ratios_GER_prewar_late = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 400 + value = 1500 } } @@ -439,7 +439,7 @@ naval_unit_role_ratios_GER_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 800 + value = 1800 } ai_strategy = { @@ -475,7 +475,7 @@ naval_unit_role_ratios_GER_atwar_many_shipyard = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 1000 + value = 1500 } ai_strategy = { @@ -525,7 +525,7 @@ naval_unit_role_ratios_GER_atwar_knock_USA = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 120 + value = 1000 } ai_strategy = { @@ -581,7 +581,7 @@ naval_unit_role_ratios_GER_atwar_No_Naval_Competitor = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 20 + value = 100 } ai_strategy = { @@ -695,7 +695,7 @@ naval_unit_role_ratios_ENG_prewar_early = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 50 + value = 200 } ai_strategy = { @@ -754,7 +754,7 @@ naval_unit_role_ratios_ENG_prewar_late = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 50 + value = 450 } ai_strategy = { @@ -783,7 +783,7 @@ naval_unit_role_ratios_ENG_prewar_late = { ai_strategy = { type = dockyard_to_military_factory_ratio - value = 90 + value = 120 } } @@ -824,12 +824,12 @@ naval_unit_role_ratios_ENG_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 80 + value = 300 } ai_strategy = { type = dockyard_to_military_factory_ratio - value = 100 + value = 150 } } @@ -1246,7 +1246,7 @@ naval_unit_role_ratios_JAP_prewar_naval_treaty = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 60 + value = 150 } ai_strategy = { type = role_ratio @@ -1295,7 +1295,7 @@ naval_unit_role_ratios_JAP_prewar_enough_carrier = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 95 + value = 250 } ai_strategy = { type = role_ratio @@ -1315,12 +1315,12 @@ naval_unit_role_ratios_JAP_prewar_enough_carrier = { ai_strategy = { type = role_ratio id = vnr_naval_capital_bb - value = 100 + value = 60 } ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 50 + value = 60 } ai_strategy = { type = dockyard_to_military_factory_ratio @@ -1345,7 +1345,7 @@ naval_unit_role_ratios_JAP_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 90 + value = 350 } ai_strategy = { type = role_ratio @@ -1370,7 +1370,7 @@ naval_unit_role_ratios_JAP_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 45 + value = 65 } ai_strategy = { type = dockyard_to_military_factory_ratio @@ -1398,7 +1398,7 @@ naval_unit_role_ratios_JAP_late_peace = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 90 + value = 250 } ai_strategy = { type = role_ratio @@ -1428,7 +1428,7 @@ naval_unit_role_ratios_JAP_late_peace = { ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 35 + value = 50 } ai_strategy = { type = dockyard_to_military_factory_ratio @@ -1458,13 +1458,13 @@ naval_unit_role_ratios_USA_great_depression = { ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 5 + value = 20 } ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 45 + value = 500 } ai_strategy = { @@ -1476,7 +1476,7 @@ naval_unit_role_ratios_USA_great_depression = { ai_strategy = { type = role_ratio id = vnr_naval_screen_leader - value = 10 + value = 1 } ai_strategy = { @@ -1506,19 +1506,14 @@ naval_unit_role_ratios_USA_go_to_war = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 90 + value = 1000 } ai_strategy = { type = role_ratio id = vnr_naval_screen value = 320 } - ai_strategy = { - type = role_ratio - id = vnr_naval_screen_leader - value = 10 - } - + ai_strategy = { type = role_ratio id = vnr_naval_cruiser_light @@ -1528,24 +1523,24 @@ naval_unit_role_ratios_USA_go_to_war = { ai_strategy = { type = role_ratio id = vnr_naval_cruiser_medium - value = 20 + value = 40 } ai_strategy = { type = role_ratio id = vnr_naval_capital_bb - value = 60 + value = 80 } ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 45 + value = 60 } ai_strategy = { type = dockyard_to_military_factory_ratio - value = 80 + value = 130 } } @@ -1562,12 +1557,12 @@ naval_unit_role_ratios_USA_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 80 + value = 800 } ai_strategy = { type = role_ratio id = vnr_naval_screen - value = 600 + value = 400 } ai_strategy = { type = role_ratio @@ -1589,12 +1584,12 @@ naval_unit_role_ratios_USA_atwar = { ai_strategy = { type = role_ratio id = vnr_naval_carrier - value = 70 + value = 90 } ai_strategy = { type = dockyard_to_military_factory_ratio - value = 150 + value = 200 } } @@ -1613,7 +1608,7 @@ naval_unit_role_ratios_ITA_prewar_build_battleships = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 40 + value = 250 } ai_strategy = { type = role_ratio @@ -1658,7 +1653,7 @@ naval_unit_role_ratios_ITA_prewar_enough_battleships = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 140 + value = 300 } ai_strategy = { type = role_ratio @@ -1706,7 +1701,7 @@ naval_unit_role_ratios_ITA_atwar_with_England = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 100 + value = 450 } ai_strategy = { type = role_ratio @@ -1754,7 +1749,7 @@ naval_unit_role_ratios_ITA_atwar_with_major = { ai_strategy = { type = role_ratio id = vnr_naval_submarine - value = 70 + value = 350 } ai_strategy = { type = role_ratio @@ -2238,13 +2233,13 @@ we_need_cv_planes_1 = { ai_strategy = { type = unit_ratio id = cv_naval_bomber - value = 10 + value = 20 } ai_strategy = { type = unit_ratio id = cv_cas - value = 1 + value = 15 } ai_strategy = { @@ -2262,7 +2257,7 @@ we_need_cv_planes_1 = { ai_strategy = { type = equipment_production_factor id = cv_cas - value = 1 + value = 30 } ai_strategy = { @@ -2315,7 +2310,7 @@ we_need_cv_planes_2 = { ai_strategy = { type = unit_ratio id = cv_cas - value = 1 + value = 30 } ai_strategy = { @@ -2333,7 +2328,7 @@ we_need_cv_planes_2 = { ai_strategy = { type = equipment_production_factor id = cv_cas - value = 1 + value = 35 } ai_strategy = { @@ -2351,7 +2346,7 @@ we_need_cv_planes_2 = { ai_strategy = { type = equipment_production_min_factories id = cv_cas - value = 1 + value = 3 } ai_strategy = { @@ -2385,7 +2380,7 @@ we_need_cv_planes_3 = { ai_strategy = { type = unit_ratio id = cv_cas - value = 1 + value = 45 } ai_strategy = { @@ -2403,7 +2398,7 @@ we_need_cv_planes_3 = { ai_strategy = { type = equipment_production_factor id = cv_cas - value = 1 + value = 50 } ai_strategy = { @@ -2421,7 +2416,7 @@ we_need_cv_planes_3 = { ai_strategy = { type = equipment_production_min_factories id = cv_cas - value = 1 + value = 5 } ai_strategy = { @@ -2467,4 +2462,84 @@ restrict_early_landing = { type = naval_invasion_focus value = -1000 } +} + +upgrade_cv_plane_strategy_1 = { + allowed = { + always = yes + } + enable = { + has_tech = improved_small_airframe + NOT = { has_tech = advanced_small_airframe } + } + abort_when_not_enabled = yes + + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_airframe_2 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_naval_bomber_airframe_2 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_cas_airframe_2 + value = 1000 + } +} + +upgrade_cv_plane_strategy_2 = { + allowed = { + always = yes + } + enable = { + has_tech = advanced_small_airframe + NOT = { has_tech = modern_small_airframe } + } + abort_when_not_enabled = yes + + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_airframe_3 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_naval_bomber_airframe_3 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_cas_airframe_3 + value = 1000 + } +} + +upgrade_cv_plane_strategy_3 = { + allowed = { + always = yes + } + enable = { + has_tech = modern_small_airframe + } + abort_when_not_enabled = yes + + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_airframe_4 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_naval_bomber_airframe_4 + value = 1000 + } + ai_strategy = { + type = production_upgrade_desire_offset + id = cv_small_plane_cas_airframe_4 + value = 1000 + } } \ No newline at end of file diff --git a/src/common/ai_strategy/vnr_naval_strategy.txt b/src/common/ai_strategy/vnr_naval_strategy.txt index 26aca4b..337dbad 100755 --- a/src/common/ai_strategy/vnr_naval_strategy.txt +++ b/src/common/ai_strategy/vnr_naval_strategy.txt @@ -15,17 +15,17 @@ ENG_protect_home_waters = { ai_strategy = { type = strike_force_home_base id = 18 - value = 800 + value = 1000 } ai_strategy = { type = strike_force_home_base id = 16 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 18 - value = -300 + value = -1000 } } @@ -45,18 +45,23 @@ ENG_secure_mediterranean = { ai_strategy = { type = strike_force_home_base id = 29 - value = 100 + value = 150 } ai_strategy = { type = strike_force_home_base id = 68 - value = 20 + value = 100 } ai_strategy = { type = strike_force_home_base id = 69 value = 200 } + ai_strategy = { + type = naval_avoid_region + id = 168 + value = 800 + } } ENG_avoid_pacific = { @@ -66,19 +71,20 @@ ENG_avoid_pacific = { } enable = { has_war_with = CHY - has_war_with = TIX + has_war_with = SAD + ITA = { has_navy_size = { size > 99 } } enable_vnr_naval_ai = yes } abort_when_not_enabled = yes ai_strategy = { type = naval_avoid_region id = 75 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 72 - value = 20 + value = 50 } ai_strategy = { type = naval_avoid_region @@ -87,6 +93,55 @@ ENG_avoid_pacific = { } } +ENG_reinforce_pacific = { + allowed = { + has_dlc = "Man the Guns" + original_tag = HUJ + } + enable = { + has_war_with = CHY + OR = { + NOT = { has_war_with = SAD } + ITA = { has_navy_size = { size < 100 } } + } + 336 = { + is_controlled_by_ROOT_or_ally = yes + } + enable_vnr_naval_ai = yes + } + abort_when_not_enabled = yes + ai_strategy = { + type = strike_force_home_base + id = 72 + value = 1000 + } + ai_strategy = { + type = strike_force_home_base + id = 91 + value = 10 + } + ai_strategy = { + type = strike_force_home_base + id = 92 + value = 10 + } + ai_strategy = { + type = strike_force_home_base + id = 93 + value = 10 + } + ai_strategy = { + type = strike_force_home_base + id = 84 + value = 300 + } + ai_strategy = { + type = strike_force_home_base + id = 83 + value = 300 + } +} + ### CHY ### JAP_destroy_china_navy_quick = { allowed = { @@ -102,7 +157,7 @@ JAP_destroy_china_navy_quick = { ai_strategy = { type = strike_force_home_base id = 75 - value = 10 + value = 100 } ai_strategy = { type = strike_force_home_base @@ -114,6 +169,22 @@ JAP_destroy_china_navy_quick = { id = 77 value = 200 } + + ai_strategy = { + type = naval_convoy_raid_region + id = 75 + value = 100 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 76 + value = 200 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 77 + value = 200 + } } JAP_pacific_war_naval_stage_one = { @@ -221,8 +292,11 @@ USA_pacific_war_naval_avoid_first = { original_tag = BYG } enable = { - has_war_with = CHY - date < 1943.1.1 + OR = { + has_war_with = CHY + threat > 0.7 + } + date < 1942.5.1 naval_strength_ratio = { tag = CHY ratio < 5 @@ -233,27 +307,32 @@ USA_pacific_war_naval_avoid_first = { ai_strategy = { type = naval_avoid_region id = 75 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 76 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 77 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 78 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 79 - value = 100 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 80 + value = 1000 } ai_strategy = { type = naval_avoid_region @@ -263,31 +342,84 @@ USA_pacific_war_naval_avoid_first = { ai_strategy = { type = naval_avoid_region id = 90 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 94 - value = 100 - } - ai_strategy = { - type = naval_avoid_region - id = 97 - value = 100 + value = 1000 } ai_strategy = { type = naval_avoid_region id = 177 - value = 100 + value = 1000 + } + + ai_strategy = { + type = strike_force_home_base + id = 95 + value = 500 } ai_strategy = { - type = naval_avoid_region - id = 94 - value = 100 + type = strike_force_home_base + id = 97 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 105 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 180 + value = 500 } } -USA_pacific_war_naval_counterattack = { +USA_do_not_waste_fleet_in_north_pacific = { + allowed = { + has_dlc = "Man the Guns" + original_tag = BYG + } + enable = { + has_war_with = CHY + enable_vnr_naval_ai = yes + } + abort_when_not_enabled = yes + ai_strategy = { + type = strike_force_home_base + id = 87 + value = -1000 + } + ai_strategy = { + type = strike_force_home_base + id = 88 + value = -1000 + } + ai_strategy = { + type = strike_force_home_base + id = 96 + value = -1000 + } + ai_strategy = { + type = strike_force_home_base + id = 176 + value = -1000 + } + ai_strategy = { + type = strike_force_home_base + id = 114 + value = -1000 + } + ai_strategy = { + type = strike_force_home_base + id = 171 + value = -1000 + } +} + +USA_pacific_war_naval_counterattack_1 = { allowed = { has_dlc = "Man the Guns" original_tag = BYG @@ -295,55 +427,341 @@ USA_pacific_war_naval_counterattack = { enable = { has_war_with = CHY OR = { - date > 1942.12.31 + date > 1942.4.30 naval_strength_ratio = { tag = CHY ratio > 5 } } + NOT = { + controls_state = 633 + controls_state = 684 + } enable_vnr_naval_ai = yes } abort_when_not_enabled = yes - ai_strategy = { - type = strike_force_home_base - id = 75 - value = 50 - } - ai_strategy = { - type = strike_force_home_base - id = 78 - value = 50 - } - ai_strategy = { - type = strike_force_home_base - id = 94 - value = 50 - } ai_strategy = { - type = strike_force_home_base - id = 84 - value = 150 - } + type = naval_avoid_region + id = 75 + value = 1000 + } ai_strategy = { - type = strike_force_home_base - id = 95 - value = 200 - } - ai_strategy = { - type = strike_force_home_base - id = 97 - value = 200 - } - ai_strategy = { - type = strike_force_home_base - id = 180 - value = 100 - } + type = naval_avoid_region + id = 76 + value = 1000 + } ai_strategy = { - type = strike_force_home_base - id = 83 - value = 130 + type = naval_avoid_region + id = 77 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 78 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 79 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 80 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 90 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 94 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 177 + value = 1000 + } + + ai_strategy = { + type = strike_force_home_base + id = 84 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 95 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 97 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 105 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 180 + value = 500 + } + ai_strategy = { + type = invade + id = JAP + value = 500 + } + ai_strategy = { + type = naval_invasion_focus + value = 1000 + } + + ai_strategy = { + type = naval_convoy_raid_region + id = 94 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 97 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 84 + value = 300 + } + + ai_strategy = { + type = invasion_unit_request + state = 633 + value = 500 + } + ai_strategy = { + type = invasion_unit_request + state = 684 + value = 500 + } +} + +USA_pacific_war_naval_counterattack_2 = { + allowed = { + has_dlc = "Man the Guns" + original_tag = BYG } + enable = { + has_war_with = CHY + OR = { + date > 1942.4.30 + naval_strength_ratio = { + tag = CHY + ratio > 5 + } + } + controls_state = 633 + controls_state = 684 + NOT = { + controls_state = 645 + } + enable_vnr_naval_ai = yes + } + abort_when_not_enabled = yes + ai_strategy = { + type = naval_avoid_region + id = 75 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 76 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 77 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 79 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 80 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 90 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 177 + value = 1000 + } + + ai_strategy = { + type = strike_force_home_base + id = 84 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 95 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 97 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 94 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 78 + value = 1000 + } + ai_strategy = { + type = invade + id = JAP + value = 1000 + } + ai_strategy = { + type = naval_invasion_focus + value = 1000 + } + + ai_strategy = { + type = naval_convoy_raid_region + id = 94 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 97 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 84 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 78 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 76 + value = 300 + } + + ai_strategy = { + type = invasion_unit_request + state = 645 + value = 500 + } +} + +USA_pacific_war_naval_counterattack_3 = { + allowed = { + has_dlc = "Man the Guns" + original_tag = BYG + } + enable = { + has_war_with = CHY + OR = { + date > 1942.4.30 + naval_strength_ratio = { + tag = CHY + ratio > 5 + } + } + controls_state = 633 + controls_state = 684 + controls_state = 645 + enable_vnr_naval_ai = yes + } + abort_when_not_enabled = yes + ai_strategy = { + type = naval_avoid_region + id = 77 + value = 1000 + } + ai_strategy = { + type = naval_avoid_region + id = 79 + value = 1000 + } + + ai_strategy = { + type = strike_force_home_base + id = 75 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 80 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 76 + value = 1000 + } + ai_strategy = { + type = strike_force_home_base + id = 94 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 78 + value = 500 + } + ai_strategy = { + type = invade + id = JAP + value = 1000 + } + ai_strategy = { + type = naval_invasion_focus + value = 1000 + } + + ai_strategy = { + type = naval_convoy_raid_region + id = 78 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 76 + value = 300 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 90 + value = 300 + } + + ai_strategy = { + type = invasion_unit_request + state = 526 + value = 500 + } } ### SAD ### @@ -353,41 +771,61 @@ ITA_avoid_mediterranean = { original_tag = SAD } enable = { - has_war_with = HUJ - has_navy_size = { size < 100 } + OR = { + has_war_with = HUJ + threat > 0.4 + } + has_navy_size = { size < 250 } enable_vnr_naval_ai = yes } abort_when_not_enabled = yes ai_strategy = { type = strike_force_home_base id = 29 - value = -100 + value = -1000 } ai_strategy = { type = strike_force_home_base id = 68 - value = -100 + value = -1000 } ai_strategy = { type = strike_force_home_base id = 69 - value = -100 - } - ai_strategy = { - type = naval_avoid_region - id = 29 - value = 100 - } - ai_strategy = { - type = naval_avoid_region - id = 68 - value = 100 - } - ai_strategy = { - type = naval_avoid_region - id = 69 - value = 100 + value = -1000 } + + ai_strategy = { + type = strike_force_home_base + id = 168 + value = 500 + } + ai_strategy = { + type = strike_force_home_base + id = 169 + value = 500 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 68 + value = 100 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 69 + value = 100 + } + ai_strategy = { + type = naval_convoy_raid_region + id = 29 + value = 100 + } + + ai_strategy = { + type = naval_avoid_region + id = 29 + value = 800 + } } ### TIX ### diff --git a/src/common/decisions/MTG_naval_treaty.txt b/src/common/decisions/MTG_naval_treaty.txt index ba6a855..902efce 100755 --- a/src/common/decisions/MTG_naval_treaty.txt +++ b/src/common/decisions/MTG_naval_treaty.txt @@ -214,7 +214,7 @@ MTG_naval_treaties = { fire_only_once = yes ai_will_do = { - factor = 3 + factor = 50 modifier = { tag = CHY factor = 5 #The Yamato is a 35,000 ton ship what are you talking about diff --git a/src/common/ideas/vnr_navy_spirits.txt b/src/common/ideas/vnr_navy_spirits.txt index 6b7e9af..6f9e94f 100755 --- a/src/common/ideas/vnr_navy_spirits.txt +++ b/src/common/ideas/vnr_navy_spirits.txt @@ -91,6 +91,10 @@ ideas = { instant = yes build_cost_ic = 0.1 } + ship_hull_cruiser = { + instant = yes + build_cost_ic = 0.1 + } } modifier = { ship_hull_heavy_design_cost_factor = 0.4 diff --git a/src/common/technologies/MTG_naval.txt b/src/common/technologies/MTG_naval.txt index 222e41c..b14dd98 100755 --- a/src/common/technologies/MTG_naval.txt +++ b/src/common/technologies/MTG_naval.txt @@ -416,6 +416,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } improved_depth_charges = { @@ -457,6 +458,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } advanced_depth_charges = { @@ -497,6 +499,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } modern_depth_charges = { @@ -539,6 +542,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } rocket_depth_charges = { @@ -579,6 +583,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } sonar = { @@ -613,13 +618,13 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } improved_sonar = { enable_equipment_modules = { ship_sonar_2 - ship_bulbous_bow } on_research_complete = { custom_effect_tooltip = sonar_advice_tt @@ -651,12 +656,14 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } advanced_sonar = { enable_equipment_modules = { ship_sonar_3 + ship_bulbous_bow } on_research_complete = { custom_effect_tooltip = sonar_advice_tt @@ -692,6 +699,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } @@ -729,6 +737,7 @@ technologies = { asw_tech ship_modules_tech mio_cat_tech_all_screen_ship_and_modules + mio_cat_tech_all_destroyer_and_modules } } @@ -3306,7 +3315,7 @@ technologies = { research_cost = 0.6 - refit_ic_cost = -0.2 + refit_speed = 0.15 start_year = 1930 @@ -3437,13 +3446,13 @@ technologies = { research_cost = 0.75 start_year = 1940 - naval_retreat_speed_after_initial_combat = 0.1 + naval_retreat_speed_after_initial_combat = 0.25 SH_battleship = { water_fjords = { - movement = 0.025 + movement = 0.05 } water_shallow_sea = { - movement = 0.025 + movement = 0.05 } water_deep_ocean = { movement = 0.05 @@ -3929,7 +3938,7 @@ technologies = { early_carrier_study = { enable_equipment_modules = { - ship_deck_space + ship_deck_space_open ship_deck_space_small ship_deck_space_more carrier_spared_squad @@ -4059,6 +4068,10 @@ technologies = { leads_to_tech = aviation_dawn research_cost_coeff = 1 } + dependencies = { + landing_aid_system = 1 + arresting_gear = 1 + } research_cost = 1.5 @@ -4228,16 +4241,21 @@ technologies = { } arresting_gear = { - research_cost = 0.5 + research_cost = 0.75 start_year = 1925 - sortie_efficiency = 0.05 + sortie_efficiency = 0.1 folder = { name = mtgnavalfolder position = { x = 0 y = @1924_module } } + path = { + leads_to_tech = basic_ship_hull_carrier + research_cost_coeff = 1 + } + ai_will_do = { factor = 1 } @@ -4251,11 +4269,13 @@ technologies = { } landing_aid_system = { - research_cost = 0.5 + research_cost = 0.75 start_year = 1925 - carrier_traffic = 0.1 - carrier_night_traffic = 0.05 + air_accidents_factor = -0.05 + carrier = { + reliability = 0.05 + } enable_equipment_modules = { carrier_aviation_control_unit } @@ -4265,6 +4285,11 @@ technologies = { position = { x = -2 y = @1924_module } } + path = { + leads_to_tech = basic_ship_hull_carrier + research_cost_coeff = 1 + } + ai_will_do = { factor = 2 } @@ -4285,7 +4310,8 @@ technologies = { xp_boost_cost = 20 xp_research_bonus = 1.25 - air_carrier_night_penalty_reduction_factor = 0.1 + air_carrier_night_penalty_reduction_factor = 0.05 + carrier_night_traffic = 0.05 folder = { name = mtgnavalfolder @@ -4403,13 +4429,18 @@ technologies = { carrier_damage_control = { research_cost = 1.25 - start_year = 1940 + start_year = 1941 xp_research_type = navy xp_boost_cost = 20 xp_research_bonus = 1.25 + dependencies = { + damage_control_3 = 1 + } + carrier = { + max_organisation = 10 max_strength = 0.1 reliability = 0.05 } @@ -4542,9 +4573,7 @@ technologies = { xp_research_bonus = 1.25 carrier_capacity_penalty_reduction = -0.1 - carrier = { - anti_air_attack = 0.1 - } + fighter_sortie_efficiency = 0.15 folder = { name = mtgnavalfolder @@ -4618,6 +4647,7 @@ technologies = { armor_value = 0.2 anti_air_attack = 0.05 reliability = 0.05 + max_organisation = 10 } enable_equipment_modules = { carrier_strength_deck @@ -4768,7 +4798,7 @@ technologies = { research_cost = 1 start_year = 1951 - carrier_traffic = 0.1 + air_accidents_factor = -0.1 carrier_night_traffic = 0.1 folder = { @@ -5733,6 +5763,8 @@ technologies = { enable_equipment_modules = { ship_hull_cruiser_role_rc ship_cruiser_camo_1 + ship_hull_cruiser_role_pz + ship_hull_cruiser_role_pbb } research_cost = 0.6 diff --git a/src/common/technologies/MTG_naval_Support.txt b/src/common/technologies/MTG_naval_Support.txt index 5cd3bf0..afac8f7 100755 --- a/src/common/technologies/MTG_naval_Support.txt +++ b/src/common/technologies/MTG_naval_Support.txt @@ -2051,7 +2051,7 @@ technologies = { ### # # # # # # ## ### ## ## # # # # # ## ### damage_control_1 = { - + start_year = 1918 research_cost = 0.75 path = { leads_to_tech = damage_control_2 @@ -2092,7 +2092,7 @@ technologies = { } damage_control_2 = { - + start_year = 1938 research_cost = 0.75 path = { leads_to_tech = damage_control_3 @@ -2133,7 +2133,7 @@ technologies = { } damage_control_3 = { - + start_year = 1940 research_cost = 1 critical_receive_chance = -0.05 naval_critical_effect_factor = -0.1 diff --git a/src/events/ai_ships.txt b/src/events/ai_ships.txt index 3941786..7b8925c 100755 --- a/src/events/ai_ships.txt +++ b/src/events/ai_ships.txt @@ -301,6 +301,7 @@ country_event = { improved_ship_hull_heavy = 1 improved_ship_hull_light = 1 improved_ship_hull_cruiser = 1 + improved_ship_hull_submarine = 1 antiair2 = 1 antiair3 = 1 improved_fire_control_system = 1 @@ -389,15 +390,10 @@ country_event = { destroyer_mass_production = 1 ducol_steel = 1 homogeneous_krupp_steel = 1 - folding_wing = 1 - carrier_mass_production = 1 - carrier_damage_control = 1 - air_fuel_storage = 1 modern_ship_torpedo_launcher = 1 - damage_control_2 = 1 - fire_control_methods_2 = 1 + fire_control_methods_3 = 1 } ai_get_navy_experience = yes } @@ -427,10 +423,9 @@ country_event = { improved_submarine_snorkel = 1 sub_AIP_engine = 1 anechoic_tile = 1 - damage_control_3 = 1 - fire_control_methods_3 = 1 radar_jammer = 1 naval_radio_guiding_system = 1 + full_armored_carrier = 1 } ai_get_navy_experience = yes } @@ -463,7 +458,6 @@ country_event = { ship_to_ship_missile = 1 helipad = 1 gas_turbine = 1 - full_armored_carrier = 1 carrier_steam_catapult = 1 carrier_angled_deck = 1 } @@ -588,7 +582,7 @@ country_event = { # unlock free cv air techs 1939 country_event = { - id = ai_ships.107 + id = ai_ships.108 hidden = yes fire_only_once = yes trigger = { @@ -615,7 +609,7 @@ country_event = { # unlock free cv air techs 1944 country_event = { - id = ai_ships.107 + id = ai_ships.109 hidden = yes fire_only_once = yes trigger = { @@ -637,4 +631,37 @@ country_event = { } set_global_flag = cv_air_tech_1944 } +} + +# unlock free tech in 1941 +country_event = { + id = ai_ships.110 + hidden = yes + fire_only_once = yes + trigger = { + date > 1940.6.1 + NOT = { has_global_flag = naval_tech_1941 } + has_game_rule = { rule = allow_ai_tech_auto_unlock option = FREE } + } + immediate = { + for_each_scope_loop = { + array = global.vnr_naval_powers + if = { + limit = { + is_ai = yes + } + set_technology = { + folding_wing = 1 + carrier_mass_production = 1 + carrier_damage_control = 1 + air_fuel_storage = 1 + damage_control_2 = 1 + damage_control_3 = 1 + fire_control_methods_2 = 1 + } + ai_get_navy_experience = yes + } + } + set_global_flag = naval_tech_1941 + } } \ No newline at end of file