80 Commits

Author SHA1 Message Date
Druss99
02de6d325a
Add invisible FOBs (#504)
Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2025-05-18 17:50:47 +02:00
Raffson
431492fa77
Introduce support for "rebel-zones" 2025-01-19 19:06:19 +01:00
Druss99
dd408f392b
Fix airwing config not properly saving or loading (#437)
* fix airwing config not properly saving or loading

* add helper message to save function

* bugfixes

* remove unnecessary import used during testing

* yet another forgotten import

* change raise error to log warning
2025-01-01 15:56:08 +01:00
Raffson
d604905f52
Streamlining after merge 2024-07-28 17:13:26 +02:00
Raffson
65e529aa55
Merge branch 'dev' into pr/204 2024-07-28 15:57:38 +02:00
Raffson
e5b06e6ba4
Fix liveries overrides preventing assignment of preset squadrons 2024-07-27 22:52:08 +02:00
MetalStormGhost
1a6d73f055 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-07-05 12:06:53 +03:00
MetalStormGhost
07cc85f6fa
Large aircraft ground spawns (#237)
* Large aircraft ground spawns

Added the ability to add separate ground spawns for C-130 and other large aircraft to campaigns. Implemented on @holyorangejuice 's request.

Large aircraft ground spawns are added to the campaign by placing a C-130 on the ramp, just like an A-10 or AJS37 previously. Note: use the stock DCS C-130, so the campaign miz can be safely opened without the C-130 mod (or any other mod) installed. Not the C-130J player-flyable transport, not the KC-130J tanker included in the UH-60L mod etc.

Large planes (wingspan more than 40 meters, such as the C-130):
- First try spawning on large ground spawns
- Then try the regular airfield ramp spawns

Below 40 meter wingspan aircraft:
- First try spawning on regular or roadbase ground spawns
- Then try the regular airfield ramp spawns
- Then, if both of the above fail, use the large ground spawns

* Specify explicit black version 23.9.1 to fix lint error.

* Update lint.yml

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-07-01 20:26:50 +00:00
MetalStormGhost
7eb2c59b86 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-06-09 20:25:55 +03:00
Starfire13
68bdb86c71
Add NASAMs to MERAD unit list for campaign template (#334) 2024-06-08 10:37:24 +02:00
MetalStormGhost
9775d3b97c Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-26 22:06:19 +03:00
Raffson
c09a5b68d5
Pydcs update for Phantom II
Save compat changes included
2024-05-24 21:30:48 +02:00
MetalStormGhost
c795ed01a0 Merge remote-tracking branch 'remotes/dcs-retribution/dcs-retribution/dev' into pretense-generator 2024-05-03 11:19:48 +03:00
Raffson
d2fd7bbb4e
Configurable carriers 2024-04-07 00:12:08 +02: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
Raffson
52b25821af
Introduce livery-sets on squadron level
Randomly chooses one of the liveries defined if present in the squadron's yaml, overrides entry for "livery" or whatever is chosen in the UI except liveries on flight-member level
2024-03-23 21:29:01 +01:00
Raffson
6ee74cf079
Support for inline factions in campaign's yaml 2024-03-22 22:50:55 +01:00
Raffson
7a94db5404
Remove redundant code 2024-02-04 20:35:36 +01:00
Raffson
62df761d9c
Rename faction.aircrafts -> faction.all_aircraft 2023-12-29 15:20:00 +01:00
Raffson
7baba78bca
Allow radio-presets to be defined in squadron files 2023-08-13 13:16:43 +02:00
Raffson
737df98988
Provide better feedback when declaring max-size without a value 2023-07-08 20:35:21 +02:00
Raffson
928a679e7d
Cleanup import 2023-06-25 01:17:04 +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
Raffson
45b8757593
Support for convoy "spawn-route" in campaign design
Resolves #91

'Assault On Damascus' was revamped using this new technique
2023-06-15 01:47:08 +02:00
Dan Albert
5c07a2556e
Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea,
but the old mode will probably go away.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
2023-05-14 20:56:58 +02:00
Dan Albert
f719e1cfe7
Add an option to prefer primary tasked aircraft.
We're still using mostly the same aircraft selection as we have before
we added squadrons: the closest aircraft is the best choice.

This adds an option to obey the primary task set by the campaign
designer (can be overridden by players), even if the squadron is farther
away than one that is capable of it as a secondary task.

I don't expect this option to live very long. I'm making it optional for
now to give people a chance to test it, but it'll either replace the old
selection strategy or will be removed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1892.
2023-05-14 20:33:55 +02:00
Raffson
5e2625ad21
Propagate changes from Liberation 2023-05-14 17:09:41 +02:00
Dan Albert
0b6575ca97
Use task priorities from aircraft yamls.
Preferred aircraft per task are now determined by a ranking of weights
stored in the aircraft yaml files. To aid in visualizing the priorities
across aircraft, Liberation can be run with the argument
dump-task-priorities to dump a yaml file in Saved
Games/DCS/Liberation/Debug/priorities.yaml, which will show each task
along with priority sorted aircraft and their weights.

The current weights in the data were exported from the existing lists,
where each position from the bottom of the list was worth 10 (to allow
some games for less shuffling later).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2809.
2023-05-14 14:50:30 +02:00
Dan Albert
9ebbe11d83
Add debug command to dump aircraft priorities.
https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-05-14 14:30:19 +02:00
Dan Albert
0697a0dd5b
Fix file encoding for some loads.
We've actually been pretty good at getting this right in most of the
code base, but we've missed it in a few places. Python defaults to the
encoding of the current locale unless otherwise specified, and for a US
English Windows install that's cp1252, not UTF-8. I'm not brave enough
to change the locale at startup because I don't know how that might
affect CJK encoding users (or for that matter, non-Latin derived
alphabet UTF-8 variants).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2786.
2023-05-07 19:31:20 +02:00
Dan Albert
4cf7864916
Improve logging in defaultsquadronassigner.py.
https://github.com/dcs-liberation/dcs_liberation/issues/2786
2023-05-07 19:30:44 +02:00
Raffson
5916ed43d2
Allow definition of settings in campaign's yaml file
Resolves #92
2023-04-08 19:51:38 +02:00
Raffson
ce7bd9def7
Fix edge-case bug in layout's group size 2023-04-01 17:44:50 +02:00
Raffson
d9967bda8f
Add logic for specification of ground_units in campaign yaml file
Resolves #22
2023-02-12 21:36:43 +01:00
Raffson
c622cacadc
Read campaigns from SavedGames/DCS/Retribution 2023-02-12 13:56:29 +01:00
Raffson
d410f9d3c4
Formatting... 2023-02-02 21:41:01 +01:00
Raffson
531625ff08
Designated CTLD zones for ControlPoints (AB/FOB/FARP)
Resolves #46
2023-01-21 00:24:42 +01:00
MetalStormGhost
3313535b27
Add fallback terrain icons in campaign selector (#80) 2023-01-14 14:33:05 +00:00
Raffson
650b06d7c8
Avoid random squadrons in config using livery overrides
Avoids choosing random squadrons during air wing configuration so that livery overrides takes precedence by default for a given aircraft type, unless the campaign file specifies a specific squadron. Users can still add a squadron manually which will automatically set the correct livery if they use a squadron preset.

Resolves #52
2022-12-27 21:51:13 +01:00
Raffson
a736bf9b09
"Optimize Imports" in game & qt-ui
Adjustments made by PyCharm
2022-10-24 18:54:41 +02:00
Dan Albert
7e8f734309
Load map icons directly from DCS.
If the user's DCS directory is not configured correctly this will
degrade by not showing an icon. Otherwise (and typically) we get nicer
looking icons for each theater, and we don't have to make these for each
new map.
2022-10-02 19:56:49 +02:00
Dan Albert
87375eb4b1
Clean up ConflictTheater constructor.
Now that all theaters are defined in YAML, we can lose some of the mess
in this class.
2022-09-17 14:35:05 +02:00
Dan Albert
c43d84bdae
Migrate Falklands to YAML.
All theaters are now moddable.
2022-09-17 14:35:04 +02:00
Dan Albert
ac0f24f94f
Migrate The Channel to YAML. 2022-09-17 14:35:04 +02:00
Dan Albert
1c66f18e3f
Migrate Normandy to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
ede1a8c567
Migrate Nevada to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
f08955ae53
Migrate Marianas to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
06652cd063
Migrate Syria to yaml. 2022-09-17 14:35:02 +02:00
Dan Albert
f3f067830f
Port Persian Gulf to yaml. 2022-09-17 14:35:02 +02:00
Dan Albert
401a0ae557
Make theater properties moddable.
Only the Caucasus has been migrated so far. Will follow up with the
others, and also will be adding beacon/airport data to this.
2022-09-17 14:35:01 +02:00