1001 Commits

Author SHA1 Message Date
Dan Albert
26cd2d3fef Add todo for transfer refactor. 2021-04-22 22:24:57 -07:00
Dan Albert
4069074f41 Move unit delivery out of an unrelated file.
Historically this inherited from Event but there was no reason for that.
That's gone now. Finish the separation and move the unit order tracking
class out of the combat results reaction class's file.
2021-04-22 22:15:45 -07:00
Dan Albert
182422249f Remove support for mizdata/random locations.
The introduction of factories broke every existing campaign so we don't
need to keep support for the ancient formats any more.
2021-04-22 22:12:52 -07:00
Dan Albert
29b70b3247 Track airlift cargo kills.
https://github.com/Khopa/dcs_liberation/issues/825
2021-04-22 19:22:41 -07:00
Dan Albert
e474748f4d Stop projecting threat zones from front lines.
This is an interim improvement since we should probably be pushing the
BARCAPs into TARCAP roles when the front line is so close. This does
regress flight pathing for anything that should route around the front
(to avoid getting shot at by SHORADS and TARCAPs), but for now it's one
or the other and this is the one everyone's complaining about.
2021-04-22 18:20:26 -07:00
Dan Albert
481f195725 Airlift support.
UI isn't finished. Bulk transfers where the player doesn't care what
aircraft get used work (though they're chosen with no thought at all),
but being able to plan your own airlift flight isn't here yet.

Cargo planes are not implemented yet.

No way to view the cargo of a flight (will come with the cargo flight
planning UI).

The airlift flight/package creation should probably be moved out of the
UI and into the game code.

AI doesn't use these yet.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-22 00:30:18 -07:00
Dan Albert
489b4d6acf Add AI convoy attack planning.
Like the comment says this rarely has any effect due to the ordering of
flight planning and convoy creation. Could be separated, but opfor will
still not be able to target any convoys that the player creates in the
UI on that turn because they planning is done before the player can use
the UI.

Multi-turn transfers will be targetable, however.
2021-04-20 22:56:53 -07:00
Dan Albert
6cffc47f3c Clean up convoy code. 2021-04-20 22:21:42 -07:00
Dan Albert
50d8e08a34 Redo convoy attack flight plans.
The previous flight plan only makes sense if the convoy will make it a
significant distance from its starting point. At road speeds over the
typical mission duration this is not true, so we can actually plan this
as if it was a strike mission near the origin point and that's close
enough.

There's some cleanup work to do here that I've added todos for.

Fixes https://github.com/Khopa/dcs_liberation/issues/996
2021-04-20 22:04:57 -07:00
Dan Albert
3f16c0378a Add BAI planning against supply routes.
This currently is only supported for player flights. I have no idea how
to create an AI flight plan that won't just get them killed. AI-only BAI
missions against supply routes will warn the player on mission creation.
2021-04-19 23:09:39 -07:00
Dan Albert
2a5b37b9ad Show convoys on the map. 2021-04-19 20:37:15 -07:00
Dan Albert
cabbd234af Fix incorrect docs. 2021-04-19 20:24:20 -07:00
Dan Albert
81d5cddac9 Remove weird single-CP supply route edge case.
A CP with a factory would be able to supply itself, but was not in a
supply route if it was the only connected friendly CP. When the player
starts with only one base against an enemy base this meant that it was
in no supply route, causing it to not be a recruitment location or a
place to buy more than a reserve of vehicles automatically.
2021-04-19 17:15:41 -07:00
Dan Albert
bb3e83548c Remove support for old-style campaigns.
These won't work any more since they won't be able to define factories
or supply routes. They were made obsolete ages ago, so just remove them.
2021-04-19 01:54:16 -07:00
Dan Albert
30bf4542f0 Special case turn 0 for recruitment.
We want there to be units on the front line on turn 1 regardless of
factory locations, so bypass the recruitment restrictions on turn 0.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-19 00:03:47 -07:00
Dan Albert
d11c9a4615 Use convoy spawn points defined by the campaign.
The start/end points of the waypoints that define the course of the
front line also define the spawn points for convoys. Use them.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 23:57:13 -07:00
Dan Albert
df98e1f8ac Fix campaign format version.
Updatd the comment but forgot to update the number...
2021-04-18 23:25:44 -07:00
Dan Albert
56fc2986e9 Automate transfers from factories.
The purchase system will seek out a source for its units when the
purchase is completed. If no source is available the order will be
refunded. Orders with no source available are prevented, so this only
happens when the source was cut off from the destination during the
turn.

There's still some funkiness going on with the first turn (but possibly
only when the first turn includes a cheat to capture) where the AI buys
a ton of units somewhere other than the front line. First turn behavior
should probably be different anyway, with the first turn allowing
purchases anywhere to avoid empty front lines while troops reinforce if
the front line isn't a factory.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
627f18c42b Require factories for purchasing ground units.
https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
67b341cbd6 Add feature flag for new ground unit recruitment.
This is going to render most campaigns unusable because they won't have
any places to spawn ground units, so flagging off for now.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
eff5b94db7 Add factory placement to the campaign files.
This also removes the "factory" type from the normal strike target
(money generating) generators to avoid confusion. Later only control
points with factories will be able to spawn ground units, at which point
these will no longer generate income.

