83 Commits

Author SHA1 Message Date
MetalStormGhost
40a01218dd Implemented saving of a Pretense pre-generation backup save before generating a Pretense campaign. 2024-05-01 11:01:59 +03:00
MetalStormGhost
0a7b885626 Now will not call CarrierMap:new() when game.settings.pretense_controllable_carrier is disabled. 2024-04-06 20:27:39 +03:00
MetalStormGhost
64b1410de8 Implemented support for player controllable carriers in Pretense campaigns. This functionality can be enabled or disabled in settings, because the controllable carriers in Pretense do not build and deploy AI missions autonomously, so the old functionality is retained.
Added new options in settings:
- Carriers steam into wind
- Navmesh to use for Pretense carrier zones
- Remove ground spawn statics, including invisible FARPs, at airbases.
- Percentage of randomly selected aircraft types (only for generated squadrons)
intended to allow the user to increase aircraft variety.

Will now store the ICLS channel and Link4 frequency in missiondata.py CarrierInfo.

Implemented artillery groups as Pretense garrisons. Artillery groups are spawned by the Artillery Bunker. Will now also ensure that the logistics units spawned as part of Pretense garrisons are actually capable of ammo resupply.

Fixed the Pretense generator generating a bit too many missions per squadron. Ground spawns: Also hot start aircraft which require ground crew support (ground air or chock removal) which might not be available at roadbases. Also, pretensetgogenerator.py will now correctly handle air defence units in ground_unit_of_class(). Added Roland groups in the Pretense generator.
2024-04-06 15:46:11 +03:00
MetalStormGhost
ff096b7d8d Will now generate multiple missions per squadron in Pretense campaigns to ensure most mission types are available. 2024-02-25 12:40:50 +02:00
MetalStormGhost
2edc0a7305 Ground unit presets are now generated from the coalition/faction definitions. 2024-02-25 12:40:49 +02:00
MetalStormGhost
200812a39b Other coalition TGO spawns are now generated with the correct faction. 2024-02-25 12:40:48 +02:00
MetalStormGhost
a4d8c14579 Added Iron Dome, David's Slinh, NASAMS-B and Rapier sites to Pretense. Fixed the timestamp in the save file name. 2024-02-25 12:40:48 +02:00
MetalStormGhost
969f0e26c7 Pretense zone radius (radii) for FOBs with FARPs will now be dynamically adjusted. Increased the size of Pretense zones at Damascus, Khalkhalah and Krasnodar-Pashkovsky (which are quite spread out) so the zone would encompass the entire airfield. 2024-02-25 12:40:48 +02:00
MetalStormGhost
49ba40aaf3 Now randomly shuffles the Pretense squadrons when generating a Pretense campaign. 2024-02-25 12:40:48 +02:00
MetalStormGhost
5cfeee7b2a Helicopter escort squadrons no longer cause an error on Pretense campaign generation. 2024-02-25 12:40:47 +02:00
MetalStormGhost
3d8956434c Will now append the date and time in the Pretense savefile, mitigating risks of missions script errors when trying to load a savefile from a previously generated mission. 2024-02-25 12:40:46 +02:00
MetalStormGhost
3d435c7821 Removed a non-functional option from the settings. 2024-02-25 12:40:46 +02:00
MetalStormGhost
76bab86e67 Updated the Pretense script to version 1.3.8 - 3 Dec 2023 and MIST to version 4.5.122. 2024-02-25 12:40:45 +02:00
MetalStormGhost
00760b831e Will now correctly generate Pretense campaigns with CJTF factions. 2024-02-25 12:40:45 +02:00
MetalStormGhost
f4e8e30cb1 Implemented new options in settings:
- Pretense: Extra friendly zone connections - Add connections from each zone to this many closest friendly zones, which don't have an existing supply route defined in the campaign.
- Number of cargo planes per side
- Number of AI SEAD flights per control point / zone
- Number of AI CAS flights per control point / zone
- Number of AI BAI flights per control point / zone
- Number of AI Strike flights per control point / zone
- Number of AI BARCAP flights per control point / zone
- Number of AI aircraft per flight
- Number of player flights per aircraft type at each base
- Number of AI cargo planes per side

