Generate fleet and missiles sites

This commit is contained in:
Khopa 2020-06-17 13:04:55 +02:00
parent 826935eb7d
commit 5192306b06
46 changed files with 469 additions and 145 deletions

View File

@ -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 P-47D-30 for factions allies_1944
* **[Units/Factions]** Added factions : Bluefor Coldwar, Germany 1944 Easy * **[Units/Factions]** Added factions : Bluefor Coldwar, Germany 1944 Easy
@ -38,13 +38,11 @@
* **[Map]** Added "Oil derrick" building * **[Map]** Added "Oil derrick" building
* **[Map]** Added "ww2 bunker" building (WW2) * **[Map]** Added "ww2 bunker" building (WW2)
* **[Map]** Added "ally camp" building (WW2) * **[Map]** Added "ally camp" building (WW2)
* **[Map]** Added "V1 Site" (WW2)
* **[Map]** Added "V1 Launch Site" building (WW2)
* **[Map]** Added "A camp" building (WW2)
* **[Misc]** Made it possible to setup DCS Saved Games directory and DCS installation directory manually at first start * **[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]** 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. * **[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). * **[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) * **[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. * **[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 * **[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. Saves file from RC5 are not compatible with the new version.
Sorry :( 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]** 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]** 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 * **[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) * **[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 * **[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]** 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 "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 * **[Mission Generator]** Game generation does not work when the player selected faction has no AWACS

View File

@ -4,7 +4,7 @@ import dcs
DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa'] 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_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', FORTIFICATION_BUILDINGS = ['Siegfried Line', 'Concertina Wire', 'Czech hedgehogs 1', 'Czech hedgehogs 2',
'Dragonteeth 1', 'Dragonteeth 2', 'Dragonteeth 3', 'Dragonteeth 4', 'Dragonteeth 5', 'Dragonteeth 1', 'Dragonteeth 2', 'Dragonteeth 3', 'Dragonteeth 4', 'Dragonteeth 5',

View File

@ -88,7 +88,7 @@ WWII_DOCTRINE = {
"CAP_PATTERN_LENGTH": (nm_to_meter(8), nm_to_meter(18)), "CAP_PATTERN_LENGTH": (nm_to_meter(8), nm_to_meter(18)),
"FRONTLINE_CAP_DISTANCE_FROM_FRONTLINE": (nm_to_meter(1), nm_to_meter(6)), "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, "MAX_NUMBER_OF_INTERCEPTION_GROUP": 3,

View File

@ -742,6 +742,13 @@ PLANE_PAYLOAD_OVERRIDES = {
F_4E: COMMON_OVERRIDE, F_4E: COMMON_OVERRIDE,
P_47D_30:COMMON_OVERRIDE, P_47D_30:COMMON_OVERRIDE,
B_17G: 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:{ AH_64D:{
CAS: "AGM-114K*16" CAS: "AGM-114K*16"

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
BLUEFOR_COLDWAR = { BLUEFOR_COLDWAR = {
"country": "USA", "country": "USA",
@ -57,5 +57,7 @@ BLUEFOR_COLDWAR = {
"LHA-3 Belleau Wood", "LHA-3 Belleau Wood",
"LHA-4 Nassau", "LHA-4 Nassau",
"LHA-5 Peleliu" "LHA-5 Peleliu"
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
BLUEFOR_MODERN = { BLUEFOR_MODERN = {
"country": "USA", "country": "USA",
@ -76,5 +76,7 @@ BLUEFOR_MODERN = {
"LHA-3 Belleau Wood", "LHA-3 Belleau Wood",
"LHA-4 Nassau", "LHA-4 Nassau",
"LHA-5 Peleliu" "LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
China_2000 = { China_2000 = {
"country": "China", "country": "China",
@ -59,5 +59,7 @@ China_2000 = {
], "carrier_names": [ ], "carrier_names": [
"001 Liaoning", "001 Liaoning",
"002 Shandong", "002 Shandong",
], "boat":[
"ChineseNavyGroupGenerator", "Type54GroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
France_1995 = { France_1995 = {
"country": "France", "country": "France",
@ -40,5 +40,7 @@ France_1995 = {
], "shorad": [ ], "shorad": [
AirDefence.HQ_7_Self_Propelled_LN, AirDefence.HQ_7_Self_Propelled_LN,
AirDefence.SAM_Roland_ADS AirDefence.SAM_Roland_ADS
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
France_2005 = { France_2005 = {
"country": "France", "country": "France",
@ -55,5 +55,7 @@ France_2005 = {
"L9013 Mistral", "L9013 Mistral",
"L9014 Tonerre", "L9014 Tonerre",
"L9015 Dixmude" "L9015 Dixmude"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,5 +1,4 @@
from dcs.planes import * from dcs.planes import *
from dcs.ships import Uboat_VIIC_U_flak, Schnellboot_type_S130
from dcs.vehicles import * from dcs.vehicles import *
from game.data.building_data import WW2_GERMANY_BUILDINGS from game.data.building_data import WW2_GERMANY_BUILDINGS
@ -39,5 +38,8 @@ Germany_1944 = {
], ],
"objects": WW2_GERMANY_BUILDINGS, "objects": WW2_GERMANY_BUILDINGS,
"doctrine": WWII_DOCTRINE, "doctrine": WWII_DOCTRINE,
"boat": [Uboat_VIIC_U_flak, Schnellboot_type_S130] "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"],
"boat_count": 4,
"missiles": ["V1GroupGenerator"],
"missiles_count": 1
} }

View File

@ -1,6 +1,5 @@
from dcs.planes import * from dcs.planes import *
from dcs.vehicles import * from dcs.vehicles import *
from dcs.ships import *
from game.data.building_data import WW2_GERMANY_BUILDINGS from game.data.building_data import WW2_GERMANY_BUILDINGS
from game.data.doctrine import WWII_DOCTRINE from game.data.doctrine import WWII_DOCTRINE
@ -32,5 +31,8 @@ Germany_1944_Easy = {
], ],
"objects": WW2_GERMANY_BUILDINGS, "objects": WW2_GERMANY_BUILDINGS,
"doctrine": WWII_DOCTRINE, "doctrine": WWII_DOCTRINE,
"boat": [Uboat_VIIC_U_flak, Schnellboot_type_S130] "boat": ["UBoatGroupGenerator", "SchnellbootGroupGenerator"],
"boat_count": 4,
"missiles": ["V1GroupGenerator"],
"missiles_count": 1
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Germany_1990 = { Germany_1990 = {
"country": "Germany", "country": "Germany",
@ -39,5 +39,7 @@ Germany_1990 = {
"shorad":[ "shorad":[
AirDefence.SPAAA_Gepard, AirDefence.SPAAA_Gepard,
AirDefence.SAM_Roland_ADS, AirDefence.SAM_Roland_ADS,
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
India_2010 = { India_2010 = {
"country": "India", "country": "India",
@ -49,5 +49,7 @@ India_2010 = {
FSG_1241_1MP_Molniya, FSG_1241_1MP_Molniya,
], "carrier_names": [ ], "carrier_names": [
"INS Vikramaditya" "INS Vikramaditya"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Iran_2015 = { Iran_2015 = {
"country": "Iran", "country": "Iran",
@ -52,5 +52,7 @@ Iran_2015 = {
"shorad":[ "shorad":[
AirDefence.HQ_7_Self_Propelled_LN, AirDefence.HQ_7_Self_Propelled_LN,
AirDefence.AAA_ZU_23_Insurgent_Closed AirDefence.AAA_ZU_23_Insurgent_Closed
], "boat":[
"GrishaGroupGenerator", "MolniyaGroupGenerator", "KiloSubGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Israel_2000 = { Israel_2000 = {
"country": "Israel", "country": "Israel",
@ -31,7 +31,9 @@ Israel_2000 = {
LHA_1_Tarawa, LHA_1_Tarawa,
Armed_speedboat, Armed_speedboat,
], ],
"shorad":[ "shorad": [
AirDefence.SAM_Avenger_M1097 AirDefence.SAM_Avenger_M1097
], "boat": [
"ArleighBurkeGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Italy_1990 = { Italy_1990 = {
"country": "Italy", "country": "Italy",
@ -42,5 +42,7 @@ Italy_1990 = {
], "lha_names": [ ], "lha_names": [
"Giuseppe Garibaldi", "Giuseppe Garibaldi",
"Cavour", "Cavour",
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,6 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.vehicles import *
Lybia_2011 = { Lybia_2011 = {
"country": "Russia", "country": "Russia",
@ -44,5 +43,7 @@ Lybia_2011 = {
"shorad":[ "shorad":[
AirDefence.HQ_7_Self_Propelled_LN, AirDefence.HQ_7_Self_Propelled_LN,
AirDefence.SAM_SA_8_Osa_9A33, AirDefence.SAM_SA_8_Osa_9A33,
], "boat": [
"GrishaGroupGenerator", "MolniyaGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Netherlands_1990 = { Netherlands_1990 = {
"country": "The Netherlands", "country": "The Netherlands",
@ -30,7 +30,9 @@ Netherlands_1990 = {
LHA_1_Tarawa, LHA_1_Tarawa,
Armed_speedboat, Armed_speedboat,
], ],
"shorad":[ "shorad": [
AirDefence.SAM_Avenger_M1097 AirDefence.SAM_Avenger_M1097
], "boat": [
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
NorthKorea_2000 = { NorthKorea_2000 = {
"country": "North Korea", "country": "North Korea",
@ -46,5 +46,8 @@ NorthKorea_2000 = {
"shorad":[ "shorad":[
AirDefence.AAA_ZU_23_Emplacement, AirDefence.AAA_ZU_23_Emplacement,
AirDefence.SPAAA_ZSU_23_4_Shilka AirDefence.SPAAA_ZSU_23_4_Shilka
],
"boat": [
"GrishaGroupGenerator", "MolniyaGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Pakistan_2015 = { Pakistan_2015 = {
"country": "Pakistan", "country": "Pakistan",
@ -34,5 +34,7 @@ Pakistan_2015 = {
AirDefence.HQ_7_Self_Propelled_LN, AirDefence.HQ_7_Self_Propelled_LN,
AirDefence.AAA_ZU_23_Insurgent_on_Ural_375, AirDefence.AAA_ZU_23_Insurgent_on_Ural_375,
AirDefence.AAA_ZU_23_Closed AirDefence.AAA_ZU_23_Closed
], "boat": [
"Type54GroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -49,5 +49,7 @@ Russia_1965 = {
], ],
"shorad":[ "shorad":[
AirDefence.AAA_ZU_23_Closed AirDefence.AAA_ZU_23_Closed
], "boat": [
"GrishaGroupGenerator"
] ]
} }

View File

@ -65,5 +65,7 @@ Russia_1975 = {
FF_1135M_Rezky, FF_1135M_Rezky,
], "cruiser": [ ], "cruiser": [
CGN_1144_2_Pyotr_Velikiy, CGN_1144_2_Pyotr_Velikiy,
], "boat": [
"RussianNavyGroupGenerator", "KiloSubGroupGenerator", "MolniyaGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Russia_1990 = { Russia_1990 = {
"country": "Russia", "country": "Russia",
@ -64,5 +64,7 @@ Russia_1990 = {
FF_1135M_Rezky, FF_1135M_Rezky,
], "cruiser": [ ], "cruiser": [
FSG_1241_1MP_Molniya, FSG_1241_1MP_Molniya,
], "boat":[
"RussianNavyGroupGenerator", "KiloSubGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Russia_2010 = { Russia_2010 = {
"country": "Russia", "country": "Russia",
@ -63,5 +63,7 @@ Russia_2010 = {
FF_1135M_Rezky, FF_1135M_Rezky,
], "cruiser": [ ], "cruiser": [
FSG_1241_1MP_Molniya, FSG_1241_1MP_Molniya,
], "boat": [
"RussianNavyGroupGenerator", "KiloSubGroupGenerator"
] ]
} }

View File

@ -1,6 +1,6 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import * from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Spain_1990 = { Spain_1990 = {
"country": "Spain", "country": "Spain",
@ -44,5 +44,7 @@ Spain_1990 = {
"Principe de Asturias", "Principe de Asturias",
], "lhanames": [ ], "lhanames": [
"Juan Carlos I", "Juan Carlos I",
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -25,7 +25,7 @@ Sweden_1990 = {
Dry_cargo_ship_Ivanov, Dry_cargo_ship_Ivanov,
Tanker_Elnya_160, Tanker_Elnya_160,
], ],
"shorad":[ "shorad": [
AirDefence.SAM_Avenger_M1097 AirDefence.SAM_Avenger_M1097
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Turkey_2005 = { Turkey_2005 = {
"country": "Turkey", "country": "Turkey",
@ -36,5 +36,7 @@ Turkey_2005 = {
], "shorad":[ ], "shorad":[
AirDefence.AAA_ZU_23_Emplacement, AirDefence.AAA_ZU_23_Emplacement,
AirDefence.SPAAA_ZSU_23_4_Shilka AirDefence.SPAAA_ZSU_23_4_Shilka
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
UAE_2005 = { UAE_2005 = {
"country": "United Arab Emirates", "country": "United Arab Emirates",
@ -30,5 +30,7 @@ UAE_2005 = {
CVN_74_John_C__Stennis, CVN_74_John_C__Stennis,
LHA_1_Tarawa, LHA_1_Tarawa,
Armed_speedboat, Armed_speedboat,
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
UnitedKingdom_1990 = { UnitedKingdom_1990 = {
"country": "UK", "country": "UK",
@ -46,5 +46,7 @@ UnitedKingdom_1990 = {
"HMS Invincible", "HMS Invincible",
"HMS Illustrious", "HMS Illustrious",
"HMS Ark Royal", "HMS Ark Royal",
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
Ukraine_2010 = { Ukraine_2010 = {
"country": "Ukraine", "country": "Ukraine",
@ -47,5 +47,7 @@ Ukraine_2010 = {
AirDefence.SAM_SA_19_Tunguska_2S6, AirDefence.SAM_SA_19_Tunguska_2S6,
AirDefence.SAM_SA_13_Strela_10M3_9A35M3, AirDefence.SAM_SA_13_Strela_10M3_9A35M3,
AirDefence.AAA_ZU_23_on_Ural_375 AirDefence.AAA_ZU_23_on_Ural_375
], "boat":[
"GrishaGroupGenerator"
] ]
} }

View File

@ -43,5 +43,6 @@ USA_1944 = {
], ],
"objects": WW2_ALLIES_BUILDINGS, "objects": WW2_ALLIES_BUILDINGS,
"doctrine": WWII_DOCTRINE, "doctrine": WWII_DOCTRINE,
"boat": [LS_Samuel_Chase] "boat": ["WW2LSTGroupGenerator"],
"boat_count": 2
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
USA_1965 = { USA_1965 = {
"country": "USA", "country": "USA",
@ -36,5 +36,7 @@ USA_1965 = {
"shorad":[ "shorad":[
AirDefence.AAA_Vulcan_M163, AirDefence.AAA_Vulcan_M163,
AirDefence.SAM_Chaparral_M48 AirDefence.SAM_Chaparral_M48
], "boat":[
"OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
USA_1990 = { USA_1990 = {
"country": "USA", "country": "USA",
@ -59,5 +59,7 @@ USA_1990 = {
"LHA-3 Belleau Wood", "LHA-3 Belleau Wood",
"LHA-4 Nassau", "LHA-4 Nassau",
"LHA-5 Peleliu" "LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
] ]
} }

View File

@ -1,7 +1,7 @@
from dcs.vehicles import *
from dcs.ships import *
from dcs.planes import *
from dcs.helicopters import * from dcs.helicopters import *
from dcs.planes import *
from dcs.ships import *
from dcs.vehicles import *
USA_2005 = { USA_2005 = {
"country": "USA", "country": "USA",
@ -51,7 +51,6 @@ USA_2005 = {
], "helicopter_carrier": [ ], "helicopter_carrier": [
LHA_1_Tarawa, LHA_1_Tarawa,
], "destroyer": [ ], "destroyer": [
Oliver_Hazzard_Perry_class,
USS_Arleigh_Burke_IIa, USS_Arleigh_Burke_IIa,
], "cruiser": [ ], "cruiser": [
Ticonderoga_class, Ticonderoga_class,
@ -66,5 +65,7 @@ USA_2005 = {
"LHA-3 Belleau Wood", "LHA-3 Belleau Wood",
"LHA-4 Nassau", "LHA-4 Nassau",
"LHA-5 Peleliu" "LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator"
] ]
} }

42
gen/fleet/cn_dd_group.py Normal file
View File

@ -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)

27
gen/fleet/dd_group.py Normal file
View File

@ -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)

59
gen/fleet/ru_dd_group.py Normal file
View File

@ -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)

View File

@ -1,18 +1,30 @@
import logging
import random import random
from game import db from game import db
from gen.fleet.carrier_group import CarrierGroupGenerator 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 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.schnellboot import SchnellbootGroupGenerator
from gen.fleet.uboat import UBoatGroupGenerator from gen.fleet.uboat import UBoatGroupGenerator
from gen.fleet.ww2lst import WW2LSTGroupGenerator from gen.fleet.ww2lst import WW2LSTGroupGenerator
SHIP_MAP = { SHIP_MAP = {
Schnellboot_type_S130: SchnellbootGroupGenerator, "SchnellbootGroupGenerator": SchnellbootGroupGenerator,
LS_Samuel_Chase: WW2LSTGroupGenerator, "WW2LSTGroupGenerator": WW2LSTGroupGenerator,
Uboat_VIIC_U_flak: UBoatGroupGenerator "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] faction = db.FACTIONS[faction]
if "boat" in faction.keys(): if "boat" in faction.keys():
ships = faction["boat"] generators = faction["boat"]
if len(ships) > 0: if len(generators) > 0:
sam = random.choice(ships) gen = random.choice(generators)
generator = SHIP_MAP[sam](game, ground_object, faction) if gen in SHIP_MAP.keys():
generator.generate() generator = SHIP_MAP[gen](game, ground_object, faction)
return generator.get_generated_group() generator.generate()
return generator.get_generated_group()
else:
logging.info("Unable to generate ship group, generator : " + str(gen) + "does not exists")
return None return None

View File

@ -17,6 +17,6 @@ class WW2LSTGroupGenerator(GroupGenerator):
self.add_unit(LS_Samuel_Chase, "SamuelChase", self.position.x, self.position.y, self.heading) self.add_unit(LS_Samuel_Chase, "SamuelChase", self.position.x, self.position.y, self.heading)
for i in range(random.randint(2, 4)): 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 self.get_generated_group().points[0].speed = 20

View File

@ -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 from gen.flights.flight import Flight, FlightType, FlightWaypoint, FlightWaypointType
MISSION_DURATION = 120 MISSION_DURATION = 80
class FlightPlanner: class FlightPlanner:
@ -490,7 +490,14 @@ class FlightPlanner:
ingress, heading, distance = Conflict.frontline_vector(ally_cp, enemy_cp, self.game.theater) ingress, heading, distance = Conflict.frontline_vector(ally_cp, enemy_cp, self.game.theater)
center = ingress.point_from_heading(heading, distance / 2) 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))) 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) orbit0p = orbit_center.point_from_heading(heading, radius)
orbit1p = orbit_center.point_from_heading(heading + 180, radius) orbit1p = orbit_center.point_from_heading(heading + 180, radius)

View File

@ -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

32
gen/missiles/v1_group.py Normal file
View File

@ -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)

View File

@ -32,7 +32,10 @@ class NameGenerator:
"TERMITE", "URCHIN", "SHRIMP", "TURKEY", "TOUCAN", "TETRA", "HUSKY", "STARFISH", "SWAN", "TERMITE", "URCHIN", "SHRIMP", "TURKEY", "TOUCAN", "TETRA", "HUSKY", "STARFISH", "SWAN",
"FROG", "SQUIRREL", "WALRUS", "WARTHOG", "CORGI", "WEASEL", "WOMBAT", "WOLVERINE", "MAMMOTH", "FROG", "SQUIRREL", "WALRUS", "WARTHOG", "CORGI", "WEASEL", "WOMBAT", "WOLVERINE", "MAMMOTH",
"TOAD", "WOLF", "ZEBU", "SEAL", "SKATE", "JELLYFISH", "MOSQUITO", "LOCUST", "SLUG", "SNAIL", "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): def __init__(self):

View File

@ -31,9 +31,23 @@ class FlakGenerator(GroupGenerator):
if(mixed): if(mixed):
unit_type = random.choice(GFLAK) unit_type = random.choice(GFLAK)
# Enough Opel Blitz truck to transport the guns # Search lights
for i in range(grid_x): search_pos = self.get_circular_position(random.randint(2,5), 90)
for j in range(grid_y): 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.add_unit(Unarmed.Blitz_3_6_6700A, "AAA#" + str(index),
self.position.x + 200 + 15*i + random.randint(1,5), self.position.x + 200 + 15*i + random.randint(1,5),
self.position.y + 15*j + random.randint(1,5), 90) self.position.y + 15*j + random.randint(1,5), 90)

View File

@ -10,6 +10,6 @@ class QWaypointItem(QStandardItem):
def __init__(self, point: FlightWaypoint, number): def __init__(self, point: FlightWaypoint, number):
super(QWaypointItem, self).__init__() super(QWaypointItem, self).__init__()
self.number = number self.number = number
self.setText("%02d" % self.number + ' | ' + '{:<16}'.format(point.pretty_name)) self.setText('{:<16}'.format(point.pretty_name))
self.setEditable(False) self.setEditable(False)

View File

@ -8,6 +8,7 @@ from game.data.building_data import DEFAULT_AVAILABLE_BUILDINGS
from gen import namegen from gen import namegen
from gen.defenses.armor_group_generator import generate_armor_group 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.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 gen.sam.sam_group_generator import generate_anti_air_group, generate_shorad_group
from theater import ControlPointType from theater import ControlPointType
from theater.base import * from theater.base import *
@ -68,9 +69,9 @@ def generate_groundobjects(theater: ConflictTheater, game):
# CP # CP
if cp.captured: if cp.captured:
faction = game.player_name faction_name = game.player_name
else: else:
faction = game.enemy_name faction_name = game.enemy_name
if cp.cptype == ControlPointType.AIRCRAFT_CARRIER_GROUP: if cp.cptype == ControlPointType.AIRCRAFT_CARRIER_GROUP:
# Create ground object group # Create ground object group
@ -85,14 +86,14 @@ def generate_groundobjects(theater: ConflictTheater, game):
g.obj_name = namegen.random_objective_name() g.obj_name = namegen.random_objective_name()
g.heading = 0 g.heading = 0
g.position = Point(cp.position.x, cp.position.y) 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 = [] g.groups = []
if group is not None: if group is not None:
g.groups.append(group) g.groups.append(group)
cp.ground_objects.append(g) cp.ground_objects.append(g)
# Set new name : # Set new name :
if "carrier_names" in db.FACTIONS[faction]: if "carrier_names" in db.FACTIONS[faction_name]:
cp.name = random.choice(db.FACTIONS[faction]["carrier_names"]) cp.name = random.choice(db.FACTIONS[faction_name]["carrier_names"])
elif cp.cptype == ControlPointType.LHA_GROUP: elif cp.cptype == ControlPointType.LHA_GROUP:
# Create ground object group # Create ground object group
group_id = group_id + 1 group_id = group_id + 1
@ -106,14 +107,14 @@ def generate_groundobjects(theater: ConflictTheater, game):
g.obj_name = namegen.random_objective_name() g.obj_name = namegen.random_objective_name()
g.heading = 0 g.heading = 0
g.position = Point(cp.position.x, cp.position.y) 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 = [] g.groups = []
if group is not None: if group is not None:
g.groups.append(group) g.groups.append(group)
cp.ground_objects.append(g) cp.ground_objects.append(g)
# Set new name : # Set new name :
if "lhanames" in db.FACTIONS[faction]: if "lhanames" in db.FACTIONS[faction_name]:
cp.name = random.choice(db.FACTIONS[faction]["lhanames"]) cp.name = random.choice(db.FACTIONS[faction_name]["lhanames"])
else: else:
for i in range(random.randint(3,6)): for i in range(random.randint(3,6)):
@ -139,7 +140,7 @@ def generate_groundobjects(theater: ConflictTheater, game):
g.heading = 0 g.heading = 0
g.position = Point(point.x, point.y) 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) cp.ground_objects.append(g)
print("---------------------------") print("---------------------------")
@ -147,34 +148,72 @@ def generate_groundobjects(theater: ConflictTheater, game):
for ground_object in cp.ground_objects: for ground_object in cp.ground_objects:
print(ground_object.groups) print(ground_object.groups)
for i in range(random.randint(2, 3)): if "boat" in db.FACTIONS[faction_name].keys():
print("GENERATE SHIPS") boat_count = 1
point = find_location(False, cp.position, theater, 5000, 40000, [], False) if "boat_count" in db.FACTIONS[faction_name].keys():
print(point) boat_count = int(db.FACTIONS[faction_name]["boat_count"])
if point is None: for i in range(boat_count):
print("Couldn't find point for {} ships".format(cp))
continue
group_id = group_id + 1 point = find_location(False, cp.position, theater, 5000, 40000, [], False)
g = TheaterGroundObject("aa") if point is None:
g.group_id = group_id print("Couldn't find point for {} ships".format(cp))
g.object_id = 0 continue
g.cp_id = cp.id
g.airbase_group = False group_id = group_id + 1
g.dcs_identifier = "AA"
g.sea_object = True g = TheaterGroundObject("aa")
g.obj_name = namegen.random_objective_name() g.group_id = group_id
g.heading = 0 g.object_id = 0
g.position = Point(point.x, point.y) 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): def generate_airbase_defense_group(airbase_defense_group_id, ground_obj:TheaterGroundObject, faction, game, cp):