267 Commits

Author SHA1 Message Date
Dan Albert
e6b9a73d03 Improve AI air defense target prioritization.
Target the air defenses whose *threat ranges* come closest to friendly
bases rather than the closest sites themselves. In other words, the
SA-10 that is 5 miles behind the SA-6 will now be the priority.

This also treats EWRs a bit differently. If they are not protected by a
SAM their detection range will be used for determining their "threat"
range. Otherwise a heuristic is used to determine whether or not they
can be safely attacked without encroaching on the covering SAM.
2021-05-28 19:27:02 -07:00
Dan Albert
bc4a95d0a5 Un-WIP squadrons in the changelog.
This is feature complete.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 21:05:01 -07:00
Dan Albert
bcccb3206d Connect auto-ATO disable option.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/315
2021-05-27 15:43:47 -07:00
Dan Albert
4147d2f684 Initial squadrons implementation.
Doesn't actually do anything yet, but squadrons are created for each
aircraft type and pilots will be created as needed to fill flights.

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
4939faf5fa Schedule SEAD with a one minute lead time. 2021-05-25 22:53:57 -07:00
Dan Albert
d15bfaac76 Fix group targeting for multi-group TGOs.
AI flights were only getting a single Attack Group task against multi-
group TGOs (currently only a small group of SAMs like the SA-10, I
believe), so the AI would never attack the point defense SA-15 or AAA
groups.
2021-05-24 19:26:03 -07:00
Dan Albert
c255aee3b9 Make default AEW&C missions ASAP. 2021-05-24 17:21:33 -07:00
Dan Albert
e8f326ebce Update Skynet to 2.1.0. 2021-05-24 14:35:22 -07:00
Dan Albert
188f871bc8 Remove errant whitespace. 2021-05-23 15:01:10 -07:00
Dan Albert
31eba975fd Note flight planner changes.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1106
2021-05-23 15:00:27 -07:00
Dan Albert
69299d395c Empty gun for AI missions that do not need a gun.
There is no "all but gun" RTB winchester option, so air to ground
missions with mixed weapon types will insist on using all of their
bullets after running out of missiles and bombs. Take away their bullets
so they don't strafe a Tor.

Exceptions are made for player flights and for airframes where the gun
is essential like the A-10 or warbirds.
2021-05-22 16:14:20 -07:00
Dan Albert
b6154b273c Differentiate SEAD and SEAD escorts.
SEAD suppresses the package's target. SEAD escort protects the package
from any SAM threat along its flight path.
2021-05-22 14:24:13 -07:00
Dan Albert
664092c023 Remove non-CP FOBs. 2021-05-20 19:01:43 -07:00
Dan Albert
a382e74a89 Set up bullseye early, create waypoints.
Setting this up as part of the game makes it possible for us to show in
the UI.

https://github.com/dcs-liberation/dcs_liberation/issues/136
2021-05-20 18:29:35 -07:00
Dan Albert
102544877d Fix common cases of kneeboard overflow. 2021-05-20 16:57:35 -07:00
Dan Albert
2a77f57aa4 Improve AI strike targeting.
We were setting up all the correct *target* waypoints but the AI doesn't
use the target waypoints; they use the targets property of the ingress
waypoint. This meant that the flight plan looked correct in the UI and
was correct for players but the tasks were set up incorrectly for the AI
because building TGOs are aggravatingly multiple TGOs with the same name
in the implementation.

Mission targets now enumerate their own strike targets so that this
mistake is harder to make in the future.

This won't be perfect, the AI is still not able to parallelize tasks and
since buildings aren't groups they can only attack one structure at a
time, but they'll now at least switch to the next target after hitting
the first one.

As a bonus, stop bombing the dead buildings.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/235
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/244
2021-05-19 23:33:15 -07:00
Dan Albert
c5159f8a87 Fix swapped list order for purchase priorities.
We were accidentally iterating over the faction list and checking it
against the priority list rather than the other way around, so the
faction's aircraft list was being used for purchase priority rather than
the actual priority list in the game.
2021-05-18 19:54:39 -07:00
Dan Albert
a0d9bf0f26 Add Ju-88 to the CAS, strike, and DEAD lists.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1008
2021-05-18 19:51:27 -07:00
Dan Albert
cd391a360c Add support for AAA objectives.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/999
2021-05-18 17:29:42 -07:00
Dan Albert
739406614d Add support for required variants of all TGOs.
Adds required variants of:

* SHORADS
* Armor groups
* Buildings
* Oil rigs
* Coastal defenses
* Missile sites
* Ships

