634 Commits

Author SHA1 Message Date
Dan Albert
c45ac50370 Make overfull airbase display scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2974.
2023-06-08 04:59:34 +00:00
Dan Albert
4fd2bb131b Warn for new squadron rules with old campaigns.
It's not feasible to actually check the parking limits because we can't
identify parking limits for carriers until the theater is populated.
Doing so is expensive (and depends on other NGW inputs). Instead,
compare against the version of the campaign and guess.

A new (minor) campaign version has been introduced which makes this
required to improve the UI hint. Campaigns that are compatible with the
new rules should update their version to advertise support.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2909.
2023-06-03 21:32:42 +00:00
Dan Albert
42a7102948 Disallow air wing generation with overfull bases.
This also changes the window close button of the air wing configuration
dialog to cancel rather than revert and continue, because otherwise
there's no way for the user to back out of the dialog without fixing all
the overfull bases first.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2910.
2023-06-03 20:55:23 +00:00
Dan Albert
cb61dfccc4 Show parking capacities in air wing config.
This does show the theoretical parking use of full squadrons even when
the new rules are not enabled. Since limits can be enabled manually
later in the game, it's still useful information, even if it's a bit
misleading.

https://github.com/dcs-liberation/dcs_liberation/issues/2910
2023-06-03 19:31:35 +00:00
Dan Albert
90bda9383d Add missing note about 7.0.0 -> 7.1.0 save compat. 2023-05-31 00:17:02 -07:00
Dan Albert
7798e2970c Minor campaign version bump for Normandy 2.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2804.
2023-05-30 23:49:42 -07:00
Dan Albert
fe96a415be Add settings for battlefield commander slots.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2235.
2023-05-30 22:06:47 -07:00
Dan Albert
6699289bf7 Add performance option to prevent missile tasks.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2508.
2023-05-30 21:47:16 -07:00
Dan Albert
a85d3243fb Add changelog note for BAI fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2922.
2023-05-30 21:12:45 -07:00
Dan Albert
7f2607cf08 Replace more Patriot STRs with real EWRs.
Not all of these nations actually field this radar (according to
Wikipedia), but at least it's a real EWR, and it's the only blue one
we've got.
2023-05-30 21:05:15 -07:00
Dan Albert
257dabe4fa Fix formatting of takeoff time. 2023-05-25 22:35:50 -07:00
Dan Albert
406fb61fa4 Add UI for TOT offset adjustment.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2912.
2023-05-25 22:35:50 -07:00
Dan Albert
ced93afd49 Update bug templates now that 7.0.0 is out. 2023-05-25 21:10:21 -07:00
Dan Albert
24e72475b4 Checkpoint game before sim, auto-revert on abort.
An alternative to
https://github.com/dcs-liberation/dcs_liberation/pull/2891 that I ended
up liking much better (I had assumed some part of the UI would fail or
at least look terrible with this approach, but it seems to work quite
well).

