diff --git a/changelog.md b/changelog.md index ad08d52d..5af9dd55 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ -#2.0 RC 7 +# 2.0 RC 7 -##Features/Improvements : +## Features/Improvements : * **[Units/Factions]** Added P-47D-30 for factions allies_1944 * **[Units/Factions]** Added factions : Bluefor Coldwar, Germany 1944 Easy @@ -38,13 +38,11 @@ * **[Map]** Added "Oil derrick" building * **[Map]** Added "ww2 bunker" building (WW2) * **[Map]** Added "ally camp" building (WW2) - -* **[Map]** Added "V1 Launch Site" building (WW2) -* **[Map]** Added "A camp" building (WW2) +* **[Map]** Added "V1 Site" (WW2) * **[Misc]** Made it possible to setup DCS Saved Games directory and DCS installation directory manually at first start -##Fixed issues : +## Fixed issues : * **[Units/Factions]** Replaced S3-B Tanker by KC130 for most factions (More fuel) * **[Units/Factions]** WW2 factions will not have offshore oil station and other modern buildings generated. No more third-reich operated offshore stations will spawn on normandy's coast. @@ -56,19 +54,17 @@ * **[Mission Generator]** Change power station template. (Buildings could end up superposed). * **[Maps/Campaign]** Now using Vasiani airbase instead of Soganlung airport in North Caucasus campaign (More parking slots) - * **[Info Panel]** Message displayed on base capture event stated that the enemy captured an airbase, while it was the player who captured it. - * **[Map View]** Graphical glitch on map when one building of an objective was destroyed, but not the others -#2.0 RC 6 +# 2.0 RC 6 Saves file from RC5 are not compatible with the new version. Sorry :( -##Features/Improvements : +## Features/Improvements : * **[Units/Factions]** Supercarrier support (You have to go to settings to enable it, if you have the supercarrier module) * **[Units/Factions]** Added 'Modern Bluefor' factions, containing all most popular DCS flyable units * **[Units/Factions]** Factions US 2005 / 1990 will now sometimes have Arleigh Burke class ships instead of Perry as carrier escorts @@ -82,7 +78,7 @@ Sorry :( * **[Mission Generator]** Using Late Activation & Trigger in attempt to improve performance & reduce stutter (Previously they were spawned through 'ETA' feature) * **[UX]** : Improved flight selection behaviour in the Mission Planning Window -##Fixed issues : +## Fixed issues : * **[Mission Generator]** Payloads were not correctly assigned in the release version. * **[Mission Generator]** Game generation does not work when "no night mission" settings was selected and the current time was "day" * **[Mission Generator]** Game generation does not work when the player selected faction has no AWACS diff --git a/game/data/building_data.py b/game/data/building_data.py index 9d7d5b65..90d94cb2 100644 --- a/game/data/building_data.py +++ b/game/data/building_data.py @@ -4,7 +4,7 @@ import dcs DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa'] WW2_GERMANY_BUILDINGS = ['fuel', 'factory', 'ww2bunker', 'ww2bunker', 'ww2bunker', 'allycamp', 'allycamp', 'aa'] -WW2_ALLIES_BUILDINGS = ['fuel', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'aa'] +WW2_ALLIES_BUILDINGS = ['fuel', 'factory', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'allycamp', 'aa'] FORTIFICATION_BUILDINGS = ['Siegfried Line', 'Concertina Wire', 'Czech hedgehogs 1', 'Czech hedgehogs 2', 'Dragonteeth 1', 'Dragonteeth 2', 'Dragonteeth 3', 'Dragonteeth 4', 'Dragonteeth 5', diff --git a/game/data/doctrine.py b/game/data/doctrine.py index 6fcc746e..866ae897 100644 --- a/game/data/doctrine.py +++ b/game/data/doctrine.py @@ -88,7 +88,7 @@ WWII_DOCTRINE = { "CAP_PATTERN_LENGTH": (nm_to_meter(8), nm_to_meter(18)), "FRONTLINE_CAP_DISTANCE_FROM_FRONTLINE": (nm_to_meter(1), nm_to_meter(6)), - "CAP_DISTANCE_FROM_CP": (nm_to_meter(5), nm_to_meter(15)), + "CAP_DISTANCE_FROM_CP": (nm_to_meter(0), nm_to_meter(5)), "MAX_NUMBER_OF_INTERCEPTION_GROUP": 3, diff --git a/game/db.py b/game/db.py index 1ecb9b8c..9abfbd6e 100644 --- a/game/db.py +++ b/game/db.py @@ -742,6 +742,13 @@ PLANE_PAYLOAD_OVERRIDES = { F_4E: COMMON_OVERRIDE, P_47D_30:COMMON_OVERRIDE, B_17G: COMMON_OVERRIDE, + P_51D: COMMON_OVERRIDE, + P_51D_30_NA: COMMON_OVERRIDE, + FW_190D9: COMMON_OVERRIDE, + FW_190A8: COMMON_OVERRIDE, + Bf_109K_4: COMMON_OVERRIDE, + SpitfireLFMkIXCW: COMMON_OVERRIDE, + SpitfireLFMkIX: COMMON_OVERRIDE, AH_64D:{ CAS: "AGM-114K*16" diff --git a/game/factions/bluefor_coldwar.py b/game/factions/bluefor_coldwar.py index 85957fe9..cc2361a9 100644 --- a/game/factions/bluefor_coldwar.py +++ b/game/factions/bluefor_coldwar.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * BLUEFOR_COLDWAR = { "country": "USA", @@ -57,5 +57,7 @@ BLUEFOR_COLDWAR = { "LHA-3 Belleau Wood", "LHA-4 Nassau", "LHA-5 Peleliu" + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } diff --git a/game/factions/bluefor_modern.py b/game/factions/bluefor_modern.py index 276d92e1..3d04bb3b 100644 --- a/game/factions/bluefor_modern.py +++ b/game/factions/bluefor_modern.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * BLUEFOR_MODERN = { "country": "USA", @@ -76,5 +76,7 @@ BLUEFOR_MODERN = { "LHA-3 Belleau Wood", "LHA-4 Nassau", "LHA-5 Peleliu" + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" ] } diff --git a/game/factions/china_2000.py b/game/factions/china_2000.py index 9960bb53..f1b4e04f 100644 --- a/game/factions/china_2000.py +++ b/game/factions/china_2000.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * China_2000 = { "country": "China", @@ -59,5 +59,7 @@ China_2000 = { ], "carrier_names": [ "001 Liaoning", "002 Shandong", + ], "boat":[ + "ChineseNavyGroupGenerator", "Type54GroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/france_1995.py b/game/factions/france_1995.py index 4ecf04a7..8ba1e71b 100644 --- a/game/factions/france_1995.py +++ b/game/factions/france_1995.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * France_1995 = { "country": "France", @@ -40,5 +40,7 @@ France_1995 = { ], "shorad": [ AirDefence.HQ_7_Self_Propelled_LN, AirDefence.SAM_Roland_ADS + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/france_2005.py b/game/factions/france_2005.py index b281b83a..2ae2e7fd 100644 --- a/game/factions/france_2005.py +++ b/game/factions/france_2005.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * France_2005 = { "country": "France", @@ -55,5 +55,7 @@ France_2005 = { "L9013 Mistral", "L9014 Tonerre", "L9015 Dixmude" + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/germany_1944.py b/game/factions/germany_1944.py index 65039c9f..df48c434 100644 --- a/game/factions/germany_1944.py +++ b/game/factions/germany_1944.py @@ -1,5 +1,4 @@ from dcs.planes import * -from dcs.ships import Uboat_VIIC_U_flak, Schnellboot_type_S130 from dcs.vehicles import * from game.data.building_data import WW2_GERMANY_BUILDINGS @@ -39,5 +38,8 @@ Germany_1944 = { ], "objects": WW2_GERMANY_BUILDINGS, "doctrine": WWII_DOCTRINE, - "boat": [Uboat_VIIC_U_flak, Schnellboot_type_S130] + "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"], + "boat_count": 4, + "missiles": ["V1GroupGenerator"], + "missiles_count": 1 } \ No newline at end of file diff --git a/game/factions/germany_1944_easy.py b/game/factions/germany_1944_easy.py index 1d1edca0..ca929c13 100644 --- a/game/factions/germany_1944_easy.py +++ b/game/factions/germany_1944_easy.py @@ -1,6 +1,5 @@ from dcs.planes import * from dcs.vehicles import * -from dcs.ships import * from game.data.building_data import WW2_GERMANY_BUILDINGS from game.data.doctrine import WWII_DOCTRINE @@ -32,5 +31,8 @@ Germany_1944_Easy = { ], "objects": WW2_GERMANY_BUILDINGS, "doctrine": WWII_DOCTRINE, - "boat": [Uboat_VIIC_U_flak, Schnellboot_type_S130] + "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"], + "boat_count": 4, + "missiles": ["V1GroupGenerator"], + "missiles_count": 1 } \ No newline at end of file diff --git a/game/factions/germany_1990.py b/game/factions/germany_1990.py index d8c03a53..ae1f0668 100644 --- a/game/factions/germany_1990.py +++ b/game/factions/germany_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Germany_1990 = { "country": "Germany", @@ -39,5 +39,7 @@ Germany_1990 = { "shorad":[ AirDefence.SPAAA_Gepard, AirDefence.SAM_Roland_ADS, + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/india_2010.py b/game/factions/india_2010.py index 6f14ae04..47a1d5b2 100644 --- a/game/factions/india_2010.py +++ b/game/factions/india_2010.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * India_2010 = { "country": "India", @@ -49,5 +49,7 @@ India_2010 = { FSG_1241_1MP_Molniya, ], "carrier_names": [ "INS Vikramaditya" + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/iran_2015.py b/game/factions/iran_2015.py index b0ae4743..56751a2c 100644 --- a/game/factions/iran_2015.py +++ b/game/factions/iran_2015.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Iran_2015 = { "country": "Iran", @@ -52,5 +52,7 @@ Iran_2015 = { "shorad":[ AirDefence.HQ_7_Self_Propelled_LN, AirDefence.AAA_ZU_23_Insurgent_Closed + ], "boat":[ + "GrishaGroupGenerator", "MolniyaGroupGenerator", "KiloSubGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/israel_2000.py b/game/factions/israel_2000.py index 25557a2c..f135432e 100644 --- a/game/factions/israel_2000.py +++ b/game/factions/israel_2000.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Israel_2000 = { "country": "Israel", @@ -31,7 +31,9 @@ Israel_2000 = { LHA_1_Tarawa, Armed_speedboat, ], - "shorad":[ + "shorad": [ AirDefence.SAM_Avenger_M1097 + ], "boat": [ + "ArleighBurkeGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/italy_1990.py b/game/factions/italy_1990.py index ad9a9bc5..594baa9e 100644 --- a/game/factions/italy_1990.py +++ b/game/factions/italy_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Italy_1990 = { "country": "Italy", @@ -42,5 +42,7 @@ Italy_1990 = { ], "lha_names": [ "Giuseppe Garibaldi", "Cavour", + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } diff --git a/game/factions/libya_2011.py b/game/factions/libya_2011.py index 2e3ba882..b84a83fd 100644 --- a/game/factions/libya_2011.py +++ b/game/factions/libya_2011.py @@ -1,7 +1,6 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.vehicles import * Lybia_2011 = { "country": "Russia", @@ -44,5 +43,7 @@ Lybia_2011 = { "shorad":[ AirDefence.HQ_7_Self_Propelled_LN, AirDefence.SAM_SA_8_Osa_9A33, + ], "boat": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/netherlands_1990.py b/game/factions/netherlands_1990.py index f5beb204..2ef42ba0 100644 --- a/game/factions/netherlands_1990.py +++ b/game/factions/netherlands_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Netherlands_1990 = { "country": "The Netherlands", @@ -30,7 +30,9 @@ Netherlands_1990 = { LHA_1_Tarawa, Armed_speedboat, ], - "shorad":[ + "shorad": [ AirDefence.SAM_Avenger_M1097 + ], "boat": [ + "OliverHazardPerryGroupGenerator" ] -} \ No newline at end of file +} diff --git a/game/factions/north_korea_2000.py b/game/factions/north_korea_2000.py index b920e0e1..dd588f92 100644 --- a/game/factions/north_korea_2000.py +++ b/game/factions/north_korea_2000.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * NorthKorea_2000 = { "country": "North Korea", @@ -46,5 +46,8 @@ NorthKorea_2000 = { "shorad":[ AirDefence.AAA_ZU_23_Emplacement, AirDefence.SPAAA_ZSU_23_4_Shilka + ], + "boat": [ + "GrishaGroupGenerator", "MolniyaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/pakistan_2015.py b/game/factions/pakistan_2015.py index 5e8fa737..549deebd 100644 --- a/game/factions/pakistan_2015.py +++ b/game/factions/pakistan_2015.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Pakistan_2015 = { "country": "Pakistan", @@ -34,5 +34,7 @@ Pakistan_2015 = { AirDefence.HQ_7_Self_Propelled_LN, AirDefence.AAA_ZU_23_Insurgent_on_Ural_375, AirDefence.AAA_ZU_23_Closed + ], "boat": [ + "Type54GroupGenerator", "OliverHazardPerryGroupGenerator" ] } diff --git a/game/factions/russia_1965.py b/game/factions/russia_1965.py index 23abf086..bc5762c6 100644 --- a/game/factions/russia_1965.py +++ b/game/factions/russia_1965.py @@ -49,5 +49,7 @@ Russia_1965 = { ], "shorad":[ AirDefence.AAA_ZU_23_Closed + ], "boat": [ + "GrishaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/russia_1975.py b/game/factions/russia_1975.py index 6633539d..db6a50ae 100644 --- a/game/factions/russia_1975.py +++ b/game/factions/russia_1975.py @@ -65,5 +65,7 @@ Russia_1975 = { FF_1135M_Rezky, ], "cruiser": [ CGN_1144_2_Pyotr_Velikiy, + ], "boat": [ + "RussianNavyGroupGenerator", "KiloSubGroupGenerator", "MolniyaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/russia_1990.py b/game/factions/russia_1990.py index 4de94ec1..2884ad3d 100644 --- a/game/factions/russia_1990.py +++ b/game/factions/russia_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Russia_1990 = { "country": "Russia", @@ -64,5 +64,7 @@ Russia_1990 = { FF_1135M_Rezky, ], "cruiser": [ FSG_1241_1MP_Molniya, + ], "boat":[ + "RussianNavyGroupGenerator", "KiloSubGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/russia_2010.py b/game/factions/russia_2010.py index 3c6aa11f..28745b9a 100644 --- a/game/factions/russia_2010.py +++ b/game/factions/russia_2010.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Russia_2010 = { "country": "Russia", @@ -63,5 +63,7 @@ Russia_2010 = { FF_1135M_Rezky, ], "cruiser": [ FSG_1241_1MP_Molniya, + ], "boat": [ + "RussianNavyGroupGenerator", "KiloSubGroupGenerator" ] } diff --git a/game/factions/spain_1990.py b/game/factions/spain_1990.py index 679e077c..b46e3dd1 100644 --- a/game/factions/spain_1990.py +++ b/game/factions/spain_1990.py @@ -1,6 +1,6 @@ -from dcs.vehicles import * -from dcs.ships import * from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Spain_1990 = { "country": "Spain", @@ -44,5 +44,7 @@ Spain_1990 = { "Principe de Asturias", ], "lhanames": [ "Juan Carlos I", + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/sweden_1990.py b/game/factions/sweden_1990.py index 4a1c711a..8df60107 100644 --- a/game/factions/sweden_1990.py +++ b/game/factions/sweden_1990.py @@ -25,7 +25,7 @@ Sweden_1990 = { Dry_cargo_ship_Ivanov, Tanker_Elnya_160, ], - "shorad":[ + "shorad": [ AirDefence.SAM_Avenger_M1097 ] } \ No newline at end of file diff --git a/game/factions/turkey_2005.py b/game/factions/turkey_2005.py index 5d8f33cc..38176ea8 100644 --- a/game/factions/turkey_2005.py +++ b/game/factions/turkey_2005.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Turkey_2005 = { "country": "Turkey", @@ -36,5 +36,7 @@ Turkey_2005 = { ], "shorad":[ AirDefence.AAA_ZU_23_Emplacement, AirDefence.SPAAA_ZSU_23_4_Shilka + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/uae_2005.py b/game/factions/uae_2005.py index 315eabb6..a4152fa9 100644 --- a/game/factions/uae_2005.py +++ b/game/factions/uae_2005.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * UAE_2005 = { "country": "United Arab Emirates", @@ -30,5 +30,7 @@ UAE_2005 = { CVN_74_John_C__Stennis, LHA_1_Tarawa, Armed_speedboat, + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/uk_1990.py b/game/factions/uk_1990.py index be427ee7..9e9702eb 100644 --- a/game/factions/uk_1990.py +++ b/game/factions/uk_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * UnitedKingdom_1990 = { "country": "UK", @@ -46,5 +46,7 @@ UnitedKingdom_1990 = { "HMS Invincible", "HMS Illustrious", "HMS Ark Royal", + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/ukraine_2010.py b/game/factions/ukraine_2010.py index f5650fa7..cd5149b6 100644 --- a/game/factions/ukraine_2010.py +++ b/game/factions/ukraine_2010.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * Ukraine_2010 = { "country": "Ukraine", @@ -47,5 +47,7 @@ Ukraine_2010 = { AirDefence.SAM_SA_19_Tunguska_2S6, AirDefence.SAM_SA_13_Strela_10M3_9A35M3, AirDefence.AAA_ZU_23_on_Ural_375 + ], "boat":[ + "GrishaGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/usa_1944.py b/game/factions/usa_1944.py index a59487e9..385d6c7d 100644 --- a/game/factions/usa_1944.py +++ b/game/factions/usa_1944.py @@ -43,5 +43,6 @@ USA_1944 = { ], "objects": WW2_ALLIES_BUILDINGS, "doctrine": WWII_DOCTRINE, - "boat": [LS_Samuel_Chase] + "boat": ["WW2LSTGroupGenerator"], + "boat_count": 2 } \ No newline at end of file diff --git a/game/factions/usa_1965.py b/game/factions/usa_1965.py index a3647f51..74b12fe3 100644 --- a/game/factions/usa_1965.py +++ b/game/factions/usa_1965.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * USA_1965 = { "country": "USA", @@ -36,5 +36,7 @@ USA_1965 = { "shorad":[ AirDefence.AAA_Vulcan_M163, AirDefence.SAM_Chaparral_M48 + ], "boat":[ + "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/usa_1990.py b/game/factions/usa_1990.py index eeee5bc7..b0383148 100644 --- a/game/factions/usa_1990.py +++ b/game/factions/usa_1990.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * USA_1990 = { "country": "USA", @@ -59,5 +59,7 @@ USA_1990 = { "LHA-3 Belleau Wood", "LHA-4 Nassau", "LHA-5 Peleliu" + ], "boat":[ + "ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator" ] } \ No newline at end of file diff --git a/game/factions/usa_2005.py b/game/factions/usa_2005.py index cda1ddb2..2e9475ae 100644 --- a/game/factions/usa_2005.py +++ b/game/factions/usa_2005.py @@ -1,7 +1,7 @@ -from dcs.vehicles import * -from dcs.ships import * -from dcs.planes import * from dcs.helicopters import * +from dcs.planes import * +from dcs.ships import * +from dcs.vehicles import * USA_2005 = { "country": "USA", @@ -51,7 +51,6 @@ USA_2005 = { ], "helicopter_carrier": [ LHA_1_Tarawa, ], "destroyer": [ - Oliver_Hazzard_Perry_class, USS_Arleigh_Burke_IIa, ], "cruiser": [ Ticonderoga_class, @@ -66,5 +65,7 @@ USA_2005 = { "LHA-3 Belleau Wood", "LHA-4 Nassau", "LHA-5 Peleliu" + ], "boat":[ + "ArleighBurkeGroupGenerator" ] } diff --git a/gen/fleet/cn_dd_group.py b/gen/fleet/cn_dd_group.py new file mode 100644 index 00000000..49125525 --- /dev/null +++ b/gen/fleet/cn_dd_group.py @@ -0,0 +1,42 @@ +import random + +from gen.fleet.dd_group import DDGroupGenerator +from gen.sam.group_generator import GroupGenerator +from dcs.ships import * + + +class ChineseNavyGroupGenerator(GroupGenerator): + + def __init__(self, game, ground_object, faction): + super(ChineseNavyGroupGenerator, self).__init__(game, ground_object) + self.faction = faction + + def generate(self): + + include_frigate = random.choice([True, True, False]) + include_dd = random.choice([True, False]) + + if include_dd: + include_cc = random.choice([True, False]) + else: + include_cc = False + + if include_frigate: + self.add_unit(Type_054A_Frigate, "FF1", self.position.x + 1200, self.position.y + 900, self.heading) + self.add_unit(Type_054A_Frigate, "FF2", self.position.x + 1200, self.position.y - 900, self.heading) + + if include_dd: + dd_type = random.choice([Type_052C_Destroyer, Type_052B_Destroyer]) + self.add_unit(dd_type, "FF1", self.position.x + 2400, self.position.y + 900, self.heading) + self.add_unit(dd_type, "FF2", self.position.x + 2400, self.position.y - 900, self.heading) + + if include_cc: + cc_type = random.choice([Type_093, CGN_1144_2_Pyotr_Velikiy]) + self.add_unit(cc_type, "CC1", self.position.x, self.position.y, self.heading) + + self.get_generated_group().points[0].speed = 20 + + +class Type54GroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(Type54GroupGenerator, self).__init__(game, ground_object, faction, Type_054A_Frigate) diff --git a/gen/fleet/dd_group.py b/gen/fleet/dd_group.py new file mode 100644 index 00000000..7c02a64b --- /dev/null +++ b/gen/fleet/dd_group.py @@ -0,0 +1,27 @@ +import random + +from gen.sam.group_generator import GroupGenerator +from dcs.ships import * + + +class DDGroupGenerator(GroupGenerator): + + def __init__(self, game, ground_object, faction, ddtype): + super(DDGroupGenerator, self).__init__(game, ground_object) + self.faction = faction + self.ddtype = ddtype + + def generate(self): + self.add_unit(self.ddtype, "DD1", self.position.x + 500, self.position.y + 900, self.heading) + self.add_unit(self.ddtype, "DD2", self.position.x + 500, self.position.y - 900, self.heading) + self.get_generated_group().points[0].speed = 20 + + +class OliverHazardPerryGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(OliverHazardPerryGroupGenerator, self).__init__(game, ground_object, faction, Oliver_Hazzard_Perry_class) + + +class ArleighBurkeGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(ArleighBurkeGroupGenerator, self).__init__(game, ground_object, faction, USS_Arleigh_Burke_IIa) diff --git a/gen/fleet/ru_dd_group.py b/gen/fleet/ru_dd_group.py new file mode 100644 index 00000000..0ac62686 --- /dev/null +++ b/gen/fleet/ru_dd_group.py @@ -0,0 +1,59 @@ +import random + +from gen.fleet.dd_group import DDGroupGenerator +from gen.sam.group_generator import GroupGenerator +from dcs.ships import * + + +class RussianNavyGroupGenerator(GroupGenerator): + + def __init__(self, game, ground_object, faction): + super(RussianNavyGroupGenerator, self).__init__(game, ground_object) + self.faction = faction + + def generate(self): + + include_frigate = random.choice([True, True, False]) + include_dd = random.choice([True, False]) + + if include_dd: + include_cc = random.choice([True, False]) + else: + include_cc = False + + if include_frigate: + frigate_type = random.choice([FFL_1124_4_Grisha, FSG_1241_1MP_Molniya]) + self.add_unit(frigate_type, "FF1", self.position.x + 1200, self.position.y + 900, self.heading) + self.add_unit(frigate_type, "FF2", self.position.x + 1200, self.position.y - 900, self.heading) + + if include_dd: + dd_type = random.choice([FFG_11540_Neustrashimy, FF_1135M_Rezky]) + self.add_unit(dd_type, "FF1", self.position.x + 2400, self.position.y + 900, self.heading) + self.add_unit(dd_type, "FF2", self.position.x + 2400, self.position.y - 900, self.heading) + + if include_cc: + cc_type = random.choice([CG_1164_Moskva, CGN_1144_2_Pyotr_Velikiy]) + self.add_unit(cc_type, "CC1", self.position.x, self.position.y, self.heading) + + self.get_generated_group().points[0].speed = 20 + + +class GrishaGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(GrishaGroupGenerator, self).__init__(game, ground_object, faction, FFL_1124_4_Grisha) + + +class MolniyaGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(MolniyaGroupGenerator, self).__init__(game, ground_object, faction, MolniyaGroupGenerator) + + +class KiloSubGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(KiloSubGroupGenerator, self).__init__(game, ground_object, faction, SSK_877) + + +class TangoSubGroupGenerator(DDGroupGenerator): + def __init__(self, game, ground_object, faction): + super(TangoSubGroupGenerator, self).__init__(game, ground_object, faction, SSK_641B) + diff --git a/gen/fleet/ship_group_generator.py b/gen/fleet/ship_group_generator.py index 114312b6..455d9f27 100644 --- a/gen/fleet/ship_group_generator.py +++ b/gen/fleet/ship_group_generator.py @@ -1,18 +1,30 @@ +import logging import random from game import db from gen.fleet.carrier_group import CarrierGroupGenerator +from gen.fleet.cn_dd_group import ChineseNavyGroupGenerator, Type54GroupGenerator +from gen.fleet.dd_group import ArleighBurkeGroupGenerator, OliverHazardPerryGroupGenerator from gen.fleet.lha_group import LHAGroupGenerator -from dcs.ships import * - +from gen.fleet.ru_dd_group import RussianNavyGroupGenerator, GrishaGroupGenerator, MolniyaGroupGenerator, \ + KiloSubGroupGenerator, TangoSubGroupGenerator from gen.fleet.schnellboot import SchnellbootGroupGenerator from gen.fleet.uboat import UBoatGroupGenerator from gen.fleet.ww2lst import WW2LSTGroupGenerator SHIP_MAP = { - Schnellboot_type_S130: SchnellbootGroupGenerator, - LS_Samuel_Chase: WW2LSTGroupGenerator, - Uboat_VIIC_U_flak: UBoatGroupGenerator + "SchnellbootGroupGenerator": SchnellbootGroupGenerator, + "WW2LSTGroupGenerator": WW2LSTGroupGenerator, + "UBoatGroupGenerator": UBoatGroupGenerator, + "OliverHazardPerryGroupGenerator": OliverHazardPerryGroupGenerator, + "ArleighBurkeGroupGenerator": ArleighBurkeGroupGenerator, + "RussianNavyGroupGenerator": RussianNavyGroupGenerator, + "ChineseNavyGroupGenerator": ChineseNavyGroupGenerator, + "GrishaGroupGenerator": GrishaGroupGenerator, + "MolniyaGroupGenerator": MolniyaGroupGenerator, + "KiloSubGroupGenerator": KiloSubGroupGenerator, + "TangoSubGroupGenerator": TangoSubGroupGenerator, + "Type54GroupGenerator": Type54GroupGenerator } @@ -23,12 +35,15 @@ def generate_ship_group(game, ground_object, faction:str): """ faction = db.FACTIONS[faction] if "boat" in faction.keys(): - ships = faction["boat"] - if len(ships) > 0: - sam = random.choice(ships) - generator = SHIP_MAP[sam](game, ground_object, faction) - generator.generate() - return generator.get_generated_group() + generators = faction["boat"] + if len(generators) > 0: + gen = random.choice(generators) + if gen in SHIP_MAP.keys(): + generator = SHIP_MAP[gen](game, ground_object, faction) + generator.generate() + return generator.get_generated_group() + else: + logging.info("Unable to generate ship group, generator : " + str(gen) + "does not exists") return None diff --git a/gen/fleet/ww2lst.py b/gen/fleet/ww2lst.py index ce421a97..412ee45f 100644 --- a/gen/fleet/ww2lst.py +++ b/gen/fleet/ww2lst.py @@ -17,6 +17,6 @@ class WW2LSTGroupGenerator(GroupGenerator): self.add_unit(LS_Samuel_Chase, "SamuelChase", self.position.x, self.position.y, self.heading) for i in range(random.randint(2, 4)): - self.add_unit(LST_Mk_II, "LST" + str(i), self.position.x + i * random.randint(400, 600), self.position.y, self.heading) + self.add_unit(LST_Mk_II, "LST" + str(i), self.position.x + i * random.randint(800, 1200), self.position.y, self.heading) self.get_generated_group().points[0].speed = 20 \ No newline at end of file diff --git a/gen/flights/ai_flight_planner.py b/gen/flights/ai_flight_planner.py index 18980fe4..a34204cd 100644 --- a/gen/flights/ai_flight_planner.py +++ b/gen/flights/ai_flight_planner.py @@ -11,7 +11,7 @@ from gen.flights.ai_flight_planner_db import INTERCEPT_CAPABLE, CAP_CAPABLE, CAS from gen.flights.flight import Flight, FlightType, FlightWaypoint, FlightWaypointType -MISSION_DURATION = 120 +MISSION_DURATION = 80 class FlightPlanner: @@ -490,7 +490,14 @@ class FlightPlanner: ingress, heading, distance = Conflict.frontline_vector(ally_cp, enemy_cp, self.game.theater) center = ingress.point_from_heading(heading, distance / 2) orbit_center = center.point_from_heading(heading - 90, random.randint(nm_to_meter(6), nm_to_meter(15))) - radius = distance * 2 + + combat_width = distance / 2 + if combat_width > 500000: + combat_width = 500000 + if combat_width < 35000: + combat_width = 35000 + + radius = combat_width*1.25 orbit0p = orbit_center.point_from_heading(heading, radius) orbit1p = orbit_center.point_from_heading(heading + 180, radius) diff --git a/gen/missiles/missiles_group_generator.py b/gen/missiles/missiles_group_generator.py new file mode 100644 index 00000000..c63fcca9 --- /dev/null +++ b/gen/missiles/missiles_group_generator.py @@ -0,0 +1,27 @@ +import logging +import random +from game import db +from gen.missiles.v1_group import V1GroupGenerator + +MISSILES_MAP = { + "V1GroupGenerator": V1GroupGenerator, +} + + +def generate_missile_group(game, ground_object, faction:str): + """ + This generate a ship group + :return: Nothing, but put the group reference inside the ground object + """ + faction = db.FACTIONS[faction] + if "missiles" in faction.keys(): + generators = faction["missiles"] + if len(generators) > 0: + gen = random.choice(generators) + if gen in MISSILES_MAP.keys(): + generator = MISSILES_MAP[gen](game, ground_object, faction) + generator.generate() + return generator.get_generated_group() + else: + logging.info("Unable to generate missile group, generator : " + str(gen) + "does not exists") + return None \ No newline at end of file diff --git a/gen/missiles/v1_group.py b/gen/missiles/v1_group.py new file mode 100644 index 00000000..a099da08 --- /dev/null +++ b/gen/missiles/v1_group.py @@ -0,0 +1,32 @@ +import random + +from dcs.vehicles import Unarmed, MissilesSS, AirDefence + +from gen.sam.group_generator import GroupGenerator + + +class V1GroupGenerator(GroupGenerator): + + def __init__(self, game, ground_object, faction): + super(V1GroupGenerator, self).__init__(game, ground_object) + self.faction = faction + + def generate(self): + + # Ramps + self.add_unit(MissilesSS.V_1_ramp, "V1#0", self.position.x, self.position.y + random.randint(1, 8), self.heading) + self.add_unit(MissilesSS.V_1_ramp, "V1#1", self.position.x + 50, self.position.y + random.randint(1, 8), self.heading) + self.add_unit(MissilesSS.V_1_ramp, "V1#2", self.position.x + 100, self.position.y + random.randint(1, 8), self.heading) + + # Commander + self.add_unit(Unarmed.Kübelwagen_82, "Kubel#0", self.position.x - 35, self.position.y - 20, + self.heading) + + # Self defense flak + flak_unit = random.choice([AirDefence.AAA_Flak_Vierling_38, AirDefence.AAA_Flak_38]) + + self.add_unit(flak_unit, "FLAK#0", self.position.x - 55, self.position.y - 38, + self.heading) + + self.add_unit(Unarmed.Blitz_3_6_6700A, "Blitz#0", + self.position.x + 200, self.position.y + 15, 90) \ No newline at end of file diff --git a/gen/naming.py b/gen/naming.py index fb5a1814..0b543e0c 100644 --- a/gen/naming.py +++ b/gen/naming.py @@ -32,7 +32,10 @@ class NameGenerator: "TERMITE", "URCHIN", "SHRIMP", "TURKEY", "TOUCAN", "TETRA", "HUSKY", "STARFISH", "SWAN", "FROG", "SQUIRREL", "WALRUS", "WARTHOG", "CORGI", "WEASEL", "WOMBAT", "WOLVERINE", "MAMMOTH", "TOAD", "WOLF", "ZEBU", "SEAL", "SKATE", "JELLYFISH", "MOSQUITO", "LOCUST", "SLUG", "SNAIL", - "HEDGEHOG", "PIGLET", "FENNEC", "BADGER", "ALPACA" + "HEDGEHOG", "PIGLET", "FENNEC", "BADGER", "ALPACA", "DINGO", "COLT", "SKUNK", "BUNNY", "IMPALA", + "GUANACO", "CAPYBARA", "ELK", "MINK", "PRONGHORN", "CROW", "BUMBLEBEE", "FAWN", "OTTER", "WATERBUCK", + "JERBOA", "KITTEN", "ARGALI", "OX", "MARE", "FINCH", "BASILISK", "GOPHER", "HAMSTER", "CANARY", "WOODCHUCK", + "ANACONDA" ] def __init__(self): diff --git a/gen/sam/aaa_flak.py b/gen/sam/aaa_flak.py index 54ee600a..bd988910 100644 --- a/gen/sam/aaa_flak.py +++ b/gen/sam/aaa_flak.py @@ -31,9 +31,23 @@ class FlakGenerator(GroupGenerator): if(mixed): unit_type = random.choice(GFLAK) - # Enough Opel Blitz truck to transport the guns - for i in range(grid_x): - for j in range(grid_y): + # Search lights + search_pos = self.get_circular_position(random.randint(2,5), 90) + for index, pos in enumerate(search_pos): + self.add_unit(AirDefence.Flak_Searchlight_37, "SearchLight#" + str(index), pos[0], pos[1], self.heading) + + # Support + self.add_unit(AirDefence.Maschinensatz_33, "MC33#", self.position.x-20, self.position.y-20, self.heading) + self.add_unit(AirDefence.AAA_Kdo_G_40, "KDO#", self.position.x - 25, self.position.y - 20, + self.heading) + + # Commander + self.add_unit(Unarmed.Kübelwagen_82, "Kubel#", self.position.x - 35, self.position.y - 20, + self.heading) + + # Some Opel Blitz trucks + for i in range(int(max(1,grid_x/2))): + for j in range(int(max(1,grid_x/2))): self.add_unit(Unarmed.Blitz_3_6_6700A, "AAA#" + str(index), self.position.x + 200 + 15*i + random.randint(1,5), self.position.y + 15*j + random.randint(1,5), 90) \ No newline at end of file diff --git a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointItem.py b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointItem.py index 164b2966..d3c596b1 100644 --- a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointItem.py +++ b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointItem.py @@ -10,6 +10,6 @@ class QWaypointItem(QStandardItem): def __init__(self, point: FlightWaypoint, number): super(QWaypointItem, self).__init__() self.number = number - self.setText("%02d" % self.number + ' | ' + '{:<16}'.format(point.pretty_name)) + self.setText('{:<16}'.format(point.pretty_name)) self.setEditable(False) diff --git a/theater/start_generator.py b/theater/start_generator.py index 5834a986..63587e9d 100644 --- a/theater/start_generator.py +++ b/theater/start_generator.py @@ -8,6 +8,7 @@ from game.data.building_data import DEFAULT_AVAILABLE_BUILDINGS from gen import namegen from gen.defenses.armor_group_generator import generate_armor_group from gen.fleet.ship_group_generator import generate_carrier_group, generate_lha_group, generate_ship_group +from gen.missiles.missiles_group_generator import generate_missile_group from gen.sam.sam_group_generator import generate_anti_air_group, generate_shorad_group from theater import ControlPointType from theater.base import * @@ -68,9 +69,9 @@ def generate_groundobjects(theater: ConflictTheater, game): # CP if cp.captured: - faction = game.player_name + faction_name = game.player_name else: - faction = game.enemy_name + faction_name = game.enemy_name if cp.cptype == ControlPointType.AIRCRAFT_CARRIER_GROUP: # Create ground object group @@ -85,14 +86,14 @@ def generate_groundobjects(theater: ConflictTheater, game): g.obj_name = namegen.random_objective_name() g.heading = 0 g.position = Point(cp.position.x, cp.position.y) - group = generate_carrier_group(faction, game, g) + group = generate_carrier_group(faction_name, game, g) g.groups = [] if group is not None: g.groups.append(group) cp.ground_objects.append(g) # Set new name : - if "carrier_names" in db.FACTIONS[faction]: - cp.name = random.choice(db.FACTIONS[faction]["carrier_names"]) + if "carrier_names" in db.FACTIONS[faction_name]: + cp.name = random.choice(db.FACTIONS[faction_name]["carrier_names"]) elif cp.cptype == ControlPointType.LHA_GROUP: # Create ground object group group_id = group_id + 1 @@ -106,14 +107,14 @@ def generate_groundobjects(theater: ConflictTheater, game): g.obj_name = namegen.random_objective_name() g.heading = 0 g.position = Point(cp.position.x, cp.position.y) - group = generate_lha_group(faction, game, g) + group = generate_lha_group(faction_name, game, g) g.groups = [] if group is not None: g.groups.append(group) cp.ground_objects.append(g) # Set new name : - if "lhanames" in db.FACTIONS[faction]: - cp.name = random.choice(db.FACTIONS[faction]["lhanames"]) + if "lhanames" in db.FACTIONS[faction_name]: + cp.name = random.choice(db.FACTIONS[faction_name]["lhanames"]) else: for i in range(random.randint(3,6)): @@ -139,7 +140,7 @@ def generate_groundobjects(theater: ConflictTheater, game): g.heading = 0 g.position = Point(point.x, point.y) - generate_airbase_defense_group(i, g, faction, game, cp) + generate_airbase_defense_group(i, g, faction_name, game, cp) cp.ground_objects.append(g) print("---------------------------") @@ -147,34 +148,72 @@ def generate_groundobjects(theater: ConflictTheater, game): for ground_object in cp.ground_objects: print(ground_object.groups) - for i in range(random.randint(2, 3)): + if "boat" in db.FACTIONS[faction_name].keys(): - print("GENERATE SHIPS") - point = find_location(False, cp.position, theater, 5000, 40000, [], False) - print(point) + boat_count = 1 + if "boat_count" in db.FACTIONS[faction_name].keys(): + boat_count = int(db.FACTIONS[faction_name]["boat_count"]) - if point is None: - print("Couldn't find point for {} ships".format(cp)) - continue + for i in range(boat_count): - group_id = group_id + 1 + point = find_location(False, cp.position, theater, 5000, 40000, [], False) - g = TheaterGroundObject("aa") - g.group_id = group_id - g.object_id = 0 - g.cp_id = cp.id - g.airbase_group = False - g.dcs_identifier = "AA" - g.sea_object = True - g.obj_name = namegen.random_objective_name() - g.heading = 0 - g.position = Point(point.x, point.y) + if point is None: + print("Couldn't find point for {} ships".format(cp)) + continue + + group_id = group_id + 1 + + g = TheaterGroundObject("aa") + g.group_id = group_id + g.object_id = 0 + g.cp_id = cp.id + g.airbase_group = False + g.dcs_identifier = "AA" + g.sea_object = True + g.obj_name = namegen.random_objective_name() + g.heading = 0 + g.position = Point(point.x, point.y) + + group = generate_ship_group(game, g, faction_name) + g.groups = [] + if group is not None: + g.groups.append(group) + cp.ground_objects.append(g) + + if "missiles" in db.FACTIONS[faction_name].keys(): + + missiles_count = 1 + if "missiles_count" in db.FACTIONS[faction_name].keys(): + missiles_count = int(db.FACTIONS[faction_name]["missiles_count"]) + + for i in range(missiles_count): + + point = find_location(True, cp.position, theater, 2500, 40000, [], False) + + if point is None: + print("Couldn't find point for {} missiles".format(cp)) + continue + + group_id = group_id + 1 + + g = TheaterGroundObject("aa") + g.group_id = group_id + g.object_id = 0 + g.cp_id = cp.id + g.airbase_group = False + g.dcs_identifier = "AA" + g.sea_object = False + g.obj_name = namegen.random_objective_name() + g.heading = 0 + g.position = Point(point.x, point.y) + + group = generate_missile_group(game, g, faction_name) + g.groups = [] + if group is not None: + g.groups.append(group) + cp.ground_objects.append(g) - group = generate_ship_group(game, g, faction) - g.groups = [] - if group is not None: - g.groups.append(group) - cp.ground_objects.append(g) def generate_airbase_defense_group(airbase_defense_group_id, ground_obj:TheaterGroundObject, faction, game, cp):