83 Commits

Author SHA1 Message Date
Raffson
5fdf38c663
Format with updated black 2024-10-12 17:33:01 +02:00
Raffson
44658f8eec
Skip EscortType for SEAD Sweep planned during CAS
Seems like the EscortType would cause the flight to be pruned if no IADS threats surround the CAS zone, but we'd like to plan it regardless to tackle air defenses along the front-line
2024-09-22 22:47:26 +02:00
Raffson
126d70792f
Another attempt to improve DEAD autoplanner 2024-09-21 22:57:07 +02:00
Raffson
a7d091c142
Fine-tune attempt wrt DEAD autoplanning
A small note, this also affects the aggressiveness wrt SHORAD & AAA
2024-09-15 22:08:58 +02:00
Raffson
be554c54b3
Plan IADS degradation as last
The previous steps identify IADS locations, so moving this "up the list" has detrimental effects...
2024-09-15 22:05:43 +02:00
Raffson
49211dae4f
Autoplanner support for ArmedRecon 2024-09-15 22:05:42 +02:00
Raffson
f5bb653ad8
Rework (OPFOR) autoplanner aggressiveness setting
Also introduces a setting for OWNFOR
2024-09-15 22:05:42 +02:00
Raffson
d35962b784
AirAssault autoplanner support for non-frontline CPs
Aims to solve the issue where AirAssault won't plan against CPs that don't have an active frontline, including isolated CPs.
2024-09-15 22:05:41 +02:00
Raffson
f63939ce3c
Include isolated points in objectivefinder 2024-09-15 22:05:41 +02:00
Raffson
f405ffdfe2
Initial support for Armed Recon flight plan 2024-07-21 02:22:14 +02:00
Raffson
d190d23655
Avoid scrubbing flights if escorts are unplannable 2024-06-08 18:55:28 +02:00
Raffson
8c9f62a2fb
Add extra condition to preferred client start-type 2024-06-01 21:17:05 +02:00
MetalStormGhost
a27663e4b6
Default start type for player flights (#303)
* Implemented a new option in settings: Default start type for Player flights.

* Updated changelog.

* Removed unnecessary country parameter.

* Restore missing parameter

* on_pilot_changed should emit pilots_changed in its finally block, otherwise the start-type isn't updated if you have a single client pilot which you switch to a non-client pilot.

Also implemented other changes suggested by @Raffson, such as a more streamlined start_type QComboBox handling and moving the pilots_changed Signal to FlightRosterEditor.

* Decouple Signal from QFlighStartType

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-05-09 10:19:30 +00:00
Raffson
eb6afbdf02
Ignore range when manually using auto-create 2024-03-09 22:31:47 +01:00
Raffson
e36e213b76
Selectable aircraft type in AutoCreateDialog
Resolves #165
2024-02-25 00:38:17 +01:00
Raffson
3f5b93a5c1
Introduce AttackShips compound task 2024-02-12 00:04:13 +01:00
Raffson
05163d41a0
Adjust comment 2024-02-12 00:03:48 +01:00
Raffson
14a0310d25
Prioritize degrading IADS 2024-02-10 20:42:01 +01:00
Dan Albert
59673e7911
Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:09:25 +02:00
Dan Albert
177f357492
Pre-allocate laser codes for FLOTs and flights. 2023-10-07 14:06:12 +02:00
Raffson
234dc52c7e
Make AirAssault auto-plannable 2023-09-23 19:38:29 +02:00
Raffson
389037e6bf
Don't scrub missions with unplannable escort types
The check for whether or not the escort is actually needed happens later, and thus the mission can still be scrubbed if it's too dangerous. However, missions should not be scrubbed when a particular escort type is unplannable, yet not needed. Only if the primary flight type is not plannable should the mission immediately be scrubbed
2023-09-23 16:51:26 +02:00
Raffson
789806637c
Improve escort logic for helicopters
Babysteps #88
2023-08-15 21:50:20 +02:00
MetalStormGhost
7a9a8e1b4b
Auto-ato AWACS & Tankers settings (#198)
* Auto-ato AWACS & Tankers settings

Split off the **Automatic AWACS package planning** and **Automatic Theater tanker package planning** settings from **Automatic package planning behavior** so players can choose to have AWACS and theater tankers auto-planned, while managing everything else themselves.

* Drop logic to child-classes

* Enable AWACS auto-planning by default

* Switch order of preconditions

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-08-12 19:09:19 +00:00
Raffson
9d63bcbf69
Improve STRIKE where possible
- Plan number of aircraft more accurately
- Fine-tuning ingress waypoint tasks
- Add lineup waypoint for STRIKE flights, 10NM in front of ingress on the same heading as the target
2023-07-16 18:22:29 +02:00
Raffson
009debd4e8
Follow-up on dependency updates 2023-07-15 17:55:55 +02:00
Raffson
17211e1597
Include SEAD Sweep in common escorts 2023-07-10 22:26:30 +02:00
Raffson
2ec187bc9c
Fixing OCA-bug against FOBs
OCA Aircraft should be properly allowed against FOBs given Ghosti's roadbases
2023-07-05 23:29:48 +02:00
MetalStormGhost
6e37cadb84
Settings doctrine page + streamlining (#156)
* Added a separate Doctrine page in settings with the following new options:
- Minimum number of aircraft for autoplanner to plan OCA packages against
- Airbase threat range (nmi)
- TARCAP threat buffer distance (nmi)
- AEW&C threat buffer distance (nmi)
- Theater tanker threat buffer distance (nmi)

Implemented handling for the OPFOR autoplanner aggressiveness in objectivefinder.py vulnerable_control_points().

* * Added three new options in Settings:
- Autoplanner plans refueling flights for Strike packages
- Autoplanner plans refueling flights for OCA packages
- Autoplanner plans refueling flights for DEAD packages

Fixed a bug in faction.py where F-16Ds were not correctly removed from the faction when the F-16I/F-16D mod was not selected.

* Renamed Maximum frontline length -> Maximum frontline width.
2023-07-01 23:54:27 +02:00
MetalStormGhost
e273e93012
Roadbase and ground spawn support (#132)
* Roadbase and ground spawn support

Implemented support for roadbases and ground spawn slots at airfields and FOBs. The ground spawn slots can be inserted in campaigns by placing either an A-10A or an AJS37 at a runway or ramp. This will cause an invisible FARP, an ammo dump and a fuel dump to be placed (behind the slot in case of A-10A, to the side in case of AJS37) in the generated campaigns. The ground spawn slot can be used by human controlled aircraft in generated missions. Also allowed the use of the four-slot FARP and the single helipad in campaigns, in addition to the invisible FARP. The first waypoint of the placed aircraft will be the center of a Remove Statics trigger zone (which might or might not work in multiplayer due to a DCS limitation).

Also implemented three new options in settings:
 - AI fixed-wing aircraft can use roadbases / bases with only ground spawns
   - This setting will allow the AI to use the roadbases for flights and transfers. AI flights will air-start from these bases, since the AI in DCS is not currently able to take off from ground spawns.
 - Spawn trucks at ground spawns in airbases instead of FARP statics
 - Spawn trucks at ground spawns in roadbases instead of FARP statics
   - These settings will replace the FARP statics with refueler and ammo trucks at roadbases. Enabling them might have a negative performance impact.

* Modified calculate_parking_slots() so it now takes into account also helicopter slots on FARPs and also ground start slots (but only if the aircraft is flyable or the "AI fixed-wing aircraft can use roadbases / bases with only ground spawns" option is enabled in settings).

* Improved the way parking slots are communicated on the basemenu window.

* Refactored helipad and ground spawn appends to static methods _add_helipad and _add_ground_spawn in mizcampaignloader.py
Added missing changelog entries.
Fixed tgogenerator.py imports.
Cleaned up ParkingType() construction.

* Added test_control_point_parking for testing that the correct number of parking slots are returned for control point in test_controlpoint.py

* Added test_parking_type_from_squadron to test the correct ParkingType object is returned for a squadron of Viggens in test_controlpoint.py

* Added test_parking_type_from_aircraft to test the correct ParkingType object is returned for Viggen aircraft type in test_controlpoint.py

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-06-19 00:02:08 +03:00
Dan Albert
0608089eb0
Use the actual Country type instead of the name.
We want other pieces of country information (in particular the short
names). This cleans up a lot of code anyway.

As an added bonus, this now catches squadrons that used invalid names
which would previously be passed through to pydcs and... then I don't
know what would happen.
2023-05-14 21:04:09 +02:00
Raffson
ae379bd8f5
Introduce weighted distribution for random 2/3/4-ships 2023-02-26 21:45:56 +01:00
MetalStormGhost
d2a7de2775
Add new option in settings: OPFOR autoplanner aggressiveness (#61)
"Threatened" threshold based on a suggestion from FinCenturion. (#61)
2023-01-01 15:21:08 +01:00
Raffson
e541111a27
Remove obsolete files 2022-11-20 16:29:19 +01:00
RndName
b49562f4bc
Airlift & AirAssault updates from Liberation
Cleanup and reword refuel waypoints

- rename Stopover back to CargoStop
- precise some waypoint naming

Cleanup and refine airlift and airassault waypoints

- Drop Off and Pickup now correctly worded
- Helo waypoints now represent LandingZones for pickup and dropoff

Forbid planes from air assault.

Make air assault drop-off non-optional.

There is always a drop-off location for troops.

Add docs explaining what the assault area is.

Add error handling for cargo drop waypoints.

Document some airlift waypoint behavior.

Remove unnecessary refuel waypoint in airlifts.

Remove CTLD logic from Airlift flightplan for AI

Add Ingress Point to AirAssault FlightPlan

Add simulation halt at AirAssault ingress

Remove AirAssault completly from AutoPlanner

Remove unneeded LandRefuel from Airlift

Clarify cargo waypoints for AirLift and AirAssault
2022-11-20 16:06:59 +01:00
Raffson
ca042631b7
Always propose SEAD Escort 2022-11-13 22:38:24 +01:00
Raffson
a736bf9b09
"Optimize Imports" in game & qt-ui
Adjustments made by PyCharm
2022-10-24 18:54:41 +02:00
Raffson
ace3af8f50
Avoid targeting convoys if disabled 2022-10-16 12:51:21 +02:00
Raffson
2be3257e3c
Fix mypy error after update 2022-10-09 15:22:03 +02:00
Dan Albert
0cb61ea778
Log planning times per-task. 2022-09-17 14:35:13 +02:00
Raffson
48938fc529
Dan's massive refactor
Squashing 8 commits by DanAlbert:

- Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.

- Clean some cruft out of FlightPlanBuilder.
- Clean up silly some exception handling.
- Move FlightPlan instantiation into the builder.
I'm working on moving the builder to be owned by the Flight, which will simplify callers that need to create (or recreate) flight plans for a flight.

- Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.

- Move FlightPlan creation into Flight.
For now this is just a callsite cleanup. Later, this will make it easier
to separate unscheduled and scheduled flights into different classes without complicating the layout/scheduling.

- Remove superfluous constructors.
- Remove unused Package field.
2022-08-24 19:25:30 +02:00
Raffson
1f4cca329e
Vary number of aircraft for main task
The following tasks plan according to the number of targets left:
- BAI
- ANTISHIP
- DEAD
- STRIKE

Other tasks use a random value between 2 and 4.
2022-08-15 01:20:14 +02:00
Raffson
4722a558b8
Scrub unplannable missions
Prevents generating support flights like TARCAP when the a main
task is unplannable, e.g. an Air Assault.
2022-08-15 00:49:00 +02:00
SnappyComebacks
2bd39bd9f5
Changed garrison terminology to battle position. (#2352) 2022-07-26 22:41:45 -06:00
RndName
aa77cfe4b9 Add AirAssault and Airlift mission types with CTLD support
- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
2022-06-09 22:45:29 +02:00
RndName
5cdfe62e2d Implement advanced skynet functions
- factor out own class for the iadsnetwork within the conflicttheater
- This class will handle all Skynet related things - no specific group_name handling necessary in future
- make iadsbuilding own TGO class because SAM & EWRs are Vehicle Groups. IADS Elements dont have any groups attached.
- added command center, connection node and power source as Ground objects which can be added by the campaign designer
- adjust lua generator to support new iads units
- parse the campaign yaml to get the iads network information
- use the range as fallback if no yaml information was found
- complete rewrite of the skynet lua script
- allow destruction of iads network to be persistent over all rounds
- modified the presetlocation handling: the wrapper PresetLocation for PointWithHeading now stores the original name from the campaign miz to have the ability to process campaign yaml configurations based on the ground unit
- Implementation of the UI representation for the IADS Network
- Give user the option to enable or disable advanced iads
- Extended the layout system: Implement Sub task handling to support PD
2022-04-19 10:41:16 +02:00
Dan Albert
fa8c0d9660 Clean up flight plan code.
Split the oversized file into one per plan type. This also moves the
layout responsibility out of the oversized FlightPlanBuilder and into
each flight plan type file.
2022-03-09 02:15:07 -08:00
Dan Albert
45e76e12b6 Move FlightJs out of MapModel. 2022-02-25 01:31:07 -08:00
Dan Albert
9e2e4ffa74 Update pydcs, adapt to new Point APIs.
This is briefly moving us over to my fork of pydcs while we wait for
https://github.com/pydcs/dcs/pull/206 to be merged. The adaptation is
invasive enough that I don't want it lingering for long.
2022-02-23 01:02:48 +00:00
Dan Albert
ac80c4adc1 Finish moving gen into game. 2022-02-22 00:10:31 -08:00