This is prep work for removing random generation.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1076
2021-05-18 00:48:12 -07:00
Dan Albert
d41e69d770 Add DCS loadout selector.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/273.
2021-05-17 01:24:55 -07:00
Dan Albert
5050914d25 Make the new UI the default. 2021-05-15 03:38:29 -07:00
Dan Albert
ff3b8e5270 Note scenery objective support in the changelog. 2021-05-14 17:19:49 -07:00
Dan Albert
92c404fbb6 Persist DCS configuration across installs. 2021-05-13 18:55:48 -07:00
Dan Albert
d9d68cd37c Add a new Leaflet based map UI.
This is extremely WIP. It is not usable for play yet. Enable with
`--new-map`.
2021-05-12 21:52:23 -07:00
Schneefl0cke
56abd0bb7f
Add option for setting desired mission length. 2021-05-11 03:13:15 -07:00
Dan Albert
58ffabe2d6 Fix aggressive objectives in Abu Dhabi.
Some of the objective locations for the starting front line are too
aggressive and put opfor at a disadvantage since blue ships might start
so close to their bases.
2021-05-07 19:37:25 -07:00
Dan Albert
2ca875192a Save budget for filling whole packages.
No sense filling airbases with cheap escorts if we'll never afford the
rest of the package. Filling the airbases with cheap escorts also makes
it impossible to buy the rest of the package when the faction eventually
does have the money since there's nowhere to park the needed aircraft.

https://github.com/dcs-liberation/dcs_liberation/issues/1058
2021-05-07 18:22:52 -07:00
Dan Albert
36b2f24de9 Skip planning for faction incompatible missions.
Required for improving purchasing as well, since we need to not halt
purchasing when a faction has no AEW&C aircraft.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/683
2021-05-07 18:22:52 -07:00
Dan Albert
2cf3b3be2b Fix bug causing overpurchase of aircraft.
After fulfilling a request we were not exiting the loop, so we'd fulfill
the request for the aircraft at _all_ the bases capable of operating it
until either the bases were full or the budget ran out. In factions like
Iraq 1991 this could cause the budget to be spent on tons of cheap
MiG-19s while never buying the more expensive Su-17s or Su-24s that they
need to actually complete a package.

https://github.com/dcs-liberation/dcs_liberation/issues/1058
2021-05-07 17:25:14 -07:00
Khopa
977845e2f4 Fixed links to github in the repo to account for the transfer to the new github organization. 2021-05-07 13:08:39 +02:00
Khopa
4bb2ab73c1 Changelog update 2021-05-07 13:03:15 +02:00
Dan Albert
b10e86e484 Add support for user faction directory.
This allows users to install custom factions to their home directory
rather than the Liberation install directory. Makes it easier to keep
mods across Liberation downloads, and easier for us devs to keep custom
factions without git always wanting us to add them.
2021-05-02 14:35:21 -07:00
Dan Albert
c245531d65 Update changelog for 2.5.1.
(cherry picked from commit 4555a4968d231a3a361a73ebc8729eeaf156d45b)
2021-05-02 13:18:21 -07:00
Dan Albert
5c0f6cf65e Flip default for factory feature flag.
This is feature complete, we have a handful of campaigns that work with
the new mode now and it will be the only option at some point.
2021-04-25 18:20:20 -07:00
Dan Albert
7e40d58d04 Add cargo ships to the sim, track kills.
Not targetable yet.

https://github.com/Khopa/dcs_liberation/issues/826
2021-04-25 14:12:59 -07:00
Dan Albert
45913b0add Bump to 3.0.
DCS version numbers and Liberation version numbers are getting
confusing. Push us ahead before we're both on 2.7.
2021-04-23 01:11:46 -07:00
Dan Albert
c258409a8d Add AI planning for airlifts.
Downside to the current implementation is that whether or not transports
that were purchased last turn will be available for airlift this turn is
arbitrary. This is because transfers are created at the same time as
units are delivered, and units are delivered in an arbitrary order per
CP. If the helicopters are delivered before the ground units they'll
have access to the transports, otherwise they'll be refunded. This will
be fixed later when I rework the transfer requests to not require
immediate fulfillment.

https://github.com/Khopa/dcs_liberation/issues/825
2021-04-23 01:10:03 -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
132ba905c7 Generalize commit range display for all patrols.
Fixes https://github.com/Khopa/dcs_liberation/issues/890
2021-04-22 17:55:14 -07:00
Dan Albert
208d1b82b5 Show BARCAP commit ranges by default.
BARCAP placement confuses a lot of people but this should make it more
clear.
2021-04-22 17:45:19 -07:00
Dan Albert
d4679e0029 Note the semi-completion of the factory feature.
https://github.com/Khopa/dcs_liberation/issues/986
2021-04-18 23:35:18 -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
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
3b72c13f9d Add ground unit transfers to the changelog.
Also documented the behavior on the wiki (link in the changelog).

This is currently fully functional for players, but since units can be
bought and sold at any base there's no real reason to use these yet.
Will follow up with making ground units only purchasable at bases with
factories (the UI will still allow the purchase directly at the base,
but it will automatically create the transfer order) so convoys end up
being used, and to make factories a more interesting strategic target.

https://github.com/Khopa/dcs_liberation/issues/824
2021-04-18 16:22:51 -07:00
Dan Albert
b65d178cf1 Move develop to 2.6. 2021-04-18 15:57:18 -07:00
Dan Albert
157a59e3c4 Fix UI crash when unchecking default loadout.
This was throwing because it was being called with the wrong number of
arguments, preventing the UI from actually updating back to the default.
2021-04-18 13:05:22 -07:00
Dan Albert
9c359efbff Note Litening -> ATFLIR change. 2021-04-17 16:03:56 -07:00
Khopa
9324e549e6 Updated changelog 2021-04-18 00:13:43 +02:00