https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:22:30 -07:00
Dan Albert
c92e4e06cc Move campaign format version to a stable location. 2021-04-18 17:37:55 -07:00
Dan Albert
39135f8c80 Add version field to campaign descriptor file.
This is used to provide a UI hint to guide players towards campaigns
that have been updated to work with the current version of the game.
All the campaigns we currently have were made for an unknown version of
the game, so they're all flagged as incompatible.

The version field is not the DCS Liberation version number because the
campaign format may change multiple times during development. Instead
the version number is a monotonically increasing integer that we
increment whenever a game change requires campaign updates.
2021-04-18 17:30:49 -07:00
Dan Albert
5e054cfc77 Disallow selling ground units.
Ground units should be transferred to a new location, not sold and
repurchased.

https://github.com/Khopa/dcs_liberation/issues/823
2021-04-18 16:32:02 -07:00
Dan Albert
65ed110ab7 Track convoy kills.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
5dd7ea3060 Spawn convoys for transfers.
Destroying these units currently has no effect.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
bd9cbf5e3b Move transfers one CP per turn.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
65f6a4eddd Restrict transfers to connected bases.
https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 15:59:15 -07:00
Dan Albert
e9ff554f39 Basic implementation of road based transfers.
This adds the models and UIs for creating ground unit transfer orders.
Most of the feature is still missing:

* The AI doesn't do them.
* Transfers can move across the whole map in one turn.
* Transfers between disconnected bases are allowed.
* Transfers are not modeled in the simulation, so they can't be
  interdicted.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 15:59:15 -07:00
Dan Albert
b65d178cf1 Move develop to 2.6. 2021-04-18 15:57:18 -07:00
Dan Albert
38f632097e Add support for DCS 2.7 weather generation.
https://github.com/Khopa/dcs_liberation/issues/981
2021-04-17 15:06:17 -07:00
Khopa
c2ce3a6992 Fixed Lint issue 2021-04-17 13:11:26 +02:00
Khopa
b61d15fdf4 Unit support : Added support for the PLZ-05, new artillery unit from the Chinese Asset Pack 2021-04-17 11:28:36 +02:00
Khopa
ad5cc83fb3 Unit support : now using the new unit S-60 57mm AA Gun units. 2021-04-17 11:23:00 +02:00
Ronny Röhricht
2f53edd775
Add plugin for exporting RED and BLUE threat circles to LotATC.
Implemented as a plugin because LotATC needs actual lat/lon, and the only APIs for those are in lua.

Fixes https://github.com/Khopa/dcs_liberation/issues/956.
2021-04-17 00:55:06 -07:00
Khopa
a30d9276b8 Merge remote-tracking branch 'khopa/develop' into develop 2021-04-17 02:22:56 +02:00
Khopa
8091051bb4 Fixed weapons names in pdcs extensions, removed deprecated rafale mod, fixed many other compilation issues with pydcs 2.7+ 2021-04-17 02:13:52 +02:00
Khopa
1e468cd3e0 Fixed weapons fallback db names with new pydcs version 2021-04-17 01:23:08 +02:00
Khopa
15d2a5bb2b Updated units name in liberation 2021-04-16 23:33:22 +02:00
SnappyComebacks
52ce1a5959
Add support for additional EWR sites in campaigns.
* A Bluefor EWR 55GS in the campaign miz defines an optional EWR site. There is no distinction between how close or far it is to a base, so it's possible that there will be many EWRs within an airbase.
* A Redfor EWR 1L13 in the campaign miz defines a required EWR site.