Implemented CAS helo mission handling for Pretense. Implemented separate pretense_air_groups container for storing/referencing Flight objects. Tweaked the supply costs of SAM sites and Command centers. Will no longer generate player air starts at roadbases either. Restored the missing DEAD flights to Pretense. Removed spawning of frontline units and moved the JTAC spawning to pretensemissiongenerator.py
2024-02-25 12:40:44 +02:00
MetalStormGhost
93ab146cf5 Restored Retribution scripts and triggers to Pretense campaigns. Pretense progress can now be translated back to Retribution. Moved the trigger clearing from pretenseluagenerator.py to pretensemissiongenerator.py
keepActive is now only enabled for airbases and carriers/LHAs, for performance reasons.
2024-02-25 12:40:44 +02:00
MetalStormGhost
5b60d64437 Reduced the number of cargo planes to 2 per side. 2024-02-25 12:40:43 +02:00
MetalStormGhost
2808d0f72c Fixed the bug of not generating opposing force ground unit groups at Pretense zones. Added the country name to ground vehicle group names to avoid duplicates. 2024-02-25 12:40:43 +02:00
MetalStormGhost
64e425012c Implemented generating runway zones at airports in Pretense. 2024-02-25 12:40:42 +02:00
MetalStormGhost
85db8c908e Restored compatibility of the Pretense generator after the timedelta -> datetime change and other changes caused by the Liberation merge/sync. 2024-02-25 12:40:42 +02:00
MetalStormGhost
91a9a9b88f Moved SAM site presets from presets.defenses.sam to presets.defenses.red/blue 2024-02-25 12:40:42 +02:00
Raffson
b36215b808 Fix errors due to LaserCodeRegistry move 2024-02-25 12:40:41 +02:00
MetalStormGhost
ced7aa4d72 Implemented generating amphibious units for Pretense unit groups. Amphibious units are selected out of a pre-defined list. Units which the faction has access to are preferred, but certain default unit types are selected as a fall-back to ensure that all the generated units can swim. 2024-02-25 12:40:41 +02:00
MetalStormGhost
921b1ee9fd Fixed a bug in SHORAD and SAM generation. 2024-02-25 12:39:47 +02:00
MetalStormGhost
713cd98d10 Implemented SAM sites as products of a Command Center at a control point / zone, if the Retribution campaign has the corresponding SAM site there. The SAM site presets are still static, I might make them dynamic in the future. 2024-02-25 12:39:47 +02:00
MetalStormGhost
cf9cc9ba33 Fixed a bug in generate_pretense_zone_connection(). 2024-02-25 12:39:47 +02:00
MetalStormGhost
39c80cb974 Implemented a list of units which will be removed from Pretense ground assault groups due to pathfinding problems. The units will just remain still instead of advancing. Also added one tank to each group and increased the maximum size of the groups to 5. Removed artillery units from the groups, similarly due to pathfinding problems. 2024-02-25 12:39:47 +02:00
MetalStormGhost
cf9538f7df Implemented spawning of ship statics/units at naval control points instead of land structures or SHORAD sites. 2024-02-25 12:39:46 +02:00
MetalStormGhost
3d15505347 Implemented a static method for creating the Pretense zone connections and to avoid duplicate connections. 2024-02-25 12:39:46 +02:00
MetalStormGhost
dd0217a220 Pretense SEAD flights will use the SEAD Sweep loadout, when available. 2024-02-25 12:39:45 +02:00
MetalStormGhost
d870099f41 Replaced the air defence Command Center with a bunker for SHORADs. Will use the Command Center in the future for medium/long range SAMs. 2024-02-25 12:39:45 +02:00
MetalStormGhost
c6a8673b5e Added missing generation of AI BAI flights. Player flight groups are now generated as single-ship groups to support the Pretense missions for all players. Moved repetitive code in PretenseFlightGroupSpawner to insert_into_pretense() method. Disabled spawning of air assault statics by PretenseFlightGroupConfigurator since they are unnecessary in Pretense. 2024-02-25 12:39:45 +02:00
MetalStormGhost
cc3bef7937 Copied flightgroupconfigurator.py as a template/inheritance for generating Pretense campaigns from Retribution campaigns. 2024-02-25 12:39:44 +02:00
MetalStormGhost
0bdb989a2c Aircraft squadrons are now products of the Hangar, instead of the air defence Command Center. 2024-02-25 12:39:44 +02:00
MetalStormGhost
765c85b639 Now generates one transport helicopter squadron for each control point which can operate one. Also implemented generating several Pretense cargo plane squadrons, defined by PRETENSE_AI_CARGO_PLANES_PER_SIDE. Cleaned up PretenseMissionGenerator.generate_air_units() a bit. 2024-02-25 12:39:44 +02:00
Raffson
7b9ddb1ece Formatting 2024-02-25 12:39:44 +02:00
MetalStormGhost
5fa7757ae1 Fixed not all generated flights getting inserted into Pretense data structures. 2024-02-25 12:39:43 +02:00
MetalStormGhost
064d17aab0 Improved the typing of game.pretense_air 2024-02-25 12:39:43 +02:00
MetalStormGhost
946d578ffb Implemented generating player slots in the Pretense campaign. 2024-02-25 12:39:42 +02:00
MetalStormGhost
95bac8ec17 Run aircraft_generator.generate_packages() only once per ATO, instead of multiple times. Fixed the duplicated flights issue. 2024-02-25 12:39:42 +02:00
MetalStormGhost
91cfff58d9 Changed tanker_tacan from "N/A" to 0.0 when the tanker is not compatible with TACAN, in order to avoid mission script errors. 2024-02-25 12:39:42 +02:00
MetalStormGhost
585b3e74a0 Implemented a separate generate_packages() method in PretenseAircraftGenerator to prevent generating the same ATO multiple times over. 2024-02-25 12:39:41 +02:00
Raffson
4ff31ea86d Blast through errors 2024-02-25 12:39:41 +02:00
Raffson
231a8609a1 imports 2024-02-25 12:39:41 +02:00
MetalStormGhost
a6104968e8 Don't spawn flights for the other squadron in generate_pretense_aircraft(). 2024-02-25 12:39:40 +02:00
MetalStormGhost
77060031da Cleaned up some code. 2024-02-25 12:39:40 +02:00
MetalStormGhost
51a4b6603d Now generates air units for both sides at airfields. 2024-02-25 12:39:40 +02:00
MetalStormGhost
4e4eeff9ec Split the Pretense zone definition generation into separate methods: generate_pretense_zone_land() for land control points and generate_pretense_zone_sea() for carriers/LHAs. 2024-02-25 12:39:39 +02:00
MetalStormGhost
4b092e0763 Fixed FlightType.AEWC and FlightType.REFUELING handling in generate_pretense_aircraft(). 2024-02-25 12:39:39 +02:00
MetalStormGhost
aa641e1ff6 Added configuration constants for flights generated for Pretense. Fixed a bug which caused only one squadron per CP to be generated. Will now not generate Pretense cargo flights from Retribution off-map spawns, but instead will generate own air spawn points for them. Added a helper function initialize_pretense_data_structures(). 2024-02-25 12:39:39 +02:00