From 9243fd499b1a580517eb90836c065595af2bb356 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 01:15:54 +0200 Subject: [PATCH 01/22] pydcs update for DCS 2.7.1 --- game/data/aaa_db.py | 6 +- game/data/alic.py | 2 +- game/data/radar_db.py | 2 +- game/data/weapons.py | 50 ++++------- game/db.py | 87 ++++++++++--------- gen/ground_forces/ai_ground_planner_db.py | 25 +++--- gen/sam/aaa_bofors.py | 2 +- gen/sam/aaa_zu23_insurgent.py | 2 +- gen/sam/ewrs.py | 2 +- gen/sam/sam_group_generator.py | 8 +- gen/sam/sam_hawk.py | 2 +- gen/sam/sam_sa6.py | 2 +- pydcs | 2 +- resources/factions/NATO_Desert_Storm.json | 2 +- resources/factions/allies_1940.json | 2 +- resources/factions/allies_1944.json | 4 +- resources/factions/allies_1944_free.json | 4 +- resources/factions/bluefor_modern.json | 4 +- resources/factions/canada_2005.json | 3 +- resources/factions/canada_2005_c130.json | 3 +- resources/factions/china_2010.json | 2 +- resources/factions/dprk_1950_fictional.json | 2 +- resources/factions/france_1995.json | 4 +- resources/factions/gdr_1985.json | 2 +- resources/factions/georgia_2008.json | 2 +- resources/factions/germany_1940.json | 2 +- resources/factions/germany_1942.json | 6 +- resources/factions/germany_1944.json | 6 +- resources/factions/germany_1944_free.json | 2 +- resources/factions/germany_1990.json | 2 +- resources/factions/greece_2005.json | 6 +- resources/factions/india_2010.json | 2 +- resources/factions/insurgents.json | 4 +- resources/factions/insurgents_hard.json | 4 +- resources/factions/iraq_1991.json | 2 +- resources/factions/israel_1948.json | 4 +- resources/factions/israel_1973.json | 2 +- resources/factions/israel_2000.json | 2 +- resources/factions/japan_2005.json | 2 +- resources/factions/libya_2011.json | 2 +- resources/factions/north_korea_2000.json | 4 +- resources/factions/pakistan_2015.json | 2 +- resources/factions/pmc_russian.json | 4 +- resources/factions/pmc_us.json | 2 +- resources/factions/pmc_us_with_mb339.json | 2 +- resources/factions/poland_2010.json | 6 +- resources/factions/redfor_china_2010.json | 6 +- resources/factions/redfor_russia_2010.json | 6 +- resources/factions/russia_1955.json | 2 +- resources/factions/russia_1965.json | 2 +- .../factions/russia_1970_limited_air.json | 4 +- resources/factions/russia_1975.json | 4 +- resources/factions/russia_1990.json | 2 +- resources/factions/russia_2010.json | 4 +- resources/factions/russia_2010_hds.json | 4 +- resources/factions/russia_2020.json | 2 +- resources/factions/soviet_union_1943.json | 4 +- resources/factions/spain_1990.json | 2 +- resources/factions/sweden_1970.json | 2 +- resources/factions/sweden_1990.json | 2 +- resources/factions/syria_1948.json | 6 +- resources/factions/syria_1967.json | 4 +- .../factions/syria_1967_with_ww2_weapons.json | 4 +- resources/factions/syria_2011.json | 8 +- resources/factions/turkey_2005.json | 4 +- resources/factions/uk_1944.json | 4 +- resources/factions/uk_1990.json | 4 +- resources/factions/ukraine_2010.json | 2 +- resources/factions/unc_1950_fictional.json | 6 +- resources/factions/us_aggressors.json | 6 +- resources/factions/usa_1944.json | 2 +- resources/factions/usa_1955.json | 6 +- resources/factions/usa_1990.json | 4 +- resources/factions/usa_2005.json | 4 +- resources/factions/usa_2005_c130.json | 4 +- resources/factions/usa_2005_modded.json | 4 +- resources/factions/usn_1985.json | 4 +- tests/resources/invalid_faction_country.json | 4 +- tests/resources/valid_faction.json | 4 +- tests/test_factions.py | 2 +- 80 files changed, 211 insertions(+), 215 deletions(-) diff --git a/game/data/aaa_db.py b/game/data/aaa_db.py index fba276a3..3008011e 100644 --- a/game/data/aaa_db.py +++ b/game/data/aaa_db.py @@ -7,9 +7,9 @@ AAA_UNITS = [ AirDefence.AAA_ZU_23_Closed_Emplacement, AirDefence.AAA_ZU_23_Emplacement, AirDefence.SPAAA_ZU_23_2_Mounted_Ural_375, - AirDefence.AAA_ZU_23_Closed_Emplacement_Insurgent, + AirDefence.AAA_ZU_23_Insurgent_Closed_Emplacement, AirDefence.SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375, - AirDefence.AAA_ZU_23_Insurgent, + AirDefence.AAA_ZU_23_Insurgent_Emplacement, AirDefence.AAA_8_8cm_Flak_18, AirDefence.AAA_Flak_38_20mm, AirDefence.AAA_8_8cm_Flak_36, @@ -17,6 +17,6 @@ AAA_UNITS = [ AirDefence.AAA_Flak_Vierling_38_Quad_20mm, AirDefence.AAA_SP_Kdo_G_40, AirDefence.AAA_8_8cm_Flak_41, - AirDefence.AAA_40mm_Bofors, + AirDefence.AAA_Bofors_40mm, AirDefence.AAA_S_60_57mm, ] diff --git a/game/data/alic.py b/game/data/alic.py index de99075c..84436837 100644 --- a/game/data/alic.py +++ b/game/data/alic.py @@ -9,7 +9,7 @@ class AlicCodes: AirDefence.SAM_SA_10_S_300_Grumble_Clam_Shell_SR.id: 103, AirDefence.SAM_SA_10_S_300_Grumble_Big_Bird_SR.id: 104, AirDefence.SAM_SA_11_Buk_Gadfly_Snow_Drift_SR.id: 107, - AirDefence.SAM_SA_6_Kub_Long_Track_STR.id: 108, + AirDefence.SAM_SA_6_Kub_Straight_Flush_STR.id: 108, AirDefence.MCC_SR_Sborka_Dog_Ear_SR.id: 109, AirDefence.SAM_SA_10_S_300_Grumble_Flap_Lid_TR.id: 110, AirDefence.SAM_SA_11_Buk_Gadfly_Fire_Dome_TEL.id: 115, diff --git a/game/data/radar_db.py b/game/data/radar_db.py index 0dcf9cc2..a8bec9b4 100644 --- a/game/data/radar_db.py +++ b/game/data/radar_db.py @@ -32,7 +32,7 @@ UNITS_WITH_RADAR = [ AirDefence.SPAAA_Vulcan_M163, AirDefence.SPAAA_ZSU_23_4_Shilka_Gun_Dish, AirDefence.EWR_1L13, - AirDefence.SAM_SA_6_Kub_Long_Track_STR, + AirDefence.SAM_SA_6_Kub_Straight_Flush_STR, AirDefence.SAM_SA_10_S_300_Grumble_Flap_Lid_TR, AirDefence.SAM_SA_10_S_300_Grumble_Clam_Shell_SR, AirDefence.EWR_55G6, diff --git a/game/data/weapons.py b/game/data/weapons.py index 9b6d8e0c..b7dd530b 100644 --- a/game/data/weapons.py +++ b/game/data/weapons.py @@ -154,7 +154,7 @@ _WEAPON_FALLBACKS = [ Weapons.BRU_57_with_2_x_AGM_154A___JSOW_CEB__CBU_type_, None, ), # doesn't exist on any aircraft yet - (Weapons.AGM_154B___JSOW_Anti_Armour, Weapons.CBU_105___10_x_CEM__CBU_with_WCMD), + (Weapons.AGM_154B___JSOW_Anti_Armour, Weapons.CBU_105___10_x_SFW__CBU_with_WCMD), (Weapons.AGM_154C___JSOW_Unitary_BROACH, Weapons.GBU_12), ( Weapons.BRU_55_with_2_x_AGM_154C___JSOW_Unitary_BROACH, @@ -483,29 +483,29 @@ _WEAPON_FALLBACKS = [ # CBU-87 CEM (Weapons.CBU_87___202_x_CEM_Cluster_Bomb, Weapons.Mk_82), ( - Weapons.TER_9A_with_2_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb, + Weapons.TER_9A_with_2_x_CBU_87___202_x_CEM_Cluster_Bomb, Weapons.TER_9A_with_2_x_Mk_82___500lb_GP_Bomb_LD, ), ( - Weapons.TER_9A_with_2_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb_, + Weapons.TER_9A_with_2_x_CBU_87___202_x_CEM_Cluster_Bomb_, Weapons.TER_9A_with_2_x_Mk_82___500lb_GP_Bomb_LD, ), ( - Weapons.TER_9A_with_3_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb, + Weapons.TER_9A_with_3_x_CBU_87___202_x_CEM_Cluster_Bomb, Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD, ), # CBU-97 - (Weapons.CBU_97___10_x_CEM_Cluster_Bomb, Weapons.Mk_82), + (Weapons.CBU_97___10_x_SFW_Cluster_Bomb, Weapons.Mk_82), ( - Weapons.TER_9A_with_2_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb, + Weapons.TER_9A_with_2_x_CBU_97___10_x_SFW_Cluster_Bomb, Weapons.TER_9A_with_2_x_Mk_82___500lb_GP_Bomb_LD, ), ( - Weapons.TER_9A_with_2_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb_, + Weapons.TER_9A_with_2_x_CBU_97___10_x_SFW_Cluster_Bomb_, Weapons.TER_9A_with_2_x_Mk_82___500lb_GP_Bomb_LD_, ), ( - Weapons.TER_9A_with_3_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb, + Weapons.TER_9A_with_3_x_CBU_97___10_x_SFW_Cluster_Bomb, Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD, ), # CBU-99 (It's a bomb made in 1968, I'm not bothering right now with backups) @@ -515,7 +515,7 @@ _WEAPON_FALLBACKS = [ Weapons.CBU_87___202_x_CEM_Cluster_Bomb, ), # CBU-105 - (Weapons.CBU_105___10_x_CEM__CBU_with_WCMD, Weapons.CBU_97___10_x_CEM_Cluster_Bomb), + (Weapons.CBU_105___10_x_SFW__CBU_with_WCMD, Weapons.CBU_97___10_x_SFW_Cluster_Bomb), ( Weapons.LAU_131_pod___7_x_2_75_Hydra__Laser_Guided_Rkts_M151__HE_APKWS, Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE, @@ -971,26 +971,14 @@ WEAPON_INTRODUCTION_YEARS = { Weapon.from_pydcs(Weapons.CBU_52B___220_x_HE_Frag_bomblets): 1970, # CBU-87 CEM Weapon.from_pydcs(Weapons.CBU_87___202_x_CEM_Cluster_Bomb): 1986, - Weapon.from_pydcs( - Weapons.TER_9A_with_2_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb - ): 1986, - Weapon.from_pydcs( - Weapons.TER_9A_with_2_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb_ - ): 1986, - Weapon.from_pydcs( - Weapons.TER_9A_with_3_x_CBU_87___202_x_Anti_Armor_Skeet_SFW_Cluster_Bomb - ): 1986, + Weapon.from_pydcs(Weapons.TER_9A_with_2_x_CBU_87___202_x_CEM_Cluster_Bomb): 1986, + Weapon.from_pydcs(Weapons.TER_9A_with_2_x_CBU_87___202_x_CEM_Cluster_Bomb_): 1986, + Weapon.from_pydcs(Weapons.TER_9A_with_3_x_CBU_87___202_x_CEM_Cluster_Bomb): 1986, # CBU-97 - Weapon.from_pydcs(Weapons.CBU_97___10_x_CEM_Cluster_Bomb): 1992, - Weapon.from_pydcs( - Weapons.TER_9A_with_2_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb - ): 1992, - Weapon.from_pydcs( - Weapons.TER_9A_with_2_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb_ - ): 1992, - Weapon.from_pydcs( - Weapons.TER_9A_with_3_x_CBU_97___10_x_Anti_Armor_Skeet_SFW_Cluster_Bomb - ): 1992, + Weapon.from_pydcs(Weapons.CBU_97___10_x_SFW_Cluster_Bomb): 1992, + Weapon.from_pydcs(Weapons.TER_9A_with_2_x_CBU_97___10_x_SFW_Cluster_Bomb): 1992, + Weapon.from_pydcs(Weapons.TER_9A_with_2_x_CBU_97___10_x_SFW_Cluster_Bomb_): 1992, + Weapon.from_pydcs(Weapons.TER_9A_with_3_x_CBU_97___10_x_SFW_Cluster_Bomb): 1992, # CBU-99 Weapon.from_pydcs( Weapons.BRU_33_with_2_x_CBU_99___490lbs__247_x_HEAT_Bomblets @@ -1032,11 +1020,11 @@ WEAPON_INTRODUCTION_YEARS = { Weapons.MER2_with_2_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets ): 1968, # CBU-103 - Weapon.from_pydcs(Weapons.BRU_57_with_2_x_CBU_103): 2000, + Weapon.from_pydcs(Weapons.BRU_57_with_2_x_CBU_103___202_x_CEM__CBU_with_WCMD): 2000, Weapon.from_pydcs(Weapons.CBU_103___202_x_CEM__CBU_with_WCMD): 2000, # CBU-105 - Weapon.from_pydcs(Weapons.BRU_57_with_2_x_CBU_105): 2000, - Weapon.from_pydcs(Weapons.CBU_105___10_x_CEM__CBU_with_WCMD): 2000, + Weapon.from_pydcs(Weapons.BRU_57_with_2_x_CBU_105___10_x_SFW__CBU_with_WCMD): 2000, + Weapon.from_pydcs(Weapons.CBU_105___10_x_SFW__CBU_with_WCMD): 2000, # APKWS Weapon.from_pydcs( Weapons.LAU_131_pod___7_x_2_75_Hydra__Laser_Guided_Rkts_M151__HE_APKWS diff --git a/game/db.py b/game/db.py index 980f1461..eb2b692f 100644 --- a/game/db.py +++ b/game/db.py @@ -485,10 +485,10 @@ PRICES = { # armor Armor.APC_MTLB: 4, Artillery.Grad_MRL_FDDM__FC: 4, - Armor.IFV_BRDM_2: 6, + Armor.Scout_BRDM_2: 6, Armor.APC_BTR_RD: 6, Armor.APC_BTR_80: 8, - Armor.APC_BTR_82A: 10, + Armor.IFV_BTR_82A: 10, Armor.MBT_T_55: 18, Armor.MBT_T_72B: 20, Armor.MBT_T_72B3: 25, @@ -500,9 +500,9 @@ PRICES = { Armor.IFV_BMP_3: 18, Armor.ZBD_04A: 12, Armor.ZTZ_96B: 30, - Armor.APC_Cobra__Scout: 4, + Armor.Scout_Cobra: 4, Armor.APC_M113: 6, - Armor.APC_HMMWV__Scout: 2, + Armor.Scout_HMMWV: 2, Armor.ATGM_HMMWV: 8, Armor.IFV_M2A2_Bradley: 12, Armor.IFV_M1126_Stryker_ICV: 10, @@ -511,8 +511,11 @@ PRICES = { Armor.MBT_M60A3_Patton: 16, Armor.MBT_M1A2_Abrams: 25, Armor.MBT_Leclerc: 25, - Armor.MBT_Leopard_1A3: 20, - Armor.MBT_Leopard_2: 25, + Armor.MBT_Leopard_1A3: 18, + Armor.MBT_Leopard_2A4: 20, + Armor.MBT_Leopard_2A4_Trs: 20, + Armor.MBT_Leopard_2A5: 22, + Armor.MBT_Leopard_2A6M: 25, Armor.MBT_Merkava_IV: 25, Armor.APC_TPz_Fuchs: 5, Armor.MBT_Challenger_II: 25, @@ -521,12 +524,12 @@ PRICES = { Armor.IFV_LAV_25: 7, Artillery.MLRS_M270_227mm: 55, Artillery.SPH_M109_Paladin_155mm: 25, - Artillery.SPH_2S9_Nona_120mm_M: 12, + Artillery.SPM_2S9_Nona_120mm_M: 12, Artillery.SPH_2S1_Gvozdika_122mm: 18, Artillery.SPH_2S3_Akatsia_152mm: 24, Artillery.SPH_2S19_Msta_152mm: 30, Artillery.MLRS_BM_21_Grad_122mm: 15, - Artillery.MLRS_BM_27_Uragan_220mm: 50, + Artillery.MLRS_9K57_Uragan_BM_27_220mm: 50, Artillery.MLRS_9A52_Smerch_HE_300mm: 40, Artillery.Mortar_2B11_120mm: 4, Artillery.SPH_Dana_vz77_152mm: 26, @@ -538,7 +541,7 @@ PRICES = { Unarmed.Truck_M818_6x6: 3, # WW2 Armor.MT_Pz_Kpfw_V_Panther_Ausf_G: 24, - Armor.MT_PzIV_H: 16, + Armor.Tk_PzIV_H: 16, Armor.HT_Pz_Kpfw_VI_Tiger_I: 24, Armor.HT_Pz_Kpfw_VI_Ausf__B_Tiger_II: 26, Armor.SPG_Jagdpanther_G1: 18, @@ -546,7 +549,7 @@ PRICES = { Armor.SPG_Sd_Kfz_184_Elefant: 18, Armor.APC_Sd_Kfz_251_Halftrack: 4, Armor.IFV_Sd_Kfz_234_2_Puma: 8, - Armor.MT_M4_Sherman: 12, + Armor.Tk_M4_Sherman: 12, Armor.MT_M4A4_Sherman_Firefly: 16, Armor.CT_Cromwell_IV: 12, Unarmed.Carrier_M30_Cargo: 2, @@ -558,7 +561,7 @@ PRICES = { Armor.SPG_StuG_III_Ausf__G: 12, Armor.SPG_StuG_IV: 14, Artillery.SPG_M12_GMC_155mm: 10, - Artillery.SPG_Sturmpanzer_IV_Brummbar: 10, + Armor.SPG_Sturmpanzer_IV_Brummbar: 10, Armor.Car_Daimler_Armored: 8, Armor.LT_Mk_VII_Tetrarch: 8, Unarmed.Tractor_M4_Hi_Speed: 2, @@ -585,7 +588,7 @@ PRICES = { AirDefence.SAM_Patriot_CR__AMG_AN_MRC_137: 35, AirDefence.SAM_Patriot_ECS: 30, AirDefence.SPAAA_Gepard: 24, - AirDefence.SAM_Hawk_Generator__PCP: 14, + AirDefence.SAM_Hawk_Platoon_Command_Post__PCP: 14, AirDefence.SPAAA_Vulcan_M163: 10, AirDefence.SAM_Hawk_LN_M192: 8, AirDefence.SAM_Chaparral_M48: 16, @@ -603,15 +606,15 @@ PRICES = { AirDefence.AAA_ZU_23_Closed_Emplacement: 6, AirDefence.AAA_ZU_23_Emplacement: 6, AirDefence.SPAAA_ZU_23_2_Mounted_Ural_375: 7, - AirDefence.AAA_ZU_23_Closed_Emplacement_Insurgent: 6, + AirDefence.AAA_ZU_23_Insurgent_Closed_Emplacement: 6, AirDefence.SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375: 7, - AirDefence.AAA_ZU_23_Insurgent: 6, + AirDefence.AAA_ZU_23_Insurgent_Emplacement: 6, AirDefence.MANPADS_SA_18_Igla_Grouse: 10, AirDefence.MANPADS_SA_18_Igla_Grouse_C2: 8, AirDefence.MANPADS_SA_18_Igla_S_Grouse: 12, AirDefence.MANPADS_SA_18_Igla_S_Grouse_C2: 8, AirDefence.EWR_1L13: 30, - AirDefence.SAM_SA_6_Kub_Long_Track_STR: 22, + AirDefence.SAM_SA_6_Kub_Straight_Flush_STR: 22, AirDefence.EWR_55G6: 30, AirDefence.MCC_SR_Sborka_Dog_Ear_SR: 10, AirDefence.SAM_Hawk_TR__AN_MPQ_46: 14, @@ -638,7 +641,7 @@ PRICES = { AirDefence.PU_Maschinensatz_33: 10, AirDefence.AAA_8_8cm_Flak_41: 10, AirDefence.EWR_FuMG_401_Freya_LZ: 25, - AirDefence.AAA_40mm_Bofors: 8, + AirDefence.AAA_Bofors_40mm: 8, AirDefence.AAA_S_60_57mm: 8, AirDefence.AAA_M1_37mm: 7, AirDefence.AAA_M45_Quadmount_HB_12_7mm: 4, @@ -860,9 +863,9 @@ UNIT_BY_TASK = { Artillery.Grad_MRL_FDDM__FC, Artillery.Grad_MRL_FDDM__FC, Artillery.Grad_MRL_FDDM__FC, - Armor.IFV_BRDM_2, - Armor.IFV_BRDM_2, - Armor.IFV_BRDM_2, + Armor.Scout_BRDM_2, + Armor.Scout_BRDM_2, + Armor.Scout_BRDM_2, Armor.APC_BTR_RD, Armor.APC_BTR_RD, Armor.APC_BTR_RD, @@ -872,8 +875,8 @@ UNIT_BY_TASK = { Armor.APC_BTR_80, Armor.APC_BTR_80, Armor.APC_BTR_80, - Armor.APC_BTR_82A, - Armor.APC_BTR_82A, + Armor.IFV_BTR_82A, + Armor.IFV_BTR_82A, Armor.IFV_BMP_1, Armor.IFV_BMP_1, Armor.IFV_BMP_1, @@ -896,10 +899,10 @@ UNIT_BY_TASK = { Armor.MBT_T_80U, Armor.MBT_T_90, Armor.ZTZ_96B, - Armor.APC_Cobra__Scout, - Armor.APC_Cobra__Scout, - Armor.APC_Cobra__Scout, - Armor.APC_Cobra__Scout, + Armor.Scout_Cobra, + Armor.Scout_Cobra, + Armor.Scout_Cobra, + Armor.Scout_Cobra, Armor.APC_M113, Armor.APC_M113, Armor.APC_M113, @@ -910,8 +913,8 @@ UNIT_BY_TASK = { Armor.APC_TPz_Fuchs, Armor.ATGM_HMMWV, Armor.ATGM_HMMWV, - Armor.APC_HMMWV__Scout, - Armor.APC_HMMWV__Scout, + Armor.Scout_HMMWV, + Armor.Scout_HMMWV, Armor.IFV_M2A2_Bradley, Armor.IFV_M2A2_Bradley, Armor.ATGM_Stryker, @@ -936,11 +939,11 @@ UNIT_BY_TASK = { Armor.MBT_Leopard_1A3, Armor.MBT_M1A2_Abrams, Armor.MBT_Leclerc, - Armor.MBT_Leopard_2, + Armor.MBT_Leopard_2A6M, Armor.MBT_Challenger_II, Armor.MBT_Merkava_IV, Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, - Armor.MT_PzIV_H, + Armor.Tk_PzIV_H, Armor.HT_Pz_Kpfw_VI_Tiger_I, Armor.HT_Pz_Kpfw_VI_Ausf__B_Tiger_II, Armor.APC_Sd_Kfz_251_Halftrack, @@ -949,7 +952,7 @@ UNIT_BY_TASK = { Armor.APC_Sd_Kfz_251_Halftrack, Armor.IFV_Sd_Kfz_234_2_Puma, Armor.IFV_Sd_Kfz_234_2_Puma, - Armor.MT_M4_Sherman, + Armor.Tk_M4_Sherman, Armor.MT_M4A4_Sherman_Firefly, Armor.CT_Cromwell_IV, Unarmed.Carrier_M30_Cargo, @@ -959,7 +962,7 @@ UNIT_BY_TASK = { Armor.APC_M2A1_Halftrack, Armor.APC_M2A1_Halftrack, Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, - Armor.MT_PzIV_H, + Armor.Tk_PzIV_H, Armor.HT_Pz_Kpfw_VI_Tiger_I, Armor.HT_Pz_Kpfw_VI_Ausf__B_Tiger_II, Armor.SPG_Jagdpanther_G1, @@ -967,7 +970,7 @@ UNIT_BY_TASK = { Armor.SPG_Sd_Kfz_184_Elefant, Armor.APC_Sd_Kfz_251_Halftrack, Armor.IFV_Sd_Kfz_234_2_Puma, - Armor.MT_M4_Sherman, + Armor.Tk_M4_Sherman, Armor.MT_M4A4_Sherman_Firefly, Armor.CT_Cromwell_IV, Unarmed.Carrier_M30_Cargo, @@ -985,23 +988,23 @@ UNIT_BY_TASK = { Armor.SPG_StuG_III_Ausf__G, Armor.SPG_StuG_IV, Artillery.SPG_M12_GMC_155mm, - Artillery.SPG_Sturmpanzer_IV_Brummbar, + Armor.SPG_Sturmpanzer_IV_Brummbar, Armor.Car_Daimler_Armored, Armor.LT_Mk_VII_Tetrarch, Artillery.MLRS_M270_227mm, Artillery.SPH_M109_Paladin_155mm, - Artillery.SPH_2S9_Nona_120mm_M, + Artillery.SPM_2S9_Nona_120mm_M, Artillery.SPH_2S1_Gvozdika_122mm, Artillery.SPH_2S3_Akatsia_152mm, Artillery.SPH_2S19_Msta_152mm, Artillery.MLRS_BM_21_Grad_122mm, Artillery.MLRS_BM_21_Grad_122mm, - Artillery.MLRS_BM_27_Uragan_220mm, + Artillery.MLRS_9K57_Uragan_BM_27_220mm, Artillery.MLRS_9A52_Smerch_HE_300mm, Artillery.SPH_Dana_vz77_152mm, Artillery.PLZ_05, Artillery.SPG_M12_GMC_155mm, - Artillery.SPG_Sturmpanzer_IV_Brummbar, + Armor.SPG_Sturmpanzer_IV_Brummbar, AirDefence.SPAAA_ZU_23_2_Mounted_Ural_375, AirDefence.SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375, AirDefence.SPAAA_ZSU_57_2, @@ -1022,7 +1025,7 @@ UNIT_BY_TASK = { AirDefence.AAA_8_8cm_Flak_36, AirDefence.AAA_8_8cm_Flak_37, AirDefence.AAA_8_8cm_Flak_41, - AirDefence.AAA_40mm_Bofors, + AirDefence.AAA_Bofors_40mm, AirDefence.AAA_S_60_57mm, AirDefence.AAA_M1_37mm, AirDefence.AAA_QF_3_7, @@ -1083,7 +1086,7 @@ SAM_BAN = [ AirDefence.SAM_SA_6_Kub_Gainful_TEL, AirDefence.SAM_SA_8_Osa_Gecko_TEL, AirDefence.SAM_SA_3_S_125_Goa_LN, - AirDefence.SAM_Hawk_Generator__PCP, + AirDefence.SAM_Hawk_Platoon_Command_Post__PCP, AirDefence.SAM_SA_2_S_75_Guideline_LN, AirDefence.SAM_SA_11_Buk_Gadfly_Fire_Dome_TEL, ] @@ -1096,15 +1099,15 @@ SAM_CONVERT = { AirDefence.SAM_SA_3_S_125_Low_Blow_TR: AirDefence.SAM_SA_3_S_125_Goa_LN, AirDefence.SAM_SA_3_S_125_Goa_LN: AirDefence.SAM_SA_3_S_125_Goa_LN, AirDefence.SAM_SA_6_Kub_Gainful_TEL: AirDefence.SAM_SA_6_Kub_Gainful_TEL, - AirDefence.SAM_SA_6_Kub_Long_Track_STR: AirDefence.SAM_SA_6_Kub_Gainful_TEL, + AirDefence.SAM_SA_6_Kub_Straight_Flush_STR: AirDefence.SAM_SA_6_Kub_Gainful_TEL, AirDefence.SAM_SA_10_S_300_Grumble_TEL_C: AirDefence.SAM_SA_10_S_300_Grumble_TEL_C, AirDefence.SAM_SA_10_S_300_Grumble_Clam_Shell_SR: AirDefence.SAM_SA_10_S_300_Grumble_TEL_C, AirDefence.SAM_SA_10_S_300_Grumble_Flap_Lid_TR: AirDefence.SAM_SA_10_S_300_Grumble_TEL_C, AirDefence.SAM_SA_10_S_300_Grumble_C2: AirDefence.SAM_SA_10_S_300_Grumble_TEL_C, AirDefence.SAM_SA_10_S_300_Grumble_Big_Bird_SR: AirDefence.SAM_SA_10_S_300_Grumble_C2, - AirDefence.SAM_Hawk_TR__AN_MPQ_46: AirDefence.SAM_Hawk_Generator__PCP, - AirDefence.SAM_Hawk_SR__AN_MPQ_50: AirDefence.SAM_Hawk_Generator__PCP, - AirDefence.SAM_Hawk_LN_M192: AirDefence.SAM_Hawk_Generator__PCP, + AirDefence.SAM_Hawk_TR__AN_MPQ_46: AirDefence.SAM_Hawk_Platoon_Command_Post__PCP, + AirDefence.SAM_Hawk_SR__AN_MPQ_50: AirDefence.SAM_Hawk_Platoon_Command_Post__PCP, + AirDefence.SAM_Hawk_LN_M192: AirDefence.SAM_Hawk_Platoon_Command_Post__PCP, "except": { # this radar is shared between the two S300's. if we attempt to find a SAM site at a base and can't find one # model, we can safely assume the other was deployed diff --git a/gen/ground_forces/ai_ground_planner_db.py b/gen/ground_forces/ai_ground_planner_db.py index 36c775de..3fee5901 100644 --- a/gen/ground_forces/ai_ground_planner_db.py +++ b/gen/ground_forces/ai_ground_planner_db.py @@ -8,7 +8,10 @@ TYPE_TANKS = [ Armor.MBT_T_72B3, Armor.MBT_T_80U, Armor.MBT_T_90, - Armor.MBT_Leopard_2, + Armor.MBT_Leopard_2A4, + Armor.MBT_Leopard_2A4_Trs, + Armor.MBT_Leopard_2A5, + Armor.MBT_Leopard_2A6M, Armor.MBT_Leopard_1A3, Armor.MBT_Leclerc, Armor.MBT_Challenger_II, @@ -18,16 +21,17 @@ TYPE_TANKS = [ Armor.ZTZ_96B, # WW2 Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, - Armor.MT_PzIV_H, + Armor.Tk_PzIV_H, Armor.HT_Pz_Kpfw_VI_Tiger_I, Armor.HT_Pz_Kpfw_VI_Ausf__B_Tiger_II, - Armor.MT_M4_Sherman, + Armor.Tk_M4_Sherman, Armor.MT_M4A4_Sherman_Firefly, Armor.SPG_StuG_IV, Armor.CT_Centaur_IV, Armor.CT_Cromwell_IV, Armor.HIT_Churchill_VII, Armor.LT_Mk_VII_Tetrarch, + Armor.SPG_Sturmpanzer_IV_Brummbar, # Mods frenchpack.DIM__TOYOTA_BLUE, frenchpack.DIM__TOYOTA_GREEN, @@ -77,18 +81,18 @@ TYPE_IFV = [ ] TYPE_APC = [ - Armor.APC_HMMWV__Scout, + Armor.Scout_HMMWV, Armor.IFV_M1126_Stryker_ICV, Armor.APC_M113, Armor.APC_BTR_80, - Armor.APC_BTR_82A, + Armor.IFV_BTR_82A, Armor.APC_MTLB, Armor.APC_M2A1_Halftrack, - Armor.APC_Cobra__Scout, + Armor.Scout_Cobra, Armor.APC_Sd_Kfz_251_Halftrack, Armor.APC_AAV_7_Amphibious, Armor.APC_TPz_Fuchs, - Armor.IFV_BRDM_2, + Armor.Scout_BRDM_2, Armor.APC_BTR_RD, Artillery.Grad_MRL_FDDM__FC, # WW2 @@ -105,16 +109,15 @@ TYPE_ARTILLERY = [ Artillery.SPH_2S1_Gvozdika_122mm, Artillery.SPH_2S3_Akatsia_152mm, Artillery.MLRS_BM_21_Grad_122mm, - Artillery.MLRS_BM_27_Uragan_220mm, + Artillery.MLRS_9K57_Uragan_BM_27_220mm, Artillery.SPH_M109_Paladin_155mm, Artillery.MLRS_M270_227mm, - Artillery.SPH_2S9_Nona_120mm_M, + Artillery.SPM_2S9_Nona_120mm_M, Artillery.SPH_Dana_vz77_152mm, Artillery.PLZ_05, Artillery.SPH_2S19_Msta_152mm, Artillery.MLRS_9A52_Smerch_CM_300mm, # WW2 - Artillery.SPG_Sturmpanzer_IV_Brummbar, Artillery.SPG_M12_GMC_155mm, ] @@ -175,7 +178,7 @@ TYPE_SHORAD = [ AirDefence.AAA_8_8cm_Flak_36, AirDefence.AAA_8_8cm_Flak_37, AirDefence.AAA_8_8cm_Flak_41, - AirDefence.AAA_40mm_Bofors, + AirDefence.AAA_Bofors_40mm, AirDefence.AAA_S_60_57mm, AirDefence.AAA_M1_37mm, AirDefence.AAA_QF_3_7, diff --git a/gen/sam/aaa_bofors.py b/gen/sam/aaa_bofors.py index fc6636d9..6af41922 100644 --- a/gen/sam/aaa_bofors.py +++ b/gen/sam/aaa_bofors.py @@ -27,7 +27,7 @@ class BoforsGenerator(AirDefenseGroupGenerator): for j in range(grid_y): index = index + 1 self.add_unit( - AirDefence.AAA_40mm_Bofors, + AirDefence.AAA_Bofors_40mm, "AAA#" + str(index), self.position.x + spacing * i, self.position.y + spacing * j, diff --git a/gen/sam/aaa_zu23_insurgent.py b/gen/sam/aaa_zu23_insurgent.py index 87ef1cd9..96cd1d71 100644 --- a/gen/sam/aaa_zu23_insurgent.py +++ b/gen/sam/aaa_zu23_insurgent.py @@ -27,7 +27,7 @@ class ZU23InsurgentGenerator(AirDefenseGroupGenerator): for j in range(grid_y): index = index + 1 self.add_unit( - AirDefence.AAA_ZU_23_Closed_Emplacement_Insurgent, + AirDefence.AAA_ZU_23_Insurgent_Closed_Emplacement, "AAA#" + str(index), self.position.x + spacing * i, self.position.y + spacing * j, diff --git a/gen/sam/ewrs.py b/gen/sam/ewrs.py index 7164a09e..d69f2de7 100644 --- a/gen/sam/ewrs.py +++ b/gen/sam/ewrs.py @@ -87,7 +87,7 @@ class StraightFlushGenerator(EwrGenerator): This is the SA-6 search/track radar, but used as an early warning radar. """ - unit_type = AirDefence.SAM_SA_6_Kub_Long_Track_STR + unit_type = AirDefence.SAM_SA_6_Kub_Straight_Flush_STR class HawkEwrGenerator(EwrGenerator): diff --git a/gen/sam/sam_group_generator.py b/gen/sam/sam_group_generator.py index e13f0f2c..a4968830 100644 --- a/gen/sam/sam_group_generator.py +++ b/gen/sam/sam_group_generator.py @@ -105,13 +105,13 @@ SAM_MAP: Dict[str, Type[AirDefenseGroupGenerator]] = { SAM_PRICES = { - AirDefence.SAM_Hawk_Generator__PCP: 35, + AirDefence.SAM_Hawk_Platoon_Command_Post__PCP: 35, AirDefence.AAA_ZU_23_Emplacement: 10, AirDefence.AAA_ZU_23_Closed_Emplacement: 10, AirDefence.SPAAA_ZU_23_2_Mounted_Ural_375: 10, AirDefence.SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375: 10, - AirDefence.AAA_ZU_23_Closed_Emplacement_Insurgent: 10, - AirDefence.AAA_ZU_23_Insurgent: 10, + AirDefence.AAA_ZU_23_Insurgent_Closed_Emplacement: 10, + AirDefence.AAA_ZU_23_Insurgent_Emplacement: 10, AirDefence.SPAAA_ZSU_23_4_Shilka_Gun_Dish: 10, AirDefence.SPAAA_Vulcan_M163: 15, AirDefence.SAM_Linebacker___Bradley_M6: 20, @@ -122,7 +122,7 @@ SAM_PRICES = { AirDefence.SAM_Patriot_LN: 85, AirDefence.SAM_Patriot_EPP_III: 85, AirDefence.SAM_Chaparral_M48: 25, - AirDefence.AAA_40mm_Bofors: 15, + AirDefence.AAA_Bofors_40mm: 15, AirDefence.AAA_8_8cm_Flak_36: 15, AirDefence.SAM_SA_2_S_75_Guideline_LN: 30, AirDefence.SAM_SA_3_S_125_Goa_LN: 35, diff --git a/gen/sam/sam_hawk.py b/gen/sam/sam_hawk.py index ab3332cd..f07f8872 100644 --- a/gen/sam/sam_hawk.py +++ b/gen/sam/sam_hawk.py @@ -26,7 +26,7 @@ class HawkGenerator(AirDefenseGroupGenerator): self.heading, ) self.add_unit( - AirDefence.SAM_Hawk_Generator__PCP, + AirDefence.SAM_Hawk_Platoon_Command_Post__PCP, "PCP", self.position.x, self.position.y, diff --git a/gen/sam/sam_sa6.py b/gen/sam/sam_sa6.py index a1def06d..25746651 100644 --- a/gen/sam/sam_sa6.py +++ b/gen/sam/sam_sa6.py @@ -18,7 +18,7 @@ class SA6Generator(AirDefenseGroupGenerator): def generate(self): self.add_unit( - AirDefence.SAM_SA_6_Kub_Long_Track_STR, + AirDefence.SAM_SA_6_Kub_Straight_Flush_STR, "STR", self.position.x, self.position.y, diff --git a/pydcs b/pydcs index ea94bca5..dec648d2 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit ea94bca55c83520038edc7c7fa43648376ec72a4 +Subproject commit dec648d27f74c394dd6e85e83cc09e4cd823653d diff --git a/resources/factions/NATO_Desert_Storm.json b/resources/factions/NATO_Desert_Storm.json index 7b9743b9..30a6e30b 100644 --- a/resources/factions/NATO_Desert_Storm.json +++ b/resources/factions/NATO_Desert_Storm.json @@ -40,7 +40,7 @@ "IFV_M2A2_Bradley", "IFV_M1126_Stryker_ICV", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "APC_TPz_Fuchs", "IFV_Warrior", diff --git a/resources/factions/allies_1940.json b/resources/factions/allies_1940.json index bc3ca707..1d590b00 100644 --- a/resources/factions/allies_1940.json +++ b/resources/factions/allies_1940.json @@ -14,7 +14,7 @@ "Car_Daimler_Armored", "LT_Mk_VII_Tetrarch", "AAA_QF_3_7", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ ], diff --git a/resources/factions/allies_1944.json b/resources/factions/allies_1944.json index c8cc8d30..98f2a5ec 100644 --- a/resources/factions/allies_1944.json +++ b/resources/factions/allies_1944.json @@ -16,7 +16,7 @@ ], "frontline_units": [ "MT_M4A4_Sherman_Firefly", - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", "CT_Cromwell_IV", "CT_Centaur_IV", @@ -26,7 +26,7 @@ "Car_Daimler_Armored", "LT_Mk_VII_Tetrarch", "AAA_QF_3_7", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ "SPG_M12_GMC_155mm" diff --git a/resources/factions/allies_1944_free.json b/resources/factions/allies_1944_free.json index 0fce2438..7e4e7fc9 100644 --- a/resources/factions/allies_1944_free.json +++ b/resources/factions/allies_1944_free.json @@ -14,9 +14,9 @@ "A_20G" ], "frontline_units": [ - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ ], diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json index 81e93e6e..2794fe88 100644 --- a/resources/factions/bluefor_modern.json +++ b/resources/factions/bluefor_modern.json @@ -37,13 +37,13 @@ ], "frontline_units": [ "MBT_M1A2_Abrams", - "MBT_Leopard_2", + "MBT_Leopard_2A6M", "MBT_Merkava_IV", "ATGM_Stryker", "IFV_M2A2_Bradley", "IFV_Marder", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Linebacker___Bradley_M6", "SAM_Avenger__Stinger" diff --git a/resources/factions/canada_2005.json b/resources/factions/canada_2005.json index 7d394842..798f01f8 100644 --- a/resources/factions/canada_2005.json +++ b/resources/factions/canada_2005.json @@ -17,7 +17,8 @@ ], "frontline_units": [ "MBT_Leopard_1A3", - "MBT_Leopard_2", + "MBT_Leopard_2A4", + "MBT_Leopard_2A6M", "IFV_LAV_25", "APC_M113", "IFV_Warrior", diff --git a/resources/factions/canada_2005_c130.json b/resources/factions/canada_2005_c130.json index 9620dc24..f44da34e 100644 --- a/resources/factions/canada_2005_c130.json +++ b/resources/factions/canada_2005_c130.json @@ -18,7 +18,8 @@ ], "frontline_units": [ "MBT_Leopard_1A3", - "MBT_Leopard_2", + "MBT_Leopard_2A4", + "MBT_Leopard_2A6M", "IFV_LAV_25", "APC_M113", "IFV_Warrior", diff --git a/resources/factions/china_2010.json b/resources/factions/china_2010.json index 1f47c779..bc1e4c0b 100644 --- a/resources/factions/china_2010.json +++ b/resources/factions/china_2010.json @@ -28,7 +28,7 @@ "artillery_units": [ "MLRS_9A52_Smerch_HE_300mm", "PLZ_05", - "SPH_2S9_Nona_120mm_M" + "SPM_2S9_Nona_120mm_M" ], "logistics_units": [ "Truck_Ural_375", diff --git a/resources/factions/dprk_1950_fictional.json b/resources/factions/dprk_1950_fictional.json index 29251c1b..428212d9 100644 --- a/resources/factions/dprk_1950_fictional.json +++ b/resources/factions/dprk_1950_fictional.json @@ -15,7 +15,7 @@ "tankers": [ ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "Grad_MRL_FDDM__FC", "APC_MTLB", "MBT_T_55", diff --git a/resources/factions/france_1995.json b/resources/factions/france_1995.json index 30d3e440..e81fca28 100644 --- a/resources/factions/france_1995.json +++ b/resources/factions/france_1995.json @@ -20,10 +20,10 @@ "frontline_units": [ "MBT_Leclerc", "APC_TPz_Fuchs", - "APC_Cobra__Scout", + "Scout_Cobra", "ATGM_Stryker", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Roland_ADS" ], diff --git a/resources/factions/gdr_1985.json b/resources/factions/gdr_1985.json index 9eee25a1..757dcf0c 100644 --- a/resources/factions/gdr_1985.json +++ b/resources/factions/gdr_1985.json @@ -17,7 +17,7 @@ "frontline_units": [ "IFV_BMP_1", "IFV_BMP_2", - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_MTLB", "MBT_T_55", "MBT_T_72B" diff --git a/resources/factions/georgia_2008.json b/resources/factions/georgia_2008.json index b1250008..08825296 100644 --- a/resources/factions/georgia_2008.json +++ b/resources/factions/georgia_2008.json @@ -13,7 +13,7 @@ "frontline_units": [ "APC_BTR_80", "APC_MTLB", - "APC_Cobra__Scout", + "Scout_Cobra", "IFV_BMP_1", "IFV_BMP_2", "MBT_T_72B", diff --git a/resources/factions/germany_1940.json b/resources/factions/germany_1940.json index b3a40cab..91d48d3f 100644 --- a/resources/factions/germany_1940.json +++ b/resources/factions/germany_1940.json @@ -10,7 +10,7 @@ "Ju_88A4" ], "frontline_units": [ - "MT_PzIV_H", + "Tk_PzIV_H", "APC_Sd_Kfz_251_Halftrack", "IFV_Sd_Kfz_234_2_Puma", "AAA_8_8cm_Flak_18" diff --git a/resources/factions/germany_1942.json b/resources/factions/germany_1942.json index 927152d5..8aaa385f 100644 --- a/resources/factions/germany_1942.json +++ b/resources/factions/germany_1942.json @@ -10,14 +10,14 @@ "Ju_88A4" ], "frontline_units": [ - "MT_PzIV_H", + "Tk_PzIV_H", "APC_Sd_Kfz_251_Halftrack", "IFV_Sd_Kfz_234_2_Puma", "SPG_Jagdpanzer_IV", - "AAA_8_8cm_Flak_18" + "AAA_8_8cm_Flak_18", + "SPG_Sturmpanzer_IV_Brummbar" ], "artillery_units": [ - "SPG_Sturmpanzer_IV_Brummbar" ], "logistics_units": [ "Truck_Opel_Blitz", diff --git a/resources/factions/germany_1944.json b/resources/factions/germany_1944.json index a607adfa..26aa55f9 100644 --- a/resources/factions/germany_1944.json +++ b/resources/factions/germany_1944.json @@ -11,7 +11,7 @@ ], "frontline_units": [ "MT_Pz_Kpfw_V_Panther_Ausf_G", - "MT_PzIV_H", + "Tk_PzIV_H", "HT_Pz_Kpfw_VI_Tiger_I", "HT_Pz_Kpfw_VI_Ausf__B_Tiger_II", "APC_Sd_Kfz_251_Halftrack", @@ -22,10 +22,10 @@ "SPG_StuG_III_Ausf__G", "SPG_StuG_IV", "AAA_8_8cm_Flak_18", - "AAA_8_8cm_Flak_41" + "AAA_8_8cm_Flak_41", + "SPG_Sturmpanzer_IV_Brummbar" ], "artillery_units": [ - "SPG_Sturmpanzer_IV_Brummbar" ], "logistics_units": [ "Truck_Opel_Blitz", diff --git a/resources/factions/germany_1944_free.json b/resources/factions/germany_1944_free.json index 6145a374..0de2b7ab 100644 --- a/resources/factions/germany_1944_free.json +++ b/resources/factions/germany_1944_free.json @@ -9,7 +9,7 @@ "Bf_109K_4" ], "frontline_units": [ - "MT_PzIV_H", + "Tk_PzIV_H", "APC_Sd_Kfz_251_Halftrack", "AAA_8_8cm_Flak_18" ], diff --git a/resources/factions/germany_1990.json b/resources/factions/germany_1990.json index 0190d101..57e5b36e 100644 --- a/resources/factions/germany_1990.json +++ b/resources/factions/germany_1990.json @@ -21,7 +21,7 @@ "frontline_units": [ "APC_TPz_Fuchs", "MBT_Leopard_1A3", - "MBT_Leopard_2", + "MBT_Leopard_2A4", "IFV_Marder", "SPAAA_Gepard" ], diff --git a/resources/factions/greece_2005.json b/resources/factions/greece_2005.json index a390525a..5e20bf24 100644 --- a/resources/factions/greece_2005.json +++ b/resources/factions/greece_2005.json @@ -15,10 +15,10 @@ "KC130" ], "frontline_units": [ - "MBT_Leopard_2", + "MBT_Leopard_2A4", "MBT_Leopard_1A3", "MBT_M60A3_Patton", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "APC_M113", "IFV_BMP_1" @@ -48,4 +48,4 @@ ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" -} \ No newline at end of file +} diff --git a/resources/factions/india_2010.json b/resources/factions/india_2010.json index 8ea8c8c9..e1099c39 100644 --- a/resources/factions/india_2010.json +++ b/resources/factions/india_2010.json @@ -26,7 +26,7 @@ "SAM_SA_19_Tunguska_Grison" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/insurgents.json b/resources/factions/insurgents.json index 773ea181..9cbec87b 100644 --- a/resources/factions/insurgents.json +++ b/resources/factions/insurgents.json @@ -6,9 +6,9 @@ "aircrafts": [ ], "frontline_units": [ - "APC_Cobra__Scout", + "Scout_Cobra", "APC_MTLB", - "IFV_BRDM_2", + "Scout_BRDM_2", "SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375" ], "artillery_units": [ diff --git a/resources/factions/insurgents_hard.json b/resources/factions/insurgents_hard.json index 086385cd..b90da386 100644 --- a/resources/factions/insurgents_hard.json +++ b/resources/factions/insurgents_hard.json @@ -7,8 +7,8 @@ ], "frontline_units": [ "ATGM_HMMWV", - "APC_HMMWV__Scout", - "IFV_BRDM_2", + "Scout_HMMWV", + "Scout_BRDM_2", "APC_BTR_80", "APC_BTR_RD", "IFV_BMP_1", diff --git a/resources/factions/iraq_1991.json b/resources/factions/iraq_1991.json index 25376a66..591b886a 100644 --- a/resources/factions/iraq_1991.json +++ b/resources/factions/iraq_1991.json @@ -30,7 +30,7 @@ "MBT_T_55", "MBT_T_72B", "APC_BTR_80", - "IFV_BRDM_2", + "Scout_BRDM_2", "SPH_2S1_Gvozdika_122mm", "SPAAA_ZSU_57_2", "SPAAA_ZSU_23_4_Shilka_Gun_Dish" diff --git a/resources/factions/israel_1948.json b/resources/factions/israel_1948.json index 4d81443e..1a9bf17c 100644 --- a/resources/factions/israel_1948.json +++ b/resources/factions/israel_1948.json @@ -14,9 +14,9 @@ "frontline_units": [ "MT_M4A4_Sherman_Firefly", "APC_M2A1_Halftrack", - "MT_M4_Sherman", + "Tk_M4_Sherman", "Car_M8_Greyhound_Armored", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ ], diff --git a/resources/factions/israel_1973.json b/resources/factions/israel_1973.json index da572305..366ff06e 100644 --- a/resources/factions/israel_1973.json +++ b/resources/factions/israel_1973.json @@ -16,7 +16,7 @@ "KC130" ], "frontline_units": [ - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", "MBT_M60A3_Patton", "APC_M113", diff --git a/resources/factions/israel_2000.json b/resources/factions/israel_2000.json index 5d8d5b60..689396d1 100644 --- a/resources/factions/israel_2000.json +++ b/resources/factions/israel_2000.json @@ -21,7 +21,7 @@ ], "frontline_units": [ "APC_M113", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "MBT_Merkava_IV", "SPAAA_Vulcan_M163" diff --git a/resources/factions/japan_2005.json b/resources/factions/japan_2005.json index 892e1ed7..5fcfbd6e 100644 --- a/resources/factions/japan_2005.json +++ b/resources/factions/japan_2005.json @@ -23,7 +23,7 @@ "IFV_Marder", "APC_TPz_Fuchs", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "SPAAA_Gepard" ], "artillery_units": [ diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index 10ef96a2..0b83dc6e 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -18,7 +18,7 @@ ], "frontline_units": [ "IFV_BMP_1", - "IFV_BRDM_2", + "Scout_BRDM_2", "MBT_T_72B", "MBT_T_55", "SPAAA_ZSU_23_4_Shilka_Gun_Dish", diff --git a/resources/factions/north_korea_2000.json b/resources/factions/north_korea_2000.json index 565ab250..cbd3d040 100644 --- a/resources/factions/north_korea_2000.json +++ b/resources/factions/north_korea_2000.json @@ -19,7 +19,7 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_BTR_80", "IFV_BMP_1", "MBT_T_55", @@ -30,7 +30,7 @@ ], "artillery_units": [ "MLRS_BM_21_Grad_122mm", - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/pakistan_2015.json b/resources/factions/pakistan_2015.json index 1c8c7ef7..c8e2b4b3 100644 --- a/resources/factions/pakistan_2015.json +++ b/resources/factions/pakistan_2015.json @@ -28,7 +28,7 @@ ], "artillery_units": [ "MLRS_9A52_Smerch_HE_300mm", - "SPH_2S9_Nona_120mm_M" + "SPM_2S9_Nona_120mm_M" ], "logistics_units": [ "Truck_Ural_375", diff --git a/resources/factions/pmc_russian.json b/resources/factions/pmc_russian.json index aa273736..81ee1f38 100644 --- a/resources/factions/pmc_russian.json +++ b/resources/factions/pmc_russian.json @@ -10,9 +10,9 @@ "Ka_50" ], "frontline_units": [ - "APC_Cobra__Scout", + "Scout_Cobra", "APC_BTR_80", - "IFV_BRDM_2", + "Scout_BRDM_2", "SAM_SA_13_Strela_10M3_Gopher_TEL" ], "artillery_units": [ diff --git a/resources/factions/pmc_us.json b/resources/factions/pmc_us.json index 293a4b9d..8957f5db 100644 --- a/resources/factions/pmc_us.json +++ b/resources/factions/pmc_us.json @@ -10,7 +10,7 @@ "SA342M" ], "frontline_units": [ - "APC_HMMWV__Scout", + "Scout_HMMWV", "IFV_Warrior", "IFV_LAV_25", "SAM_Avenger__Stinger" diff --git a/resources/factions/pmc_us_with_mb339.json b/resources/factions/pmc_us_with_mb339.json index 8ffdf832..1e9867d5 100644 --- a/resources/factions/pmc_us_with_mb339.json +++ b/resources/factions/pmc_us_with_mb339.json @@ -11,7 +11,7 @@ "SA342M" ], "frontline_units": [ - "APC_HMMWV__Scout", + "Scout_HMMWV", "IFV_Warrior", "IFV_LAV_25", "SAM_Avenger__Stinger" diff --git a/resources/factions/poland_2010.json b/resources/factions/poland_2010.json index 35256cfc..82b638a9 100644 --- a/resources/factions/poland_2010.json +++ b/resources/factions/poland_2010.json @@ -13,13 +13,13 @@ "KC130" ], "frontline_units": [ - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "IFV_M1126_Stryker_ICV", - "IFV_BRDM_2", + "Scout_BRDM_2", "IFV_BMP_1", "APC_MTLB", - "MBT_Leopard_2", + "MBT_Leopard_2A6M", "MBT_T_72B3" ], "artillery_units": [ diff --git a/resources/factions/redfor_china_2010.json b/resources/factions/redfor_china_2010.json index c7b1fe0d..9acd9203 100644 --- a/resources/factions/redfor_china_2010.json +++ b/resources/factions/redfor_china_2010.json @@ -31,7 +31,7 @@ ], "frontline_units": [ "APC_BTR_80", - "APC_BTR_82A", + "IFV_BTR_82A", "HQ_7_Self_Propelled_LN", "IFV_BMP_1", "IFV_BMP_2", @@ -46,8 +46,8 @@ ], "artillery_units": [ "MLRS_9A52_Smerch_HE_300mm", - "MLRS_BM_27_Uragan_220mm", - "SPH_2S9_Nona_120mm_M", + "MLRS_9K57_Uragan_BM_27_220mm", + "SPM_2S9_Nona_120mm_M", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/redfor_russia_2010.json b/resources/factions/redfor_russia_2010.json index be4023fa..9d23f41c 100644 --- a/resources/factions/redfor_russia_2010.json +++ b/resources/factions/redfor_russia_2010.json @@ -31,7 +31,7 @@ ], "frontline_units": [ "APC_BTR_80", - "APC_BTR_82A", + "IFV_BTR_82A", "HQ_7_Self_Propelled_LN", "IFV_BMP_1", "IFV_BMP_2", @@ -46,8 +46,8 @@ ], "artillery_units": [ "MLRS_9A52_Smerch_HE_300mm", - "MLRS_BM_27_Uragan_220mm", - "SPH_2S9_Nona_120mm_M", + "MLRS_9K57_Uragan_BM_27_220mm", + "SPM_2S9_Nona_120mm_M", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/russia_1955.json b/resources/factions/russia_1955.json index a3964056..624daaae 100644 --- a/resources/factions/russia_1955.json +++ b/resources/factions/russia_1955.json @@ -13,7 +13,7 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "Grad_MRL_FDDM__FC", "APC_MTLB", "MBT_T_55", diff --git a/resources/factions/russia_1965.json b/resources/factions/russia_1965.json index 49b21bcc..39685e7b 100644 --- a/resources/factions/russia_1965.json +++ b/resources/factions/russia_1965.json @@ -17,7 +17,7 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_BTR_80", "APC_BTR_RD", "IFV_BMD_1", diff --git a/resources/factions/russia_1970_limited_air.json b/resources/factions/russia_1970_limited_air.json index 5ab6a703..3f8cf0aa 100644 --- a/resources/factions/russia_1970_limited_air.json +++ b/resources/factions/russia_1970_limited_air.json @@ -10,7 +10,7 @@ "Mi_24V" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_BTR_80", "IFV_BMD_1", "IFV_BMP_1", @@ -19,7 +19,7 @@ ], "artillery_units": [ "MLRS_BM_21_Grad_122mm", - "SPH_2S9_Nona_120mm_M", + "SPM_2S9_Nona_120mm_M", "SPH_2S1_Gvozdika_122mm" ], "logistics_units": [ diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index d931e313..6fe0f30c 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -23,7 +23,7 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_BTR_80", "IFV_BMD_1", "IFV_BMP_1", @@ -32,7 +32,7 @@ ], "artillery_units": [ "MLRS_BM_21_Grad_122mm", - "SPH_2S9_Nona_120mm_M", + "SPM_2S9_Nona_120mm_M", "SPH_2S1_Gvozdika_122mm" ], "logistics_units": [ diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json index ce40dc11..37d74a10 100644 --- a/resources/factions/russia_1990.json +++ b/resources/factions/russia_1990.json @@ -35,7 +35,7 @@ "SAM_SA_13_Strela_10M3_Gopher_TEL" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/russia_2010.json b/resources/factions/russia_2010.json index d2df9602..29cdf41e 100644 --- a/resources/factions/russia_2010.json +++ b/resources/factions/russia_2010.json @@ -34,14 +34,14 @@ "IFV_BMP_2", "IFV_BMP_3", "APC_BTR_80", - "APC_BTR_82A", + "IFV_BTR_82A", "MBT_T_90", "MBT_T_80U", "MBT_T_72B3", "SAM_SA_19_Tunguska_Grison" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/russia_2010_hds.json b/resources/factions/russia_2010_hds.json index 23799043..61605e2e 100644 --- a/resources/factions/russia_2010_hds.json +++ b/resources/factions/russia_2010_hds.json @@ -34,14 +34,14 @@ "IFV_BMP_2", "IFV_BMP_3", "APC_BTR_80", - "APC_BTR_82A", + "IFV_BTR_82A", "MBT_T_90", "MBT_T_80U", "MBT_T_72B3", "SAM_SA_19_Tunguska_Grison" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/russia_2020.json b/resources/factions/russia_2020.json index 0ada877b..35a5b242 100644 --- a/resources/factions/russia_2020.json +++ b/resources/factions/russia_2020.json @@ -39,7 +39,7 @@ "SAM_SA_19_Tunguska_Grison" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", + "MLRS_9K57_Uragan_BM_27_220mm", "SPH_2S19_Msta_152mm" ], "logistics_units": [ diff --git a/resources/factions/soviet_union_1943.json b/resources/factions/soviet_union_1943.json index 3be02dd0..4958d0c7 100644 --- a/resources/factions/soviet_union_1943.json +++ b/resources/factions/soviet_union_1943.json @@ -8,11 +8,11 @@ "I_16" ], "frontline_units": [ - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", "Car_Daimler_Armored", "LT_Mk_VII_Tetrarch", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ "MLRS_BM_21_Grad_122mm" diff --git a/resources/factions/spain_1990.json b/resources/factions/spain_1990.json index 6dd974be..65b7b03c 100644 --- a/resources/factions/spain_1990.json +++ b/resources/factions/spain_1990.json @@ -19,7 +19,7 @@ ], "frontline_units": [ "MBT_M60A3_Patton", - "MBT_Leopard_2", + "MBT_Leopard_2A4", "APC_M113", "SAM_Avenger__Stinger" ], diff --git a/resources/factions/sweden_1970.json b/resources/factions/sweden_1970.json index 30bcdcb7..3de20841 100644 --- a/resources/factions/sweden_1970.json +++ b/resources/factions/sweden_1970.json @@ -17,7 +17,7 @@ ], "frontline_units": [ "IFV_Warrior", - "MBT_Leopard_2", + "MBT_Leopard_2A4", "IFV_M1126_Stryker_ICV", "SAM_Chaparral_M48" ], diff --git a/resources/factions/sweden_1990.json b/resources/factions/sweden_1990.json index 2ea024b9..42dd4c28 100644 --- a/resources/factions/sweden_1990.json +++ b/resources/factions/sweden_1990.json @@ -16,7 +16,7 @@ ], "frontline_units": [ "IFV_Warrior", - "MBT_Leopard_2", + "MBT_Leopard_2A4", "IFV_M1126_Stryker_ICV", "SAM_Avenger__Stinger" ], diff --git a/resources/factions/syria_1948.json b/resources/factions/syria_1948.json index 79cd7438..ad05776d 100644 --- a/resources/factions/syria_1948.json +++ b/resources/factions/syria_1948.json @@ -10,9 +10,9 @@ "frontline_units": [ "IFV_Sd_Kfz_234_2_Puma", "APC_Sd_Kfz_251_Halftrack", - "MT_PzIV_H", - "MT_M4_Sherman", - "AAA_40mm_Bofors" + "Tk_PzIV_H", + "Tk_M4_Sherman", + "AAA_Bofors_40mm" ], "artillery_units": [ ], diff --git a/resources/factions/syria_1967.json b/resources/factions/syria_1967.json index b2e93159..5e092ed9 100644 --- a/resources/factions/syria_1967.json +++ b/resources/factions/syria_1967.json @@ -17,8 +17,8 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", - "MT_PzIV_H", + "Scout_BRDM_2", + "Tk_PzIV_H", "MBT_T_55", "SPAAA_ZU_23_2_Mounted_Ural_375", "SPAAA_ZSU_57_2", diff --git a/resources/factions/syria_1967_with_ww2_weapons.json b/resources/factions/syria_1967_with_ww2_weapons.json index 34fbaf1d..cfab65fc 100644 --- a/resources/factions/syria_1967_with_ww2_weapons.json +++ b/resources/factions/syria_1967_with_ww2_weapons.json @@ -18,9 +18,9 @@ "IL_78M" ], "frontline_units": [ - "IFV_BRDM_2", + "Scout_BRDM_2", "MBT_T_55", - "MT_PzIV_H", + "Tk_PzIV_H", "SPG_StuG_III_Ausf__G", "SPG_Jagdpanzer_IV", "SPAAA_ZSU_57_2", diff --git a/resources/factions/syria_2011.json b/resources/factions/syria_2011.json index ae2211a5..3a5a3d21 100644 --- a/resources/factions/syria_2011.json +++ b/resources/factions/syria_2011.json @@ -26,17 +26,17 @@ "IFV_BMP_1", "IFV_BMP_2", "APC_BTR_80", - "IFV_BRDM_2", + "Scout_BRDM_2", "APC_MTLB", - "APC_Cobra__Scout", + "Scout_Cobra", "MBT_T_55", "MBT_T_72B", "MBT_T_90", "SPAAA_ZSU_57_2" ], "artillery_units": [ - "MLRS_BM_27_Uragan_220mm", - "SPH_2S9_Nona_120mm_M", + "MLRS_9K57_Uragan_BM_27_220mm", + "SPM_2S9_Nona_120mm_M", "MLRS_BM_21_Grad_122mm", "SPH_2S1_Gvozdika_122mm" ], diff --git a/resources/factions/turkey_2005.json b/resources/factions/turkey_2005.json index f5c7847c..dfe8df1e 100644 --- a/resources/factions/turkey_2005.json +++ b/resources/factions/turkey_2005.json @@ -17,10 +17,10 @@ "KC130" ], "frontline_units": [ - "MBT_Leopard_2", + "MBT_Leopard_2A4_Trs", "MBT_Leopard_1A3", "MBT_M60A3_Patton", - "APC_Cobra__Scout", + "Scout_Cobra", "APC_BTR_80", "SAM_Avenger__Stinger" ], diff --git a/resources/factions/uk_1944.json b/resources/factions/uk_1944.json index 32f44303..e8b0a990 100644 --- a/resources/factions/uk_1944.json +++ b/resources/factions/uk_1944.json @@ -16,14 +16,14 @@ ], "frontline_units": [ "MT_M4A4_Sherman_Firefly", - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", "CT_Cromwell_IV", "CT_Centaur_IV", "HIT_Churchill_VII", "Car_Daimler_Armored", "LT_Mk_VII_Tetrarch", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ ], diff --git a/resources/factions/uk_1990.json b/resources/factions/uk_1990.json index 9f88bb79..492a3d99 100644 --- a/resources/factions/uk_1990.json +++ b/resources/factions/uk_1990.json @@ -20,7 +20,7 @@ "frontline_units": [ "MBT_Challenger_II", "IFV_Warrior", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Avenger__Stinger" ], @@ -71,4 +71,4 @@ ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" -} \ No newline at end of file +} diff --git a/resources/factions/ukraine_2010.json b/resources/factions/ukraine_2010.json index d8fd710b..644b9799 100644 --- a/resources/factions/ukraine_2010.json +++ b/resources/factions/ukraine_2010.json @@ -20,7 +20,7 @@ "IL_78M" ], "frontline_units": [ - "APC_HMMWV__Scout", + "Scout_HMMWV", "IFV_BMP_3", "IFV_BMP_2", "APC_BTR_80", diff --git a/resources/factions/unc_1950_fictional.json b/resources/factions/unc_1950_fictional.json index dae56d1f..7651897b 100644 --- a/resources/factions/unc_1950_fictional.json +++ b/resources/factions/unc_1950_fictional.json @@ -12,11 +12,11 @@ "P_47D_40" ], "frontline_units": [ - "MT_M4_Sherman", + "Tk_M4_Sherman", "MBT_M60A3_Patton", "APC_M2A1_Halftrack", "Car_M8_Greyhound_Armored", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ "SPG_M12_GMC_155mm" @@ -38,4 +38,4 @@ "requirements": { "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" } -} \ No newline at end of file +} diff --git a/resources/factions/us_aggressors.json b/resources/factions/us_aggressors.json index ef43854b..08a898a9 100644 --- a/resources/factions/us_aggressors.json +++ b/resources/factions/us_aggressors.json @@ -31,11 +31,11 @@ ], "frontline_units": [ "MBT_M1A2_Abrams", - "MBT_Leopard_2", + "MBT_Leopard_2A4", "ATGM_Stryker", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "SAM_Avenger__Stinger" ], "artillery_units": [ @@ -82,4 +82,4 @@ "vf-74 adversary" ] } -} \ No newline at end of file +} diff --git a/resources/factions/usa_1944.json b/resources/factions/usa_1944.json index 7b846324..c50e37e8 100644 --- a/resources/factions/usa_1944.json +++ b/resources/factions/usa_1944.json @@ -15,7 +15,7 @@ ], "frontline_units": [ "MT_M4A4_Sherman_Firefly", - "MT_M4_Sherman", + "Tk_M4_Sherman", "APC_M2A1_Halftrack", "Car_M8_Greyhound_Armored", "SPG_M10_GMC", diff --git a/resources/factions/usa_1955.json b/resources/factions/usa_1955.json index 0dd8262b..8233e991 100644 --- a/resources/factions/usa_1955.json +++ b/resources/factions/usa_1955.json @@ -11,10 +11,10 @@ "P_51D_30_NA" ], "frontline_units": [ - "MT_M4_Sherman", + "Tk_M4_Sherman", "MBT_M60A3_Patton", "APC_M2A1_Halftrack", - "AAA_40mm_Bofors" + "AAA_Bofors_40mm" ], "artillery_units": [ "SPG_M12_GMC_155mm" @@ -34,4 +34,4 @@ "requirements": { "WW2 Asset Pack": "https://www.digitalcombatsimulator.com/en/products/other/wwii_assets_pack/" } -} \ No newline at end of file +} diff --git a/resources/factions/usa_1990.json b/resources/factions/usa_1990.json index 18d18849..40e0030f 100644 --- a/resources/factions/usa_1990.json +++ b/resources/factions/usa_1990.json @@ -39,7 +39,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Avenger__Stinger" ], @@ -119,4 +119,4 @@ "VMFA-323" ] } -} \ No newline at end of file +} diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index 57869deb..90870d7f 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -39,7 +39,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Avenger__Stinger", "SAM_Linebacker___Bradley_M6", @@ -119,4 +119,4 @@ "VMFA-323" ] } -} \ No newline at end of file +} diff --git a/resources/factions/usa_2005_c130.json b/resources/factions/usa_2005_c130.json index 54e4823e..a372546f 100644 --- a/resources/factions/usa_2005_c130.json +++ b/resources/factions/usa_2005_c130.json @@ -40,7 +40,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Avenger__Stinger", "SAM_Linebacker___Bradley_M6" @@ -121,4 +121,4 @@ "VMFA-323" ] } -} \ No newline at end of file +} diff --git a/resources/factions/usa_2005_modded.json b/resources/factions/usa_2005_modded.json index cc8ca114..7b35e379 100644 --- a/resources/factions/usa_2005_modded.json +++ b/resources/factions/usa_2005_modded.json @@ -35,7 +35,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV", "SAM_Avenger__Stinger", "SAM_Linebacker___Bradley_M6" @@ -116,4 +116,4 @@ "VMFA-323" ] } -} \ No newline at end of file +} diff --git a/resources/factions/usn_1985.json b/resources/factions/usn_1985.json index 0f65fcb6..fc82a2eb 100644 --- a/resources/factions/usn_1985.json +++ b/resources/factions/usn_1985.json @@ -21,7 +21,7 @@ "frontline_units": [ "MBT_M60A3_Patton", "APC_M113", - "APC_HMMWV__Scout", + "Scout_HMMWV", "SPAAA_Vulcan_M163" ], "artillery_units": [ @@ -87,4 +87,4 @@ "VFA-97" ] } -} \ No newline at end of file +} diff --git a/tests/resources/invalid_faction_country.json b/tests/resources/invalid_faction_country.json index 245c66f1..50f3fe11 100644 --- a/tests/resources/invalid_faction_country.json +++ b/tests/resources/invalid_faction_country.json @@ -30,7 +30,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV" ], "artillery_units": [ @@ -83,4 +83,4 @@ ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" -} \ No newline at end of file +} diff --git a/tests/resources/valid_faction.json b/tests/resources/valid_faction.json index c31b2c8a..1ee00e13 100644 --- a/tests/resources/valid_faction.json +++ b/tests/resources/valid_faction.json @@ -32,7 +32,7 @@ "IFV_M1126_Stryker_ICV", "IFV_M2A2_Bradley", "IFV_LAV_25", - "APC_HMMWV__Scout", + "Scout_HMMWV", "ATGM_HMMWV" ], "artillery_units": [ @@ -85,4 +85,4 @@ ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" -} \ No newline at end of file +} diff --git a/tests/test_factions.py b/tests/test_factions.py index 5b65abb5..232786d4 100644 --- a/tests/test_factions.py +++ b/tests/test_factions.py @@ -82,7 +82,7 @@ class TestFactionLoader(unittest.TestCase): self.assertIn(Armor.IFV_M1126_Stryker_ICV, faction.frontline_units) self.assertIn(Armor.IFV_M2A2_Bradley, faction.frontline_units) self.assertIn(Armor.IFV_LAV_25, faction.frontline_units) - self.assertIn(Armor.APC_HMMWV__Scout, faction.frontline_units) + self.assertIn(Armor.Scout_HMMWV, faction.frontline_units) self.assertIn(Armor.ATGM_HMMWV, faction.frontline_units) self.assertIn(Artillery.MLRS_M270_227mm, faction.artillery_units) From 55d7e444c7a4ec87216b334c95170a0c8b4b8acb Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 16:24:41 -0700 Subject: [PATCH 02/22] Split support info into its own kneeboard page. The first page is getting very crowded. --- gen/kneeboard.py | 130 ++++++++++++++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 48 deletions(-) diff --git a/gen/kneeboard.py b/gen/kneeboard.py index c0035b06..4b53d792 100644 --- a/gen/kneeboard.py +++ b/gen/kneeboard.py @@ -257,21 +257,12 @@ class BriefingPage(KneeboardPage): def __init__( self, flight: FlightData, - comms: List[CommInfo], - awacs: List[AwacsInfo], - tankers: List[TankerInfo], - jtacs: List[JtacInfo], start_time: datetime.datetime, dark_kneeboard: bool, ) -> None: self.flight = flight - self.comms = list(comms) - self.awacs = awacs - self.tankers = tankers - self.jtacs = jtacs self.start_time = start_time self.dark_kneeboard = dark_kneeboard - self.comms.append(CommInfo("Flight", self.flight.intra_flight_channel)) def write(self, path: Path) -> None: writer = KneeboardPageWriter(dark_theme=self.dark_kneeboard) @@ -311,6 +302,86 @@ class BriefingPage(KneeboardPage): ["Bingo", "Joker"], ) + writer.write(path) + + def airfield_info_row( + self, row_title: str, runway: Optional[RunwayData] + ) -> List[str]: + """Creates a table row for a given airfield. + + Args: + row_title: Purpose of the airfield. e.g. "Departure", "Arrival" or + "Divert". + runway: The runway described by this row. + + Returns: + A list of strings to be used as a row of the airfield table. + """ + if runway is None: + return [row_title, "", "", "", "", ""] + + atc = "" + if runway.atc is not None: + atc = self.format_frequency(runway.atc) + if runway.tacan is None: + tacan = "" + else: + tacan = str(runway.tacan) + if runway.ils is not None: + ils = str(runway.ils) + elif runway.icls is not None: + ils = str(runway.icls) + else: + ils = "" + return [ + row_title, + runway.airfield_name, + atc, + tacan, + ils, + runway.runway_name, + ] + + def format_frequency(self, frequency: RadioFrequency) -> str: + channel = self.flight.channel_for(frequency) + if channel is None: + return str(frequency) + + namer = AIRCRAFT_DATA[self.flight.aircraft_type.id].channel_namer + channel_name = namer.channel_name(channel.radio_id, channel.channel) + return f"{channel_name} {frequency}" + + +class SupportPage(KneeboardPage): + """A kneeboard page containing information about support units.""" + + def __init__( + self, + flight: FlightData, + comms: List[CommInfo], + awacs: List[AwacsInfo], + tankers: List[TankerInfo], + jtacs: List[JtacInfo], + start_time: datetime.datetime, + dark_kneeboard: bool, + ) -> None: + self.flight = flight + self.comms = list(comms) + self.awacs = awacs + self.tankers = tankers + self.jtacs = jtacs + self.start_time = start_time + self.dark_kneeboard = dark_kneeboard + self.comms.append(CommInfo("Flight", self.flight.intra_flight_channel)) + + def write(self, path: Path) -> None: + writer = KneeboardPageWriter(dark_theme=self.dark_kneeboard) + if self.flight.custom_name is not None: + custom_name_title = ' ("{}")'.format(self.flight.custom_name) + else: + custom_name_title = "" + writer.title(f"{self.flight.callsign} Support Info{custom_name_title}") + # AEW&C writer.heading("AEW&C") aewc_ladder = [] @@ -368,44 +439,6 @@ class BriefingPage(KneeboardPage): writer.write(path) - def airfield_info_row( - self, row_title: str, runway: Optional[RunwayData] - ) -> List[str]: - """Creates a table row for a given airfield. - - Args: - row_title: Purpose of the airfield. e.g. "Departure", "Arrival" or - "Divert". - runway: The runway described by this row. - - Returns: - A list of strings to be used as a row of the airfield table. - """ - if runway is None: - return [row_title, "", "", "", "", ""] - - atc = "" - if runway.atc is not None: - atc = self.format_frequency(runway.atc) - if runway.tacan is None: - tacan = "" - else: - tacan = str(runway.tacan) - if runway.ils is not None: - ils = str(runway.ils) - elif runway.icls is not None: - ils = str(runway.icls) - else: - ils = "" - return [ - row_title, - runway.airfield_name, - atc, - tacan, - ils, - runway.runway_name, - ] - def format_frequency(self, frequency: RadioFrequency) -> str: channel = self.flight.channel_for(frequency) if channel is None: @@ -557,7 +590,8 @@ class KneeboardGenerator(MissionInfoGenerator): def generate_flight_kneeboard(self, flight: FlightData) -> List[KneeboardPage]: """Returns a list of kneeboard pages for the given flight.""" pages: List[KneeboardPage] = [ - BriefingPage( + BriefingPage(flight, self.mission.start_time, self.dark_kneeboard), + SupportPage( flight, self.comms, self.awacs, From 1c32ae1227595f291d10d503501b909165ccc003 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 16:50:01 -0700 Subject: [PATCH 03/22] Create default strike target implementation. --- game/theater/missiontarget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/theater/missiontarget.py b/game/theater/missiontarget.py index 8d026625..197de586 100644 --- a/game/theater/missiontarget.py +++ b/game/theater/missiontarget.py @@ -46,4 +46,4 @@ class MissionTarget: @property def strike_targets(self) -> List[Union[MissionTarget, Unit]]: - raise NotImplementedError + return [] From 102544877d57388feffcd978f535e7fc54b4ad8e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 16:57:35 -0700 Subject: [PATCH 04/22] Fix common cases of kneeboard overflow. --- changelog.md | 1 + gen/kneeboard.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 50252a96..6ab94362 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ Saves from 2.5 are not compatible with 3.0. * **[Campaign AI]** AI now considers Ju-88s for CAS, strike, and DEAD missions. * **[Campaign AI]** Fix purchase of aircraft by priority (the faction's list was being used as the priority list rather than the game's). * **[Flight Planner]** AI strike flight plans now include the correct target actions for building groups. +* **[Kneeboard]** ATC table overflow alleviated by wrapping long airfield names and splitting ATC frequency and channel into separate rows. * **[UI]** Added new web based map UI. This is mostly functional but many of the old display options are a WIP. Revert to the old map with --old-map. * **[UI]** Campaigns generated for an older or newer version of the game will now be marked as incompatible. They can still be played, but bugs may be present. * **[UI]** DCS loadouts are now selectable in the loadout setup menu. diff --git a/gen/kneeboard.py b/gen/kneeboard.py index 4b53d792..d650d80d 100644 --- a/gen/kneeboard.py +++ b/gen/kneeboard.py @@ -23,6 +23,7 @@ only be added per airframe, so PvP missions where each side have the same aircraft will be able to see the enemy's kneeboard for the same airframe. """ import datetime +import textwrap from collections import defaultdict from dataclasses import dataclass from pathlib import Path @@ -335,7 +336,7 @@ class BriefingPage(KneeboardPage): ils = "" return [ row_title, - runway.airfield_name, + "\n".join(textwrap.wrap(runway.airfield_name, width=24)), atc, tacan, ils, @@ -349,7 +350,7 @@ class BriefingPage(KneeboardPage): namer = AIRCRAFT_DATA[self.flight.aircraft_type.id].channel_namer channel_name = namer.channel_name(channel.radio_id, channel.channel) - return f"{channel_name} {frequency}" + return f"{channel_name}\n{frequency}" class SupportPage(KneeboardPage): From 79708f9ba6a795c421f061386e30bb6d15f1a0d3 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 02:06:12 +0200 Subject: [PATCH 05/22] Unit support : VAB Mephisto --- game/db.py | 3 +++ gen/ground_forces/ai_ground_planner_db.py | 1 + resources/factions/NATO_Desert_Storm.json | 3 ++- resources/factions/bluefor_modern.json | 3 ++- resources/factions/france_1985_frenchpack.json | 5 +---- resources/factions/france_1995.json | 4 +--- resources/factions/france_2005_frenchpack.json | 4 ++-- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/game/db.py b/game/db.py index eb2b692f..ae3d5380 100644 --- a/game/db.py +++ b/game/db.py @@ -504,6 +504,7 @@ PRICES = { Armor.APC_M113: 6, Armor.Scout_HMMWV: 2, Armor.ATGM_HMMWV: 8, + Armor.ATGM_VAB_Mephisto: 12, Armor.IFV_M2A2_Bradley: 12, Armor.IFV_M1126_Stryker_ICV: 10, Armor.SPG_Stryker_MGS: 14, @@ -913,6 +914,8 @@ UNIT_BY_TASK = { Armor.APC_TPz_Fuchs, Armor.ATGM_HMMWV, Armor.ATGM_HMMWV, + Armor.ATGM_VAB_Mephisto, + Armor.ATGM_VAB_Mephisto, Armor.Scout_HMMWV, Armor.Scout_HMMWV, Armor.IFV_M2A2_Bradley, diff --git a/gen/ground_forces/ai_ground_planner_db.py b/gen/ground_forces/ai_ground_planner_db.py index 3fee5901..6c95aa61 100644 --- a/gen/ground_forces/ai_ground_planner_db.py +++ b/gen/ground_forces/ai_ground_planner_db.py @@ -45,6 +45,7 @@ TYPE_TANKS = [ TYPE_ATGM = [ Armor.ATGM_HMMWV, + Armor.ATGM_VAB_Mephisto, Armor.ATGM_Stryker, Armor.IFV_BMP_2, # WW2 (Tank Destroyers) diff --git a/resources/factions/NATO_Desert_Storm.json b/resources/factions/NATO_Desert_Storm.json index 30a6e30b..0c02a3d1 100644 --- a/resources/factions/NATO_Desert_Storm.json +++ b/resources/factions/NATO_Desert_Storm.json @@ -47,7 +47,8 @@ "MBT_Challenger_II", "MBT_M60A3_Patton", "SPG_Stryker_MGS", - "SAM_Avenger__Stinger" + "SAM_Avenger__Stinger", + "ATGM_VAB_Mephisto" ], "artillery_units": [ "MLRS_M270_227mm", diff --git a/resources/factions/bluefor_modern.json b/resources/factions/bluefor_modern.json index 2794fe88..a07ba747 100644 --- a/resources/factions/bluefor_modern.json +++ b/resources/factions/bluefor_modern.json @@ -46,7 +46,8 @@ "Scout_HMMWV", "ATGM_HMMWV", "SAM_Linebacker___Bradley_M6", - "SAM_Avenger__Stinger" + "SAM_Avenger__Stinger", + "ATGM_VAB_Mephisto" ], "artillery_units": [ "MLRS_M270_227mm", diff --git a/resources/factions/france_1985_frenchpack.json b/resources/factions/france_1985_frenchpack.json index 86bad8bc..9d9a80b9 100644 --- a/resources/factions/france_1985_frenchpack.json +++ b/resources/factions/france_1985_frenchpack.json @@ -23,13 +23,10 @@ "ERC_90", "TRM_2000_PAMELA", "VAB__50", - "VAB_MEPHISTO", - "VAB_T20_13", + "ATGM_VAB_Mephisto", "VAB_T20_13", "VBL__50", "VBL_AANF1", - "VBAE_CRAB", - "VBAE_CRAB_MMP", "AMX_30B2", "SAM_Roland_ADS" ], diff --git a/resources/factions/france_1995.json b/resources/factions/france_1995.json index e81fca28..de7d313f 100644 --- a/resources/factions/france_1995.json +++ b/resources/factions/france_1995.json @@ -21,10 +21,8 @@ "MBT_Leclerc", "APC_TPz_Fuchs", "Scout_Cobra", - "ATGM_Stryker", "IFV_LAV_25", - "Scout_HMMWV", - "ATGM_HMMWV", + "ATGM_VAB_Mephisto", "SAM_Roland_ADS" ], "artillery_units": [ diff --git a/resources/factions/france_2005_frenchpack.json b/resources/factions/france_2005_frenchpack.json index bae4fbf3..77eb2dce 100644 --- a/resources/factions/france_2005_frenchpack.json +++ b/resources/factions/france_2005_frenchpack.json @@ -24,7 +24,6 @@ "ERC_90", "TRM_2000_PAMELA", "VAB__50", - "VAB_MEPHISTO", "VAB_T20_13", "VAB_T20_13", "VBL__50", @@ -33,7 +32,8 @@ "VBAE_CRAB_MMP", "AMX_30B2", "Leclerc_Serie_XXI", - "SAM_Roland_ADS" + "SAM_Roland_ADS", + "ATGM_VAB_Mephisto" ], "artillery_units": [ "MLRS_M270_227mm", From 9a1b21a2fa6968a558c0e48a7114c49a9ce9c2a9 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 02:19:52 +0200 Subject: [PATCH 06/22] Unit support : PT-76 --- game/db.py | 2 ++ gen/ground_forces/ai_ground_planner_db.py | 1 + resources/factions/insurgents.json | 1 + resources/factions/insurgents_hard.json | 1 + resources/factions/iraq_1991.json | 1 + resources/factions/libya_2011.json | 1 + resources/factions/north_korea_2000.json | 1 + resources/factions/russia_1955.json | 1 + resources/factions/russia_1965.json | 1 + resources/factions/russia_1970_limited_air.json | 1 + resources/factions/russia_1975.json | 1 + resources/factions/syria_1967.json | 1 + resources/factions/syria_1967_with_ww2_weapons.json | 1 + resources/factions/syria_1973.json | 1 + resources/factions/syria_1982.json | 1 + resources/factions/syria_2011.json | 1 + 16 files changed, 17 insertions(+) diff --git a/game/db.py b/game/db.py index ae3d5380..41062262 100644 --- a/game/db.py +++ b/game/db.py @@ -498,6 +498,7 @@ PRICES = { Armor.IFV_BMP_1: 14, Armor.IFV_BMP_2: 16, Armor.IFV_BMP_3: 18, + Armor.LT_PT_76: 9, Armor.ZBD_04A: 12, Armor.ZTZ_96B: 30, Armor.Scout_Cobra: 4, @@ -886,6 +887,7 @@ UNIT_BY_TASK = { Armor.IFV_BMP_3, Armor.IFV_BMP_3, Armor.IFV_BMD_1, + Armor.LT_PT_76, Armor.ZBD_04A, Armor.ZBD_04A, Armor.ZBD_04A, diff --git a/gen/ground_forces/ai_ground_planner_db.py b/gen/ground_forces/ai_ground_planner_db.py index 6c95aa61..4fa1798c 100644 --- a/gen/ground_forces/ai_ground_planner_db.py +++ b/gen/ground_forces/ai_ground_planner_db.py @@ -19,6 +19,7 @@ TYPE_TANKS = [ Armor.MBT_M60A3_Patton, Armor.MBT_Merkava_IV, Armor.ZTZ_96B, + Armor.LT_PT_76, # WW2 Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, Armor.Tk_PzIV_H, diff --git a/resources/factions/insurgents.json b/resources/factions/insurgents.json index 9cbec87b..cbf7b3b3 100644 --- a/resources/factions/insurgents.json +++ b/resources/factions/insurgents.json @@ -9,6 +9,7 @@ "Scout_Cobra", "APC_MTLB", "Scout_BRDM_2", + "LT_PT_76", "SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375" ], "artillery_units": [ diff --git a/resources/factions/insurgents_hard.json b/resources/factions/insurgents_hard.json index b90da386..14825184 100644 --- a/resources/factions/insurgents_hard.json +++ b/resources/factions/insurgents_hard.json @@ -11,6 +11,7 @@ "Scout_BRDM_2", "APC_BTR_80", "APC_BTR_RD", + "LT_PT_76", "IFV_BMP_1", "MBT_T_55", "SPAAA_ZU_23_2_Insurgent_Mounted_Ural_375", diff --git a/resources/factions/iraq_1991.json b/resources/factions/iraq_1991.json index 591b886a..0558dc7a 100644 --- a/resources/factions/iraq_1991.json +++ b/resources/factions/iraq_1991.json @@ -31,6 +31,7 @@ "MBT_T_72B", "APC_BTR_80", "Scout_BRDM_2", + "LT_PT_76", "SPH_2S1_Gvozdika_122mm", "SPAAA_ZSU_57_2", "SPAAA_ZSU_23_4_Shilka_Gun_Dish" diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index 0b83dc6e..3e050e76 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -21,6 +21,7 @@ "Scout_BRDM_2", "MBT_T_72B", "MBT_T_55", + "LT_PT_76", "SPAAA_ZSU_23_4_Shilka_Gun_Dish", "SAM_SA_8_Osa_Gecko_TEL" ], diff --git a/resources/factions/north_korea_2000.json b/resources/factions/north_korea_2000.json index cbd3d040..ffd01032 100644 --- a/resources/factions/north_korea_2000.json +++ b/resources/factions/north_korea_2000.json @@ -25,6 +25,7 @@ "MBT_T_55", "MBT_T_72B", "MBT_T_80U", + "LT_PT_76", "SPAAA_ZSU_57_2", "SAM_SA_9_Strela_1_Gaskin_TEL" ], diff --git a/resources/factions/russia_1955.json b/resources/factions/russia_1955.json index 624daaae..dd34fd26 100644 --- a/resources/factions/russia_1955.json +++ b/resources/factions/russia_1955.json @@ -17,6 +17,7 @@ "Grad_MRL_FDDM__FC", "APC_MTLB", "MBT_T_55", + "LT_PT_76", "SPAAA_ZU_23_2_Mounted_Ural_375", "AAA_8_8cm_Flak_18", "AAA_S_60_57mm" diff --git a/resources/factions/russia_1965.json b/resources/factions/russia_1965.json index 39685e7b..b7b28e60 100644 --- a/resources/factions/russia_1965.json +++ b/resources/factions/russia_1965.json @@ -22,6 +22,7 @@ "APC_BTR_RD", "IFV_BMD_1", "IFV_BMP_1", + "LT_PT_76", "MBT_T_55", "SPAAA_ZU_23_2_Mounted_Ural_375", "SPAAA_ZSU_57_2", diff --git a/resources/factions/russia_1970_limited_air.json b/resources/factions/russia_1970_limited_air.json index 3f8cf0aa..82214183 100644 --- a/resources/factions/russia_1970_limited_air.json +++ b/resources/factions/russia_1970_limited_air.json @@ -14,6 +14,7 @@ "APC_BTR_80", "IFV_BMD_1", "IFV_BMP_1", + "LT_PT_76", "MBT_T_55", "SPAAA_ZSU_57_2" ], diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index 6fe0f30c..a98541bb 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -27,6 +27,7 @@ "APC_BTR_80", "IFV_BMD_1", "IFV_BMP_1", + "LT_PT_76", "MBT_T_55", "SAM_SA_8_Osa_Gecko_TEL" ], diff --git a/resources/factions/syria_1967.json b/resources/factions/syria_1967.json index 5e092ed9..cab0ceb8 100644 --- a/resources/factions/syria_1967.json +++ b/resources/factions/syria_1967.json @@ -20,6 +20,7 @@ "Scout_BRDM_2", "Tk_PzIV_H", "MBT_T_55", + "LT_PT_76", "SPAAA_ZU_23_2_Mounted_Ural_375", "SPAAA_ZSU_57_2", "AAA_S_60_57mm" diff --git a/resources/factions/syria_1967_with_ww2_weapons.json b/resources/factions/syria_1967_with_ww2_weapons.json index cfab65fc..cda98f1d 100644 --- a/resources/factions/syria_1967_with_ww2_weapons.json +++ b/resources/factions/syria_1967_with_ww2_weapons.json @@ -20,6 +20,7 @@ "frontline_units": [ "Scout_BRDM_2", "MBT_T_55", + "LT_PT_76", "Tk_PzIV_H", "SPG_StuG_III_Ausf__G", "SPG_Jagdpanzer_IV", diff --git a/resources/factions/syria_1973.json b/resources/factions/syria_1973.json index 302283fe..f5467de4 100644 --- a/resources/factions/syria_1973.json +++ b/resources/factions/syria_1973.json @@ -20,6 +20,7 @@ "IFV_BMP_1", "APC_MTLB", "MBT_T_55", + "LT_PT_76", "SPAAA_ZU_23_2_Mounted_Ural_375", "SPAAA_ZSU_57_2", "AAA_S_60_57mm" diff --git a/resources/factions/syria_1982.json b/resources/factions/syria_1982.json index d8beda8e..022fe6ea 100644 --- a/resources/factions/syria_1982.json +++ b/resources/factions/syria_1982.json @@ -21,6 +21,7 @@ "IFV_BMP_1", "APC_MTLB", "MBT_T_55", + "LT_PT_76", "MBT_T_72B", "SPAAA_ZU_23_2_Mounted_Ural_375", "SPAAA_ZSU_57_2", diff --git a/resources/factions/syria_2011.json b/resources/factions/syria_2011.json index 3a5a3d21..c5a3e375 100644 --- a/resources/factions/syria_2011.json +++ b/resources/factions/syria_2011.json @@ -27,6 +27,7 @@ "IFV_BMP_2", "APC_BTR_80", "Scout_BRDM_2", + "LT_PT_76", "APC_MTLB", "Scout_Cobra", "MBT_T_55", From e12e2c4b0b718a39a6a12f4bf6169332be895350 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 02:24:14 +0200 Subject: [PATCH 07/22] Unit support : Chieftain Mk3 --- game/db.py | 2 ++ gen/ground_forces/ai_ground_planner_db.py | 1 + resources/factions/iran_1988.json | 1 + resources/factions/iran_2015.json | 1 + resources/factions/iraq_1991.json | 1 + resources/factions/uk_1990.json | 1 + 6 files changed, 7 insertions(+) diff --git a/game/db.py b/game/db.py index 41062262..4ad4ff21 100644 --- a/game/db.py +++ b/game/db.py @@ -521,6 +521,7 @@ PRICES = { Armor.MBT_Merkava_IV: 25, Armor.APC_TPz_Fuchs: 5, Armor.MBT_Challenger_II: 25, + Armor.MBT_Chieftain_Mk_3: 20, Armor.IFV_Marder: 10, Armor.IFV_Warrior: 10, Armor.IFV_LAV_25: 7, @@ -946,6 +947,7 @@ UNIT_BY_TASK = { Armor.MBT_Leclerc, Armor.MBT_Leopard_2A6M, Armor.MBT_Challenger_II, + Armor.MBT_Chieftain_Mk_3, Armor.MBT_Merkava_IV, Armor.MT_Pz_Kpfw_V_Panther_Ausf_G, Armor.Tk_PzIV_H, diff --git a/gen/ground_forces/ai_ground_planner_db.py b/gen/ground_forces/ai_ground_planner_db.py index 4fa1798c..cdef9ff0 100644 --- a/gen/ground_forces/ai_ground_planner_db.py +++ b/gen/ground_forces/ai_ground_planner_db.py @@ -15,6 +15,7 @@ TYPE_TANKS = [ Armor.MBT_Leopard_1A3, Armor.MBT_Leclerc, Armor.MBT_Challenger_II, + Armor.MBT_Chieftain_Mk_3, Armor.MBT_M1A2_Abrams, Armor.MBT_M60A3_Patton, Armor.MBT_Merkava_IV, diff --git a/resources/factions/iran_1988.json b/resources/factions/iran_1988.json index 21fa2707..94ae7f6f 100644 --- a/resources/factions/iran_1988.json +++ b/resources/factions/iran_1988.json @@ -20,6 +20,7 @@ "APC_M113", "APC_BTR_80", "MBT_M60A3_Patton", + "MBT_Chieftain_Mk_3", "IFV_BMP_1", "SPAAA_ZSU_23_4_Shilka_Gun_Dish", "SPAAA_ZSU_57_2", diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json index 15a0771e..cf43da9a 100644 --- a/resources/factions/iran_2015.json +++ b/resources/factions/iran_2015.json @@ -26,6 +26,7 @@ "APC_M113", "APC_BTR_80", "MBT_M60A3_Patton", + "MBT_Chieftain_Mk_3", "IFV_BMP_1", "MBT_T_72B", "SPAAA_ZSU_23_4_Shilka_Gun_Dish", diff --git a/resources/factions/iraq_1991.json b/resources/factions/iraq_1991.json index 0558dc7a..ecb9579d 100644 --- a/resources/factions/iraq_1991.json +++ b/resources/factions/iraq_1991.json @@ -29,6 +29,7 @@ "APC_MTLB", "MBT_T_55", "MBT_T_72B", + "MBT_Chieftain_Mk_3", "APC_BTR_80", "Scout_BRDM_2", "LT_PT_76", diff --git a/resources/factions/uk_1990.json b/resources/factions/uk_1990.json index 492a3d99..0ecf564e 100644 --- a/resources/factions/uk_1990.json +++ b/resources/factions/uk_1990.json @@ -19,6 +19,7 @@ ], "frontline_units": [ "MBT_Challenger_II", + "MBT_Chieftain_Mk_3", "IFV_Warrior", "Scout_HMMWV", "ATGM_HMMWV", From e795e96bfbd83fe55a03720ef097a0514657227e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 17:24:02 -0700 Subject: [PATCH 08/22] Don't show red support units on blue kneeboards. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1080 --- game/operation/operation.py | 15 +++++++++------ gen/aircraft.py | 3 ++- gen/airsupportgen.py | 18 ++++++++++++++---- gen/armor.py | 12 ++++++++++-- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/game/operation/operation.py b/game/operation/operation.py index 0b43e45c..8297a599 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -171,13 +171,16 @@ class Operation: gen.add_dynamic_runway(dynamic_runway) for tanker in airsupportgen.air_support.tankers: - gen.add_tanker(tanker) + if tanker.blue: + gen.add_tanker(tanker) for aewc in airsupportgen.air_support.awacs: - gen.add_awacs(aewc) + if aewc.blue: + gen.add_awacs(aewc) for jtac in jtacs: - gen.add_jtac(jtac) + if jtac.blue: + gen.add_jtac(jtac) for flight in airgen.flights: gen.add_flight(flight) @@ -453,7 +456,7 @@ class Operation: for tanker in airsupportgen.air_support.tankers: luaData["Tankers"][tanker.callsign] = { - "dcsGroupName": tanker.dcsGroupName, + "dcsGroupName": tanker.group_name, "callsign": tanker.callsign, "variant": tanker.variant, "radio": tanker.freq.mhz, @@ -463,14 +466,14 @@ class Operation: if airsupportgen.air_support.awacs: for awacs in airsupportgen.air_support.awacs: luaData["AWACs"][awacs.callsign] = { - "dcsGroupName": awacs.dcsGroupName, + "dcsGroupName": awacs.group_name, "callsign": awacs.callsign, "radio": awacs.freq.mhz, } for jtac in jtacs: luaData["JTACs"][jtac.callsign] = { - "dcsGroupName": jtac.dcsGroupName, + "dcsGroupName": jtac.group_name, "callsign": jtac.callsign, "zone": jtac.region, "dcsUnit": jtac.unit_name, diff --git a/gen/aircraft.py b/gen/aircraft.py index 92cead03..84c8c020 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -815,12 +815,13 @@ class AircraftConflictGenerator: self.air_support.awacs.append( AwacsInfo( - dcsGroupName=str(group.name), + group_name=str(group.name), callsign=callsign, freq=channel, depature_location=flight.departure.name, end_time=flight.flight_plan.mission_departure_time, start_time=flight.flight_plan.mission_start_time, + blue=flight.departure.captured, ) ) diff --git a/gen/airsupportgen.py b/gen/airsupportgen.py index 81d900aa..3b39a37b 100644 --- a/gen/airsupportgen.py +++ b/gen/airsupportgen.py @@ -35,23 +35,25 @@ AWACS_ALT = 13000 class AwacsInfo: """AWACS information for the kneeboard.""" - dcsGroupName: str + group_name: str callsign: str freq: RadioFrequency depature_location: Optional[str] start_time: Optional[timedelta] end_time: Optional[timedelta] + blue: bool @dataclass class TankerInfo: """Tanker information for the kneeboard.""" - dcsGroupName: str + group_name: str callsign: str variant: str freq: RadioFrequency tacan: TacanChannel + blue: bool @dataclass @@ -165,7 +167,14 @@ class AirSupportConflictGenerator: tanker_group.points[0].tasks.append(SetImmortalCommand(True)) self.air_support.tankers.append( - TankerInfo(str(tanker_group.name), callsign, variant, freq, tacan) + TankerInfo( + str(tanker_group.name), + callsign, + variant, + freq, + tacan, + blue=True, + ) ) if not self.game.settings.disable_legacy_aewc: @@ -196,12 +205,13 @@ class AirSupportConflictGenerator: self.air_support.awacs.append( AwacsInfo( - dcsGroupName=str(awacs_flight.name), + group_name=str(awacs_flight.name), callsign=callsign_for_support_unit(awacs_flight), freq=freq, depature_location=None, start_time=None, end_time=None, + blue=True, ) ) else: diff --git a/gen/armor.py b/gen/armor.py index 31447e2c..3b9f93ee 100644 --- a/gen/armor.py +++ b/gen/armor.py @@ -68,11 +68,12 @@ INFANTRY_GROUP_SIZE = 5 class JtacInfo: """JTAC information.""" - dcsGroupName: str + group_name: str unit_name: str callsign: str region: str code: str + blue: bool # TODO: Radio info? Type? @@ -196,7 +197,14 @@ class GroundConflictGenerator: # Note: Will need to change if we ever add ground based JTAC. callsign = callsign_for_support_unit(jtac) self.jtacs.append( - JtacInfo(str(jtac.name), n, callsign, frontline, str(code)) + JtacInfo( + str(jtac.name), + n, + callsign, + frontline, + str(code), + blue=True, + ) ) def gen_infantry_group_for_group( From cbce379132823cf34922972a033ae883b3574b08 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 02:29:07 +0200 Subject: [PATCH 09/22] Unit support : T-155 Firtina --- game/db.py | 2 ++ gen/ground_forces/ai_ground_planner_db.py | 1 + resources/factions/turkey_2005.json | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/game/db.py b/game/db.py index 4ad4ff21..0d361b05 100644 --- a/game/db.py +++ b/game/db.py @@ -537,6 +537,7 @@ PRICES = { Artillery.Mortar_2B11_120mm: 4, Artillery.SPH_Dana_vz77_152mm: 26, Artillery.PLZ_05: 25, + Artillery.SPH_T155_Firtina_155mm: 28, Unarmed.LUV_UAZ_469_Jeep: 3, Unarmed.Truck_Ural_375: 3, Infantry.Infantry_M4: 1, @@ -1009,6 +1010,7 @@ UNIT_BY_TASK = { Artillery.MLRS_9K57_Uragan_BM_27_220mm, Artillery.MLRS_9A52_Smerch_HE_300mm, Artillery.SPH_Dana_vz77_152mm, + Artillery.SPH_T155_Firtina_155mm, Artillery.PLZ_05, Artillery.SPG_M12_GMC_155mm, Armor.SPG_Sturmpanzer_IV_Brummbar, diff --git a/gen/ground_forces/ai_ground_planner_db.py b/gen/ground_forces/ai_ground_planner_db.py index cdef9ff0..fe200fbd 100644 --- a/gen/ground_forces/ai_ground_planner_db.py +++ b/gen/ground_forces/ai_ground_planner_db.py @@ -117,6 +117,7 @@ TYPE_ARTILLERY = [ Artillery.MLRS_M270_227mm, Artillery.SPM_2S9_Nona_120mm_M, Artillery.SPH_Dana_vz77_152mm, + Artillery.SPH_T155_Firtina_155mm, Artillery.PLZ_05, Artillery.SPH_2S19_Msta_152mm, Artillery.MLRS_9A52_Smerch_CM_300mm, diff --git a/resources/factions/turkey_2005.json b/resources/factions/turkey_2005.json index dfe8df1e..f5ab355d 100644 --- a/resources/factions/turkey_2005.json +++ b/resources/factions/turkey_2005.json @@ -25,7 +25,7 @@ "SAM_Avenger__Stinger" ], "artillery_units": [ - "SPH_M109_Paladin_155mm" + "SPH_T155_Firtina_155mm" ], "logistics_units": [ "Truck_M818_6x6" From 3c8c76f50d45733819b98767254d860ad98eb76f Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 21 May 2021 02:45:15 +0200 Subject: [PATCH 10/22] Unit support : La Combattante II class ship --- gen/fleet/lacombattanteII.py | 12 ++++++++++++ gen/fleet/ship_group_generator.py | 2 ++ resources/factions/georgia_2008.json | 3 +++ resources/factions/germany_1990.json | 3 ++- resources/factions/greece_2005.json | 3 +++ resources/factions/iran_1988.json | 2 +- resources/factions/iran_2015.json | 3 ++- resources/factions/libya_2011.json | 2 +- 8 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 gen/fleet/lacombattanteII.py diff --git a/gen/fleet/lacombattanteII.py b/gen/fleet/lacombattanteII.py new file mode 100644 index 00000000..9d1ba6e1 --- /dev/null +++ b/gen/fleet/lacombattanteII.py @@ -0,0 +1,12 @@ +from dcs.ships import FAC_La_Combattante_IIa + +from game.factions.faction import Faction +from game.theater import TheaterGroundObject +from gen.fleet.dd_group import DDGroupGenerator + + +class LaCombattanteIIGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object: TheaterGroundObject, faction: Faction): + super(LaCombattanteIIGroupGenerator, self).__init__( + game, ground_object, faction, FAC_La_Combattante_IIa + ) diff --git a/gen/fleet/ship_group_generator.py b/gen/fleet/ship_group_generator.py index 024d6e03..03ab852f 100644 --- a/gen/fleet/ship_group_generator.py +++ b/gen/fleet/ship_group_generator.py @@ -8,6 +8,7 @@ from gen.fleet.dd_group import ( ArleighBurkeGroupGenerator, OliverHazardPerryGroupGenerator, ) +from gen.fleet.lacombattanteII import LaCombattanteIIGroupGenerator from gen.fleet.lha_group import LHAGroupGenerator from gen.fleet.ru_dd_group import ( RussianNavyGroupGenerator, @@ -34,6 +35,7 @@ SHIP_MAP = { "KiloSubGroupGenerator": KiloSubGroupGenerator, "TangoSubGroupGenerator": TangoSubGroupGenerator, "Type54GroupGenerator": Type54GroupGenerator, + "LaCombattanteIIGroupGenerator": LaCombattanteIIGroupGenerator, } diff --git a/resources/factions/georgia_2008.json b/resources/factions/georgia_2008.json index 08825296..f1937456 100644 --- a/resources/factions/georgia_2008.json +++ b/resources/factions/georgia_2008.json @@ -45,6 +45,9 @@ "ZU23Generator", "ZU23UralGenerator" ], + "navy_generators": [ + "LaCombattanteIIGroupGenerator" + ], "requirements": {}, "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/germany_1990.json b/resources/factions/germany_1990.json index 57e5b36e..1d7e9872 100644 --- a/resources/factions/germany_1990.json +++ b/resources/factions/germany_1990.json @@ -61,7 +61,8 @@ "helicopter_carrier_names": [ ], "navy_generators": [ - "OliverHazardPerryGroupGenerator" + "OliverHazardPerryGroupGenerator", + "LaCombattanteIIGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/greece_2005.json b/resources/factions/greece_2005.json index 5e20bf24..b4586083 100644 --- a/resources/factions/greece_2005.json +++ b/resources/factions/greece_2005.json @@ -46,6 +46,9 @@ "HawkEwrGenerator", "FlatFaceGenerator" ], + "navy_generators": [ + "LaCombattanteIIGroupGenerator" + ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" } diff --git a/resources/factions/iran_1988.json b/resources/factions/iran_1988.json index 94ae7f6f..b73a2f76 100644 --- a/resources/factions/iran_1988.json +++ b/resources/factions/iran_1988.json @@ -76,7 +76,7 @@ ], "coastal_group_count": 2, "navy_generators": [ - "GrishaGroupGenerator", + "LaCombattanteIIGroupGenerator", "MolniyaGroupGenerator" ], "has_jtac": true, diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json index cf43da9a..8efd7301 100644 --- a/resources/factions/iran_2015.json +++ b/resources/factions/iran_2015.json @@ -86,7 +86,8 @@ "coastal_group_count": 3, "navy_generators": [ "GrishaGroupGenerator", - "MolniyaGroupGenerator" + "MolniyaGroupGenerator", + "LaCombattanteIIGroupGenerator" ], "has_jtac": true, "jtac_unit": "MQ_9_Reaper" diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index 3e050e76..cf6b45cd 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -72,6 +72,6 @@ "carrier_names": [ ], "navy_generators": [ - "GrishaGroupGenerator", "MolniyaGroupGenerator" + "GrishaGroupGenerator", "MolniyaGroupGenerator", "LaCombattanteIIGroupGenerator" ] } From a382e74a895c14285d233ce048965c757f1120b1 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 18:18:13 -0700 Subject: [PATCH 11/22] Set up bullseye early, create waypoints. Setting this up as part of the game makes it possible for us to show in the UI. https://github.com/dcs-liberation/dcs_liberation/issues/136 --- changelog.md | 1 + game/game.py | 16 ++++++++++++++++ game/operation/operation.py | 8 ++++++-- game/theater/bullseye.py | 26 ++++++++++++++++++++++++++ game/theater/conflicttheater.py | 10 +--------- game/theater/latlon.py | 11 +++++++++++ gen/flights/flight.py | 1 + gen/flights/flightplan.py | 22 ++++++++++++++++++++++ gen/flights/waypointbuilder.py | 14 ++++++++++++++ gen/triggergen.py | 10 ---------- qt_ui/widgets/map/mapmodel.py | 5 +++++ resources/ui/map/map.js | 2 +- 12 files changed, 104 insertions(+), 22 deletions(-) create mode 100644 game/theater/bullseye.py create mode 100644 game/theater/latlon.py diff --git a/changelog.md b/changelog.md index 6ab94362..6a873d60 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ Saves from 2.5 are not compatible with 3.0. * **[Campaign AI]** AI now considers Ju-88s for CAS, strike, and DEAD missions. * **[Campaign AI]** Fix purchase of aircraft by priority (the faction's list was being used as the priority list rather than the game's). * **[Flight Planner]** AI strike flight plans now include the correct target actions for building groups. +* **[Flight Planner]** Flight plans now include bullseye waypoints. * **[Kneeboard]** ATC table overflow alleviated by wrapping long airfield names and splitting ATC frequency and channel into separate rows. * **[UI]** Added new web based map UI. This is mostly functional but many of the old display options are a WIP. Revert to the old map with --old-map. * **[UI]** Campaigns generated for an older or newer version of the game will now be marked as incompatible. They can still be played, but bugs may be present. diff --git a/game/game.py b/game/game.py index 637c15b3..770c849a 100644 --- a/game/game.py +++ b/game/game.py @@ -34,6 +34,7 @@ from .procurement import AircraftProcurementRequest, ProcurementAi from .profiling import logged_duration from .settings import Settings from .theater import ConflictTheater +from .theater.bullseye import Bullseye from .theater.transitnetwork import TransitNetwork, TransitNetworkBuilder from .threatzones import ThreatZones from .transfers import PendingTransfers @@ -130,6 +131,9 @@ class Game: self.blue_ato = AirTaskingOrder() self.red_ato = AirTaskingOrder() + self.blue_bullseye = Bullseye(Point(0, 0)) + self.red_bullseye = Bullseye(Point(0, 0)) + self.aircraft_inventory = GlobalAircraftInventory(self.theater.controlpoints) self.transfers = PendingTransfers(self) @@ -201,6 +205,11 @@ class Game: return self.player_faction return self.enemy_faction + def bullseye_for(self, player: bool) -> Bullseye: + if player: + return self.blue_bullseye + return self.red_bullseye + def _roll(self, prob, mult): if self.settings.version == "dev": # always generate all events for dev @@ -337,10 +346,17 @@ class Game: return TurnState.CONTINUE + def set_bullseye(self) -> None: + player_cp, enemy_cp = self.theater.closest_opposing_control_points() + self.blue_bullseye = Bullseye(enemy_cp.position) + self.red_bullseye = Bullseye(player_cp.position) + def initialize_turn(self) -> None: self.events = [] self._generate_events() + self.set_bullseye() + # Update statistics self.game_stats.update(self) diff --git a/game/operation/operation.py b/game/operation/operation.py index 8297a599..3899155a 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -108,8 +108,12 @@ class Operation: @classmethod def _setup_mission_coalitions(cls): - cls.current_mission.coalition["blue"] = Coalition("blue") - cls.current_mission.coalition["red"] = Coalition("red") + cls.current_mission.coalition["blue"] = Coalition( + "blue", bullseye=cls.game.blue_bullseye.to_pydcs() + ) + cls.current_mission.coalition["red"] = Coalition( + "red", bullseye=cls.game.red_bullseye.to_pydcs() + ) p_country = cls.game.player_country e_country = cls.game.enemy_country diff --git a/game/theater/bullseye.py b/game/theater/bullseye.py new file mode 100644 index 00000000..6d39821c --- /dev/null +++ b/game/theater/bullseye.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import Dict, TYPE_CHECKING + +from dcs import Point + +from game.theater import LatLon + +if TYPE_CHECKING: + from game.theater import ConflictTheater + + +@dataclass +class Bullseye: + position: Point + + @classmethod + def from_pydcs(cls, bulls: Dict[str, float]) -> Bullseye: + return cls(Point(bulls["x"], bulls["y"])) + + def to_pydcs(self) -> Dict[str, float]: + return {"x": self.position.x, "y": self.position.y} + + def to_lat_lon(self, theater: ConflictTheater) -> LatLon: + return theater.point_to_ll(self.position) diff --git a/game/theater/conflicttheater.py b/game/theater/conflicttheater.py index 7e9fa0fe..26192cb7 100644 --- a/game/theater/conflicttheater.py +++ b/game/theater/conflicttheater.py @@ -41,6 +41,7 @@ from dcs.unitgroup import ( ) from dcs.vehicles import AirDefence, Armor, MissilesSS, Unarmed +from .latlon import LatLon from ..scenery_group import SceneryGroup from pyproj import CRS, Transformer from shapely import geometry, ops @@ -582,15 +583,6 @@ class ReferencePoint: image_coordinates: Point -@dataclass(frozen=True) -class LatLon: - latitude: float - longitude: float - - def as_list(self) -> List[float]: - return [self.latitude, self.longitude] - - class ConflictTheater: terrain: Terrain diff --git a/game/theater/latlon.py b/game/theater/latlon.py new file mode 100644 index 00000000..dde2e442 --- /dev/null +++ b/game/theater/latlon.py @@ -0,0 +1,11 @@ +from dataclasses import dataclass +from typing import List + + +@dataclass(frozen=True) +class LatLon: + latitude: float + longitude: float + + def as_list(self) -> List[float]: + return [self.latitude, self.longitude] diff --git a/gen/flights/flight.py b/gen/flights/flight.py index 397399ed..d5f95862 100644 --- a/gen/flights/flight.py +++ b/gen/flights/flight.py @@ -79,6 +79,7 @@ class FlightWaypointType(Enum): INGRESS_OCA_AIRCRAFT = 25 PICKUP = 26 DROP_OFF = 27 + BULLSEYE = 28 class FlightWaypoint: diff --git a/gen/flights/flightplan.py b/gen/flights/flightplan.py index e648e4bb..b18d8a91 100644 --- a/gen/flights/flightplan.py +++ b/gen/flights/flightplan.py @@ -426,6 +426,7 @@ class BarCapFlightPlan(PatrollingFlightPlan): takeoff: FlightWaypoint land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint def iter_waypoints(self) -> Iterator[FlightWaypoint]: yield self.takeoff @@ -438,6 +439,7 @@ class BarCapFlightPlan(PatrollingFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @dataclass(frozen=True) @@ -446,6 +448,7 @@ class CasFlightPlan(PatrollingFlightPlan): target: FlightWaypoint land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint def iter_waypoints(self) -> Iterator[FlightWaypoint]: yield self.takeoff @@ -459,6 +462,7 @@ class CasFlightPlan(PatrollingFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye def request_escort_at(self) -> Optional[FlightWaypoint]: return self.patrol_start @@ -472,6 +476,7 @@ class TarCapFlightPlan(PatrollingFlightPlan): takeoff: FlightWaypoint land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint lead_time: timedelta def iter_waypoints(self) -> Iterator[FlightWaypoint]: @@ -485,6 +490,7 @@ class TarCapFlightPlan(PatrollingFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @property def tot_offset(self) -> timedelta: @@ -523,6 +529,7 @@ class StrikeFlightPlan(FormationFlightPlan): nav_from: List[FlightWaypoint] land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint def iter_waypoints(self) -> Iterator[FlightWaypoint]: yield self.takeoff @@ -537,6 +544,7 @@ class StrikeFlightPlan(FormationFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @property def package_speed_waypoints(self) -> Set[FlightWaypoint]: @@ -641,6 +649,7 @@ class SweepFlightPlan(LoiterFlightPlan): nav_from: List[FlightWaypoint] land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint lead_time: timedelta def iter_waypoints(self) -> Iterator[FlightWaypoint]: @@ -653,6 +662,7 @@ class SweepFlightPlan(LoiterFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @property def tot_waypoint(self) -> Optional[FlightWaypoint]: @@ -704,6 +714,7 @@ class AwacsFlightPlan(LoiterFlightPlan): nav_from: List[FlightWaypoint] land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint def iter_waypoints(self) -> Iterator[FlightWaypoint]: yield self.takeoff @@ -713,6 +724,7 @@ class AwacsFlightPlan(LoiterFlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @property def mission_start_time(self) -> Optional[timedelta]: @@ -746,6 +758,7 @@ class AirliftFlightPlan(FlightPlan): nav_to_home: List[FlightWaypoint] land: FlightWaypoint divert: Optional[FlightWaypoint] + bullseye: FlightWaypoint def iter_waypoints(self) -> Iterator[FlightWaypoint]: yield self.takeoff @@ -758,6 +771,7 @@ class AirliftFlightPlan(FlightPlan): yield self.land if self.divert is not None: yield self.divert + yield self.bullseye @property def tot_waypoint(self) -> Optional[FlightWaypoint]: @@ -1053,6 +1067,7 @@ class FlightPlanBuilder: ), land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), hold=start, hold_duration=timedelta(hours=4), ) @@ -1151,6 +1166,7 @@ class FlightPlanBuilder: patrol_end=end, land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def generate_sweep(self, flight: Flight) -> SweepFlightPlan: @@ -1187,6 +1203,7 @@ class FlightPlanBuilder: sweep_end=end, land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def generate_transport(self, flight: Flight) -> AirliftFlightPlan: @@ -1238,6 +1255,7 @@ class FlightPlanBuilder: ), land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def racetrack_for_objective( @@ -1389,6 +1407,7 @@ class FlightPlanBuilder: patrol_end=end, land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def generate_dead( @@ -1517,6 +1536,7 @@ class FlightPlanBuilder: ), land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def generate_cas(self, flight: Flight) -> CasFlightPlan: @@ -1562,6 +1582,7 @@ class FlightPlanBuilder: patrol_end=builder.egress(egress, location), land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) @staticmethod @@ -1696,6 +1717,7 @@ class FlightPlanBuilder: ), land=builder.land(flight.arrival), divert=builder.divert(flight.divert), + bullseye=builder.bullseye(), ) def _retreating_rendezvous_point(self, attack_transition: Point) -> Point: diff --git a/gen/flights/waypointbuilder.py b/gen/flights/waypointbuilder.py index ffb1e6ab..670cdc01 100644 --- a/gen/flights/waypointbuilder.py +++ b/gen/flights/waypointbuilder.py @@ -50,6 +50,7 @@ class WaypointBuilder: self.threat_zones = game.threat_zone_for(not player) self.navmesh = game.navmesh_for(player) self.targets = targets + self._bullseye = game.bullseye_for(player) @property def is_helo(self) -> bool: @@ -145,6 +146,19 @@ class WaypointBuilder: waypoint.only_for_player = True return waypoint + def bullseye(self) -> FlightWaypoint: + waypoint = FlightWaypoint( + FlightWaypointType.BULLSEYE, + self._bullseye.position.x, + self._bullseye.position.y, + meters(0), + ) + waypoint.pretty_name = "Bullseye" + waypoint.description = "Bullseye" + waypoint.name = "BULLSEYE" + waypoint.only_for_player = True + return waypoint + def hold(self, position: Point) -> FlightWaypoint: waypoint = FlightWaypoint( FlightWaypointType.LOITER, diff --git a/gen/triggergen.py b/gen/triggergen.py index 7df4838f..fc68f96e 100644 --- a/gen/triggergen.py +++ b/gen/triggergen.py @@ -209,16 +209,6 @@ class TriggersGenerator: player_coalition = "blue" enemy_coalition = "red" - player_cp, enemy_cp = self.game.theater.closest_opposing_control_points() - self.mission.coalition["blue"].bullseye = { - "x": enemy_cp.position.x, - "y": enemy_cp.position.y, - } - self.mission.coalition["red"].bullseye = { - "x": player_cp.position.x, - "y": player_cp.position.y, - } - self._set_skill(player_coalition, enemy_coalition) self._set_allegiances(player_coalition, enemy_coalition) self._gen_markers() diff --git a/qt_ui/widgets/map/mapmodel.py b/qt_ui/widgets/map/mapmodel.py index 0a77094f..bdb379d3 100644 --- a/qt_ui/widgets/map/mapmodel.py +++ b/qt_ui/widgets/map/mapmodel.py @@ -375,6 +375,7 @@ class WaypointJs(QObject): timingChanged = Signal() isTakeoffChanged = Signal() isDivertChanged = Signal() + isBullseyeChanged = Signal() def __init__( self, @@ -439,6 +440,10 @@ class WaypointJs(QObject): def isDivert(self) -> bool: return self.waypoint.waypoint_type is FlightWaypointType.DIVERT + @Property(bool, notify=isBullseyeChanged) + def isBullseye(self) -> bool: + return self.waypoint.waypoint_type is FlightWaypointType.BULLSEYE + @Slot(list, result=str) def setPosition(self, position: LeafletLatLon) -> str: point = self.theater.ll_to_point(LatLon(*position)) diff --git a/resources/ui/map/map.js b/resources/ui/map/map.js index 3aade142..1b421520 100644 --- a/resources/ui/map/map.js +++ b/resources/ui/map/map.js @@ -570,7 +570,7 @@ class Waypoint { } includeInPath() { - return !this.waypoint.isDivert; + return !this.waypoint.isDivert && !this.waypoint.isBullseye; } } From 2f6c04a86df0fa3833d32bb75ff643ed37b5ecf7 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 18:35:32 -0700 Subject: [PATCH 12/22] Add bullseye to the kneeboard. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/136 --- gen/kneeboard.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gen/kneeboard.py b/gen/kneeboard.py index d650d80d..e28ded01 100644 --- a/gen/kneeboard.py +++ b/gen/kneeboard.py @@ -38,6 +38,7 @@ from tabulate import tabulate from game.data.alic import AlicCodes from game.db import find_unittype, unit_type_from_name from game.theater import ConflictTheater, TheaterGroundObject, LatLon +from game.theater.bullseye import Bullseye from game.utils import meters from .aircraft import AIRCRAFT_DATA, FlightData from .airsupportgen import AwacsInfo, TankerInfo @@ -258,10 +259,14 @@ class BriefingPage(KneeboardPage): def __init__( self, flight: FlightData, + bullseye: Bullseye, + theater: ConflictTheater, start_time: datetime.datetime, dark_kneeboard: bool, ) -> None: self.flight = flight + self.bullseye = bullseye + self.theater = theater self.start_time = start_time self.dark_kneeboard = dark_kneeboard @@ -293,6 +298,10 @@ class BriefingPage(KneeboardPage): headers=["#", "Action", "Alt", "Dist", "GSPD", "Time", "Departure"], ) + writer.text( + f"Bullseye: {self.format_ll(self.bullseye.to_lat_lon(self.theater))}" + ) + writer.table( [ [ @@ -591,7 +600,13 @@ class KneeboardGenerator(MissionInfoGenerator): def generate_flight_kneeboard(self, flight: FlightData) -> List[KneeboardPage]: """Returns a list of kneeboard pages for the given flight.""" pages: List[KneeboardPage] = [ - BriefingPage(flight, self.mission.start_time, self.dark_kneeboard), + BriefingPage( + flight, + self.game.bullseye_for(flight.friendly), + self.game.theater, + self.mission.start_time, + self.dark_kneeboard, + ), SupportPage( flight, self.comms, From 0cd2c4a90c3f9422e773f88f5c5ffc7aacedb6df Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 18:59:03 -0700 Subject: [PATCH 13/22] Stop awarding income for FOB structures. The CP already grants income. Fixes: https://github.com/dcs-liberation/dcs_liberation/issues/685 --- game/db.py | 1 - 1 file changed, 1 deletion(-) diff --git a/game/db.py b/game/db.py index 0d361b05..2f297cbf 100644 --- a/game/db.py +++ b/game/db.py @@ -1250,7 +1250,6 @@ REWARDS = { "fuel": 2, "ammo": 2, "farp": 1, - "fob": 1, # TODO: Should generate no cash once they generate units. "factory": 10, "comms": 10, From 664092c02347ee0bc4dd0c0cb07b18c575ce73e6 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 19:01:43 -0700 Subject: [PATCH 14/22] Remove non-CP FOBs. --- changelog.md | 1 + game/data/building_data.py | 3 --- game/theater/start_generator.py | 7 +------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index 6a873d60..b0f8e3c9 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ Saves from 2.5 are not compatible with 3.0. * **[Campaign]** Ground units can now be transferred by road, airlift, and cargo ship. See https://github.com/dcs-liberation/dcs_liberation/wiki/Unit-Transfers for more information. * **[Campaign]** Ground units can no longer be sold. To move units to a new location, transfer them. * **[Campaign]** Ground units must now be recruited at a base with a factory and transferred to their destination. When buying units in the UI, the purchase will automatically be fulfilled at the closest factory, and a transfer will be created on the next turn. +* **[Campaign]** Non-control point FOBs will no longer spawn. * **[Campaign AI]** Every 30 minutes the AI will plan a CAP, so players can customize their mission better. * **[Campaign AI]** AI now considers Ju-88s for CAS, strike, and DEAD missions. * **[Campaign AI]** Fix purchase of aircraft by priority (the faction's list was being used as the priority list rather than the game's). diff --git a/game/data/building_data.py b/game/data/building_data.py index e6cd4ba9..5688fcb8 100644 --- a/game/data/building_data.py +++ b/game/data/building_data.py @@ -8,7 +8,6 @@ DEFAULT_AVAILABLE_BUILDINGS = [ "oil", "ware", "farp", - "fob", "power", "derrick", ] @@ -21,7 +20,6 @@ WW2_GERMANY_BUILDINGS = [ "ww2bunker", "allycamp", "allycamp", - "fob", ] WW2_ALLIES_BUILDINGS = [ "fuel", @@ -30,7 +28,6 @@ WW2_ALLIES_BUILDINGS = [ "allycamp", "allycamp", "allycamp", - "fob", ] FORTIFICATION_BUILDINGS = [ diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index 5fd5f882..2fbb7c57 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -845,12 +845,7 @@ class FobGroundObjectGenerator(AirbaseGroundObjectGenerator): return True def generate_fob(self) -> None: - try: - category = self.faction.building_set[self.faction.building_set.index("fob")] - except IndexError: - logging.exception("Faction has no fob buildings defined") - return - + category = "fob" obj_name = self.control_point.name template = random.choice(list(self.templates[category].values())) point = self.control_point.position From 11bf0ca868945b5f33416f6c2a40f1c582d9895b Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 19:58:26 -0700 Subject: [PATCH 15/22] Replace JSOW fallbacks with walleyes. The GBU-12 that was chosen doesn't fit on the hornet in the first place, and we ought to replace glide bombs with glide bombs. --- game/data/weapons.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/game/data/weapons.py b/game/data/weapons.py index b7dd530b..7aa21beb 100644 --- a/game/data/weapons.py +++ b/game/data/weapons.py @@ -145,20 +145,26 @@ _WEAPON_FALLBACKS = [ Weapons.LAU_117_with_AGM_65E___Maverick_E__Laser_ASM___Lg_Whd_, ), # internal pylons harrier # AGM-154 JSOW - (Weapons.AGM_154A___JSOW_CEB__CBU_type_, Weapons.GBU_12), + ( + Weapons.AGM_154A___JSOW_CEB__CBU_type_, + Weapons.AGM_62_Walleye_II___Guided_Weapon_Mk_5__TV_Guided_, + ), ( Weapons.BRU_55_with_2_x_AGM_154A___JSOW_CEB__CBU_type_, - Weapons.BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb, + Weapons.AGM_62_Walleye_II___Guided_Weapon_Mk_5__TV_Guided_, ), ( Weapons.BRU_57_with_2_x_AGM_154A___JSOW_CEB__CBU_type_, - None, + Weapons.AGM_62_Walleye_II___Guided_Weapon_Mk_5__TV_Guided_, ), # doesn't exist on any aircraft yet (Weapons.AGM_154B___JSOW_Anti_Armour, Weapons.CBU_105___10_x_SFW__CBU_with_WCMD), - (Weapons.AGM_154C___JSOW_Unitary_BROACH, Weapons.GBU_12), + ( + Weapons.AGM_154C___JSOW_Unitary_BROACH, + Weapons.AGM_62_Walleye_II___Guided_Weapon_Mk_5__TV_Guided_, + ), ( Weapons.BRU_55_with_2_x_AGM_154C___JSOW_Unitary_BROACH, - Weapons.BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb, + Weapons.AGM_62_Walleye_II___Guided_Weapon_Mk_5__TV_Guided_, ), # AGM-45 Shrike (Weapons.AGM_45A_Shrike_ARM, None), From d4c27da892f4fe835be64eeb480b0e6f16b6b64d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 20:12:49 -0700 Subject: [PATCH 16/22] Move the strike eagle down the CAP list. Most of the pylons are not actually capable of carrying air to air missiles. --- gen/flights/ai_flight_planner_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index 32ee279d..730d4722 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -132,7 +132,6 @@ CAP_CAPABLE = [ MiG_29A, F_16C_50, FA_18C_hornet, - F_15E, F_16A, F_4E, JF_17, @@ -140,6 +139,7 @@ CAP_CAPABLE = [ MiG_21Bis, Mirage_2000_5, M_2000C, + F_15E, F_5E_3, MiG_19P, A_4E_C, From f80b948fb1922a1e47a6da3ffa1d8e445a3be4d0 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 21:06:53 -0700 Subject: [PATCH 17/22] Fix loadout downgrading bugs. If the pylon had no weapon this would raise, and if no replacement was found we wouldn't clear the pylon. --- gen/flights/loadouts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen/flights/loadouts.py b/gen/flights/loadouts.py index 2c30954b..c9ae20c4 100644 --- a/gen/flights/loadouts.py +++ b/gen/flights/loadouts.py @@ -35,6 +35,9 @@ class Loadout: new_pylons = dict(self.pylons) for pylon_number, weapon in self.pylons.items(): + if weapon is None: + del new_pylons[pylon_number] + continue if not weapon.available_on(date): pylon = Pylon.for_aircraft(unit_type, pylon_number) for fallback in weapon.fallbacks: @@ -44,6 +47,8 @@ class Loadout: continue new_pylons[pylon_number] = fallback break + else: + del new_pylons[pylon_number] return Loadout(f"{self.name} ({date.year})", new_pylons, date) @classmethod From 6c821039b5f3e0bcb200ed4c4922faa27a46b2f2 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 21:46:20 -0700 Subject: [PATCH 18/22] Add a spectator slot. So I stop accidentally giving orders while testing AI behavior after waiting 20 minutes for them to get to their objective. --- game/operation/operation.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/game/operation/operation.py b/game/operation/operation.py index 3899155a..3ca893e5 100644 --- a/game/operation/operation.py +++ b/game/operation/operation.py @@ -324,13 +324,8 @@ class Operation: # Setup combined arms parameters cls.current_mission.groundControl.pilot_can_control_vehicles = cls.ca_slots > 0 - if cls.game.player_country in [ - country.name - for country in cls.current_mission.coalition["blue"].countries.values() - ]: - cls.current_mission.groundControl.blue_tactical_commander = cls.ca_slots - else: - cls.current_mission.groundControl.red_tactical_commander = cls.ca_slots + cls.current_mission.groundControl.blue_tactical_commander = cls.ca_slots + cls.current_mission.groundControl.blue_observer = 1 # Options forcedoptionsgen = ForcedOptionsGenerator(cls.current_mission, cls.game) From 621e4a513c7311ec35d4dc861420865ece8aec39 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 23:51:39 -0700 Subject: [PATCH 19/22] Fix DEAD flights to use more than just missiles. It doesn't seem like AI pilots are capable of using more than one weapon effectively (see link below), but this at least makes DEAD flights work when the DEAD flight is carrying only one type of weapon and some other flight is performing SEAD. https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/ --- gen/aircraft.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 84c8c020..a83fcd2a 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1251,7 +1251,7 @@ class AircraftConflictGenerator: group, react_on_threat=OptReactOnThreat.Values.EvadeFire, roe=OptROE.Values.OpenFire, - rtb_winchester=OptRTBOnOutOfAmmo.Values.ASM, + rtb_winchester=OptRTBOnOutOfAmmo.Values.All, restrict_jettison=True, ) @@ -1386,9 +1386,6 @@ class AircraftConflictGenerator: flight: Flight, dynamic_runways: Dict[str, RunwayData], ) -> None: - # Escort groups are actually given the CAP task so they can perform the - # Search Then Engage task, which we have to use instead of the Escort - # task for the reasons explained in JoinPointBuilder. group.task = Transport.name self._setup_group(group, package, flight, dynamic_runways) self.configure_behavior( @@ -1737,7 +1734,7 @@ class DeadIngressBuilder(PydcsWaypointBuilder): if isinstance(target_group, TheaterGroundObject): tgroup = self.mission.find_group(target_group.group_name) if tgroup is not None: - task = AttackGroup(tgroup.id, weapon_type=WeaponType.Guided) + task = AttackGroup(tgroup.id, weapon_type=WeaponType.Auto) task.params["expend"] = "All" task.params["attackQtyLimit"] = False task.params["directionEnabled"] = False @@ -1842,12 +1839,11 @@ class StrikeIngressBuilder(PydcsWaypointBuilder): center.y += target.position.y center.x /= len(targets) center.y /= len(targets) - bombing = Bombing(center) + bombing = Bombing(center, weapon_type=WeaponType.Bombs) bombing.params["expend"] = "All" bombing.params["attackQtyLimit"] = False bombing.params["directionEnabled"] = False bombing.params["altitudeEnabled"] = False - bombing.params["weaponType"] = WeaponType.Bombs.value bombing.params["groupAttack"] = True waypoint.tasks.append(bombing) return waypoint @@ -1855,11 +1851,10 @@ class StrikeIngressBuilder(PydcsWaypointBuilder): def build_strike(self) -> MovingPoint: waypoint = super().build() for target in self.waypoint.targets: - bombing = Bombing(target.position) + bombing = Bombing(target.position, weapon_type=WeaponType.Auto) # If there is only one target, drop all ordnance in one pass. if len(self.waypoint.targets) == 1: bombing.params["expend"] = "All" - bombing.params["weaponType"] = WeaponType.Auto.value bombing.params["groupAttack"] = True waypoint.tasks.append(bombing) From a1a4fc8c7cedf898a48eb96aa184daaa5071ae5d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 23:57:52 -0700 Subject: [PATCH 20/22] Update pydcs. --- pydcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydcs b/pydcs index dec648d2..4972988c 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit dec648d27f74c394dd6e85e83cc09e4cd823653d +Subproject commit 4972988c978f2057e7aa06919c4de71ee9a06ea5 From 43010779d41cdff951ec493214ab478bdf2e4f83 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 20 May 2021 23:54:48 -0700 Subject: [PATCH 21/22] Enable multirole fighter targeting for escorts. pydcs didn't support this until now :( --- gen/aircraft.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index a83fcd2a..b170c5c2 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1925,7 +1925,10 @@ class JoinPointBuilder(PydcsWaypointBuilder): EngageTargets( # TODO: From doctrine. max_distance=int(nautical_miles(30).meters), - targets=[Targets.All.Air.Planes.Fighters], + targets=[ + Targets.All.Air.Planes.Fighters, + Targets.All.Air.Planes.MultiroleFighters, + ], ) ) ) From 39b9a7f0ed219a2afe48e5f02a8d15198866a1c0 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 21 May 2021 00:19:06 -0700 Subject: [PATCH 22/22] Note DCS bugs that are common issues. --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ .github/ISSUE_TEMPLATE/feature_request.md | 2 ++ README.md | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6c5955b8..fa261ee8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,6 +9,8 @@ assignees: '' Before filing, please search the issue tracker to see if the issue has already been reported. +If reporting a DCS AI bug, check https://github.com/dcs-liberation/dcs_liberation#dcs-bugs. + **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index ddf2c8f3..4176751f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -9,6 +9,8 @@ assignees: '' Before filing, please search the issue tracker to see if this feature has already been requested. +If requesting a DCS AI feature, check If reporting a DCS AI bug, check https://github.com/dcs-liberation/dcs_liberation#dcs-bugs. + **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] diff --git a/README.md b/README.md index 67f55b18..7c487395 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ Latest release is available here : https://github.com/dcs-liberation/dcs_liberat To download preview builds of the next version of DCS Liberation, see https://github.com/dcs-liberation/dcs_liberation/wiki/Preview-builds. +## DCS bugs + +These DCS bugs prevent us from improving AI behavior. Please upvote them! (But please +_don't_ spam them with comments): + +* [A2A and SEAD escorts don't escort](https://forums.eagle.ru/topic/251798-options-for-alternate-ai-escort-behavior/?tab=comments#comment-4668033) +* [DEAD can't use mixed loadouts effectively](https://forums.eagle.ru/topic/271941-ai-rtbs-after-firing-decoys-despite-full-load-of-bombs/) + ## Bugs and feature requests If you need to report a bug or want to suggest a new feature, you can do this on our [bug tracker](https://github.com/dcs-liberation/dcs_liberation/issues). In either case, please use the search bar at the top of the page to see if it has already been reported. Note that you may need to remove the filter for open bugs if it's something we've recently fixed.