It would be a good future idea to limit the amount of EWRs within a certain distance from an airbase. That way there's no chance of 5 EWRs all at the same airbase. Even better if there were something preventing any two EWRs from being right next to each other.

No campaigns take advantage of this yet.

Fixes https://github.com/Khopa/dcs_liberation/issues/524
2021-04-15 21:23:27 -07:00
Khopa
7ce05762f5 Possible to add additional helipad to any control point in campaign file. (WIP) 2021-04-14 00:00:25 +02:00
Dan Albert
8ca68b3d7a Set win/loss status for functioning airfields.
"Fixes" https://github.com/Khopa/dcs_liberation/issues/833. The crash is
still present, but we're at least telling the player that the game is
over so they shouldn't try to play. The UX for this sucks
(https://github.com/Khopa/dcs_liberation/issues/978), but it's the same
as other end-game states.
2021-04-10 15:44:57 -07:00
Dan Albert
ab746b5195 Fix date given to the conditions generator.
`Game.date` is actually the start date, not the current date. Not renaming to
avoid breaking save compat.

This fix won't have any effect on existing saves until they pass the turn
because this is encoded into the conditions generated at the start of the turn,
but it will fix on the next turn.

Fixes https://github.com/Khopa/dcs_liberation/issues/973
2021-04-10 15:20:54 -07:00
Khopa
f363d66aac F_86F Sabre payloads can now be customized. 2021-03-31 00:17:21 +02:00
Khopa
2b44b2fc0b Ran formatter to fix lint issue 2021-03-29 23:53:09 +02:00
C. Perreau
25986aa15c
Merge pull request #928 from Mustang-25/patch-1
Add GAR-8 restriction date and fallback info
2021-03-29 23:51:21 +02:00
GvonH
49e729e9ec
Add dark kneeboard option for night missions (#951) 2021-03-22 19:41:54 -07:00
Khopa
5bd4c00257 Merge branch 'develop_2_4_x' into develop
# Conflicts:
#	changelog.md
#	game/db.py
#	game/navmesh.py
#	game/operation/operation.py
#	game/theater/conflicttheater.py
#	game/theater/controlpoint.py
#	game/theater/start_generator.py
#	game/theater/theatergroundobject.py
#	game/threatzones.py
#	game/version.py
#	gen/aircraft.py
#	gen/airsupportgen.py
#	gen/fleet/carrier_group.py
#	gen/flights/ai_flight_planner.py
#	gen/flights/ai_flight_planner_db.py
#	gen/flights/flightplan.py
#	gen/flights/waypointbuilder.py
#	gen/groundobjectsgen.py
#	gen/kneeboard.py
#	pydcs
#	pydcs_extensions/f22a/f22a.py
#	qt_ui/uiconstants.py
#	qt_ui/widgets/combos/QAircraftTypeSelector.py
#	qt_ui/widgets/map/QLiberationMap.py
#	qt_ui/windows/QUnitInfoWindow.py
#	qt_ui/windows/mission/flight/payload/QPylonEditor.py
#	qt_ui/windows/settings/QSettingsWindow.py
2021-03-21 18:50:50 +01:00
Simon Krüger
260358c5fb
AEW&C kneeboard + actually do AEW&C (#922)
* AEW&C will now do AEW&C
* AEW&C gets a frequency
* AEW&C is added to kneeboard (Frequency, Depature, Depature Time, Arrival Time)
2021-03-13 14:07:19 -08:00
Dan Albert
0f07b2c095 Increase size of navmesh to avoid planning issues.
The tradeoff is that any flights that might have previously routed
_around_ a threat near the edge of the map may no longer do so as the
zones at the edge are significantly larger now.

Fixes https://github.com/Khopa/dcs_liberation/issues/903
2021-03-13 13:41:57 -08:00