On by default now since it's far less frightening than the previous
thing.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2735.
2023-05-19 17:44:18 -07:00
Dan Albert
4b4c45e90f Attempt to reset the simulation on abort.
This is optional because I really don't know if I trust it. I don't see
much wrong with it (aside from the warning about not using it with auto-
resolve, because it won't restore lost aircraft), but it's really not
something I'd built for since it's not going to be possible as the RTS
features grow.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2735.
2023-05-19 01:05:25 -07:00
Dan Albert
92c3087187 Advance develop to 8.0.0-preview. 2023-05-18 22:44:39 -07:00
Dan Albert
800ca598ef Add missing changlog note for C-47.
https://github.com/dcs-liberation/dcs_liberation/pull/2812
2023-05-18 21:38:08 -07:00
Dan Albert
212813e31d Update pydcs.
Support for DCS 2.8.5.40170, including laser hellfire, pylon 5 for the
apache, and a more tolerant livery scanner (not all liveries will be
discovered, but Liberation at least won't crash).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2880.
2023-05-18 21:30:18 -07:00
Dan Albert
23982fdac6 Add changelog note for pydcs livery scanner crash fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2747.
2023-05-16 21:28:29 -07:00
Dan Albert
8724b458a8 Add changelog note for TALD overfly fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2781
2023-05-16 20:56:33 -07:00
Dan Albert
ef64899701 Add changelog note for "recreate as" fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2779
2023-05-16 20:56:33 -07:00
Dan Albert
51e4dc5c22 Add changelog note for fixed recovery tanker tasks.
https://github.com/dcs-liberation/dcs_liberation/issues/2771
2023-05-16 20:56:33 -07:00
Dan Albert
ac5edeb936 Add changelog note for improved dead event handling.
https://github.com/dcs-liberation/dcs_liberation/issues/2765
2023-05-16 20:56:33 -07:00
Dan Albert
f7364d04ed Add changelog note for air wing reset fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2751
2023-05-16 20:56:33 -07:00
Dan Albert
483bf73213 Add changelog note for BAI planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2618
2023-05-16 20:56:33 -07:00
Dan Albert
0b87f90d4f Add changelog note for built-in TGP fix. 2023-05-16 20:56:33 -07:00
Dan Albert
202fe1109b Add changelog note for AEW&C planning fix.
https://github.com/dcs-liberation/dcs_liberation/issues/2048
2023-05-16 20:56:33 -07:00
Dan Albert
5a8863b07e Add changelog note for TALD fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2780.
2023-05-16 20:56:33 -07:00
Dan Albert
a8b7aca4fb Make wind speed moddable.
These should probably be overridable per theater and per season, but
even with that we'll want some defaults.

https://github.com/dcs-liberation/dcs_liberation/issues/2862
2023-05-16 00:52:51 -07:00
Dan Albert
78e2da9196 Use weibull distribution for wind generation.
Wind speeds should not be uniformly distributed. This switches to a
Weibull distribution which allegedly (see the bug) is good enough.
Experimentally that seems true as well, though I know nothing about how
wind works irl. This at least looks like it'll generate reasonable
variation in missions while keeping the 1st through 3rd quartile
behaviors from getting out of hand.

I'm very uncertain about the scaling factor aspect of this. Naively the
wind speeds at different altitudes ought to be somewhat correlated, but
I'm not sure how much, and whether this kind of scaling is at all the
right way to do it. As before, meh, close enough?

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2861.
2023-05-15 21:37:43 -07:00
Dan Albert
03671bbfb0 Allow manual SAM orientation.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2479.
2023-05-13 17:20:03 -07:00
Dan Albert
a6c5b03212 Do not create refueling tasks without tankers.
If the package does not have a tanker, the refueling task will cause AI
flights to go to an arbitrary tanker, which may cause them to fly
through enemy territory or even go farther than their arrival airbase.

It's also not remotely possible for every AI flight in the game to
refuel in most missions. There's typically one tanker and dozens of
aircraft that would previously attempt to refuel.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2716.
2023-05-13 16:23:31 -07:00
Dan Albert
4f7932ad8a Remove old aircraft selection mode.
New mode seems to be working well.
2023-05-13 12:47:51 -07:00
Dan Albert
8158cc7112 Add livery selection dropdown to air wing config.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1861.
2023-05-13 12:33:02 -07:00
Dan Albert
004594639e Update pydcs.
Includes the rewritten livery scanning code. It might need some more
tweaks to be fast enough, but it at least now doesn't spam the log for
machines that don't have DCS (or Liberation) installed, and it's not
slow until something tries to use it, so until we add the UI we won't
have to pay for it during startup.
2023-05-12 18:10:11 -07:00
Dan Albert
15fa73a514 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-05 18:16:42 -07:00
Dan Albert
7f94b34277 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-04 23:08:11 -07:00
Dan Albert
e444761059 Support replacing squadrons in-place. 2023-05-04 20:44:27 -07:00
Dan Albert
76e6aff9d7 Ignore parse errors of preferences file.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2613.
2023-05-02 00:39:18 -07:00
Dan Albert
cce9592ac8 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-04-26 23:26:23 -07:00
Dan Albert
cf47dd82d7 Remember player preferences for plugins. 2023-04-26 00:24:46 -07:00
Dan Albert
081c97583b Add a plugins page to the NGW. 2023-04-26 00:07:36 -07:00
Dan Albert
e2c6d6788c Persist some campaign creation options.
We should also persist mod options, but those will go in a separate file
because they aren't a part of Settings.

Plugins need some work before that can be saved here. They're not
configurable in the NGW currently, so that needs to be fixed first. It
also appears that it may not be safe to inject the settings object with
plugin options until the game is created, but that needs more
investigation (see the comment in Settings.save_player_settings).

Another obvious candidate would be the desired player mission duration,
but we need to implement custom serialization for that first.
2023-04-24 22:49:30 -07:00
Dan Albert
94b8aa7213 Disallow squadrons from disabling mission types.
After this change, players will always have the final say in what
missions a squadron can be assigned to. Squadrons are not able to
influence the default auto-assignable missions either because that
property is always overridden by the campaign's air wing configuration
(the primary and secondary task properties). The `mission-types` field
of the squadron definition has been removed since it is no longer
capable of influencing anything. I haven't bothered cleaning up the now
useless data in all the existing squadrons though.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2785.
2023-04-18 11:35:41 -07:00
Dan Albert
1ac36d03da Allow in-line definitions of campaign factions.
A lot of campaigns want to define custom factions. This allows them to
do so without us having to fill the built-in factions list with a bunch
of campaign-specific factions. It also makes custom campaigns more
portable as they don't need to also distribute the custom faction files.
2023-04-17 23:52:25 -07:00
Dan Albert
652e7d8d7b Allow factions to use YAML.
Comments! No more failures because you accidentally used a trailing
comma!

JSON still supported since it's basically free, but we should probably
remove that in 8 just so the docs can be less confusing for users who
will be confused if only one format is documented (and we definitely
won't maintain duplicate docs).
2023-04-17 22:40:02 -07:00
Dan Albert
4e067eaaa8 Remove GroundPlanners from the save state.
These are only used during mission generation. Remove them from the save
state to reduce compatibility requirements. We also have at least one
report of this data being corrupted... somehow. I don't know how that
could have happened, but if there's no data to corrupt in the first
place that's not a problem. If the corruption _does_ recur, it'll be
much easier to repro if it corrupts during mission generation rather
than during turn initialization.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2729.
2023-04-15 14:27:20 -07:00
Dan Albert
dd9ad2f0be Update pydcs for the plane helipad spawning fix.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2782.
2023-04-15 13:47:24 -07:00
Dan Albert
99ea06c0d5 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-04-15 13:27:08 -07:00
Dan Albert
af2e195f90 Update pydcs to fix Falklands airport data.
The Falklands data in pydcs was missing an (unfinished, unusable)
airport, and that was breaking miz loading of campaigns that were edited
or created with a version of DCS to include these airports which have
incomplete data.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2732.
2023-03-30 17:26:05 -07:00