dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
712 stars 185 forks source link

Auto-generate squadrons for all aircraft in faction #1741

Closed Chomper64 closed 2 years ago

Chomper64 commented 2 years ago

Is your feature request related to a problem? Please describe. The new Squadron system increases complexity when customizing campaigns, providing a highger barrier of entry. Instead of creating a single file listing all units wanted, now a campaign and possible some squadron files have to be created in addition to the faction.

Furthermore, the new system results in confusion for end-users when selecting more exotic combinations, like black sea and Allies 1944 (free). None of the squadrons of the faction are listed in the campaign and the faction does not specify a squadron for each aircraft type, as it is missing USA-sided Spitfire squadrons for example. This results in Spitfires not being available even though they are clearly listed by the UI as "Available Aircrafts" in the faction selection, confusing users, which do not know that the faction is not the only element defining available aircraft. This breaks user expectations.

Describe the solution you'd like Add a checkbox "Auto-generate Squadrons" which results in a single squadron being generated for each aircraft type in the faction. This could (theoretically) be achieved by using the already existing squadron generation , iterating over each aircraft type from the faction during campaign generation. (Maybe replacing the call to "load_air_wing_config" in the QNewGameWizard?)

Auto generated squadrons should be allocated to the starting airbase of the faction and can then be moved to the preferred location via the Squadron UI already present.

Additional context The addition of squadron creation to the UI would break existing standards, as campaign and faction generation do not posess a wizard. I'd also expect that creating a custom UI to create new squadrons requires more work, but could benefit from the described solution.

I do not like the way custom campaigns need to be configured due to the squadrons-feature. The solution spreads information about available aircraft to three locations (campaign, faction and squadrons-folder). This is quite the confusing break from the previous single-location approach (factions). However, a removal of squadrons would be a step back. The proposed approach would ease the birthing pains of the new system.

Adding a Squadron for each possible combination of faction and aircraft (including AI units) would also simplify creation of custom campaigns. I would also estimate this as an infeasible task for the development team.

Regarding the management of user expectations when creating a campaign: An alternative would be to only include campaigns that explicitly state which aircraft are availble when selecting a faction, which is not feasible due to the high amount of possible combinations.

DanAlbert commented 2 years ago

This will not work with the direction the game is going. With https://github.com/dcs-liberation/dcs_liberation/issues/1583, there isn't going to be enough parking for every aircraft.

Chomper64 commented 2 years ago

Wouldn't that also mean that campaigns utilizing the joint task force factions to their full extent would also break, since there is not enough parking? If not, can't the amount of aircraft just be limited to fit the restrictions? What happens to other auto-generated squadrons (i.e. those generated from specifying aircraft in the campaign)?

I see this as a more general issue, since control over available units is split to three files without any automatic checks.

The new system has multiplied the effort to add units to campaigns massively, raising design questions. Why do campaigns control available aircraft instead of factions? Especially since the new system leads to confusing results when not using default/recommended factions.

One could also remove the squadron reference from the campaign and place it in the faction instead.

DanAlbert commented 2 years ago

Why do campaigns control available aircraft instead of factions?

Because they have to go somewhere, and the campaign designer needs to decide where they go. Later the campaign designer will need to decide how many go somewhere to avoid overfilling airfields.

DanAlbert commented 2 years ago

Furthermore, the new system results in confusion for end-users when selecting more exotic combinations, like black sea and Allies 1944 (free). None of the squadrons of the faction are listed in the campaign and the faction does not specify a squadron for each aircraft type, as it is missing USA-sided Spitfire squadrons for example.

I tried that combination and I see squadrons: image

And from the log, the only things not generated are:

2021-11-14 16:45:52,203 :: INFO :: Allies 1944 (Free) has no aircraft compatible with Transport at Senaki-Kolkhi
2021-11-14 16:45:52,204 :: INFO :: Allies 1944 (Free) has no aircraft compatible with SEAD at Kobuleti
2021-11-14 16:45:52,207 :: INFO :: Allies 1944 (Free) has no aircraft compatible with AEW&C at Kutaisi
2021-11-14 16:45:52,207 :: INFO :: Allies 1944 (Free) has no aircraft compatible with Refueling at Kutaisi
2021-11-14 16:45:52,207 :: INFO :: Allies 1944 (Free) has no aircraft compatible with Transport at Kutaisi

Nothing is missing aside from the squadrons that the faction is incapable of fielding.

It sounds like you're trying to file a bug rather than an FR. If you're seeing something that is behaving contrary to the documentation, file a bug using the bug report template so there's something for us to investigate.

DanAlbert commented 2 years ago

The solution spreads information about available aircraft to three locations (campaign, faction and squadrons-folder)

You misunderstand. The three of those encode different information.

An alternative would be to only include campaigns that explicitly state which aircraft are availble when selecting a faction

All (up to date) campaigns are compatible with all factions.

Chomper64 commented 2 years ago

Regarding the missing Spitfires, I'm on current release and when i try: Screenshot 2021-11-15 093521

I end up with: Screenshot 2021-11-15 094227

The log contains two copies of:

2021-11-15 09:35:32,390 :: ERROR :: Squadron has mission type Intercept but Spitfire LF Mk IX is not capable of that task: 
resources\squadrons\SpitfireLFMkIX\no_145_squadron_raf.yaml

2021-11-15 09:35:32,391 :: DEBUG :: Not using squadron for non-matching country (is UK, need Third Reich: resources\squadrons\SpitfireLFMkIX\no_145_squadron_raf.yaml

2021-11-15 09:35:32,392 :: ERROR :: Unplannable flight type: Intercept

2021-11-15 09:35:32,393 :: ERROR :: Unplannable flight type: Ferry

2021-11-15 09:35:32,393 :: ERROR :: Squadron has mission type Intercept but Spitfire LF Mk IX is not capable of that task: resources\squadrons\SpitfireLFMkIX\no_16_squadron_raf.yaml

2021-11-15 09:35:32,393 :: DEBUG :: Not using squadron for non-matching country (is UK, need Third Reich: resources\squadrons\SpitfireLFMkIX\no_16_squadron_raf.yaml

2021-11-15 09:35:32,395 :: ERROR :: Unplannable flight type: Intercept

2021-11-15 09:35:32,396 :: ERROR :: Unplannable flight type: Ferry

2021-11-15 09:35:32,396 :: ERROR :: Squadron has mission type Intercept but Spitfire LF Mk IX (Clipped Wings) is not capable of that task: resources\squadrons\SpitfireLFMkIXCW\no_126_squadron_raf.yaml

2021-11-15 09:35:32,396 :: DEBUG :: Not using squadron for non-matching country (is UK, need Third Reich: resources\squadrons\SpitfireLFMkIXCW\no_126_squadron_raf.yaml

2021-11-15 09:35:32,397 :: ERROR :: Unplannable flight type: Intercept

No changes to files. I'll assume this isn't intended then. Issue #1744 is to be ignored in this case? How do I know when I run into a bug if I don't know which aircraft are supposed to be available so I can report it?

You misunderstand. The three of those encode different information.

I might have not made the problem clear I see clear enough.

To find out which aircraft are available in a campaign one now has to calculcate the set intersection between at least the campaign file and the faction file, since the faction no longer defines "all this can be used out of the box" but "the campaign designer chooses from these, check the campaign file", while the campaign defines "If your faction has these, you get them". If the campaign uses Squadrons instead of Aircraft-Type-Placeholders, the squadron files also have to be checked to find out the aircraft type for the squadron, before the faction using the aircraft type can be found. This process was extremely more easy in previous versions, as it was just the faction which defines the available aircraft.

The GUI does not make that distinction clear enough. It lists "available aircraft" which - to make things worse - in previous versions meant "you get to play with this and they get to play with that". Now, as issue #1744 explains this is no longer the case. To find out what is available either the campaign file or the Air Wing Configuration need to be considered. In the new system it no longer means "available to the user" but "available to the campaign creator".

All (up to date) campaigns are compatible with all factions.

Yes, but you do not get to fly all aircraft listed in the factions and there is no way to know before the Air Wing Configuration menu, which is not able to add squadrons for missing aircraft. Issue #1744 indicates this.

With #1583, there isn't going to be enough parking for every aircraft.

With the new campaigns there seems to be an "out of current terain" kind of base (e.g. "Middle East" in the "Black Sea" campaign), which have 1000 parking spots. Surely that is enough? Or will these be removed again?

It sounds like you're trying to file a bug rather than an FR.

I'm not trying to get that singular instance of missing spitfires fixed, but to get a solution that makes using DCS Liberation with the aircraft of choice easier. Currently the system seems to be so confusing that it needs multiple Wiki pages, reddit posts and an FAQ-Issue to explain it to users, this surely is not optimal.

DanAlbert commented 2 years ago

I'll assume this isn't intended then. Issue #1744 is to be ignored in this case?

I don't see anything that would lead me to believe this is a bug. The errors about intercept/ferry can be ignored (intercept isn't actually a valid mission type, but those are specified by most squadrons for future proofing; I'm not really sure why it's talking about ferry but I don't think it's harmful either).

2021-11-15 09:35:32,393 :: ERROR :: Squadron has mission type Intercept but Spitfire LF Mk IX is not capable of that task: resources\squadrons\SpitfireLFMkIX\no_16_squadron_raf.yaml

That one looks interesting, but I checked to be sure and when that happens the incompatible mission type is just removed from the list. It doesn't prevent the airframe from being used.

2021-11-15 09:35:32,396 :: DEBUG :: Not using squadron for non-matching country (is UK, need Third Reich: resources\squadrons\SpitfireLFMkIXCW\no_126_squadron_raf.yaml

And that one is because those logs are from the opfor air wing generation, and Germany doesn't get to use the UK squadrons.

How do I know when I run into a bug if I don't know which aircraft are supposed to be available so I can report it? To find out which aircraft are available in a campaign one now has to...

I agree the UI doesn't do much to help here. Eventually the air wing config will let you add/remove/change aircraft, which makes it a non-issue. Until that's done you have all the same control that the future UI would afford by editing the campaign YAML.

In the new system it no longer means "available to the user" but "available to the campaign creator".

Correct. I've already submitted a change to improve the description in the wizard but since I can't change the bits you've already downloaded, 5.0.0 is what it is.

image

With the new campaigns there seems to be an "out of current terain" kind of base (e.g. "Middle East" in the "Black Sea" campaign), which have 1000 parking spots. Surely that is enough? Or will these be removed again?

I'd considered that but very few campaigns include these. They've been a feature for ages and afaik I'm the only one that has ever included them. Most designers seem to not like them, so it's not a solution.

I also suspect you don't want a campaign with 660 aircraft in it at game start. If we generate 12 aircraft squadrons for every aircraft available to the faction, that's what you'd get with bluefor modern vs russia 2010, and that's assuming you're fine with a 12 aircraft limit for every type. That's ~50% larger than a high end estimate for even Black Sea (38 squadrons * 12 aircraft per squadron for 456 total), which is one of the larger campaigns, and when the time comes I don't plan on making all of those squadrons 12 aircraft squadrons anyway.

I'm not trying to get that singular instance of missing spitfires fixed, but to get a solution that makes using DCS Liberation with the aircraft of choice easier. Currently the system seems to be so confusing that it needs multiple Wiki pages, reddit posts and an FAQ-Issue to explain it to users, this surely is not optimal.

Anyone coming to a new version of the game without reading about the updates expecting it to behave exactly as the old one did is of course going to be confused. It's a change to a core game system. The UI around it has rough edges and the tutorial is perpetually out of date, but keep in mind that this project is 100% volunteer effort. It's enough work for most of us to do the coding to make this possible with our nights and weekends, and that means that things are not always going to ship with perfect UIs and docs.

The answer to this is of course a better UI, but without volunteers to do that work the work doesn't get done. I'd be more than happy to review a PR adding the add/remove squadron buttons (or airframe change option) to the air wing config menu.

Chomper64 commented 2 years ago

Correct. I've already submitted a change to improve the description in the wizard but since I can't change the bits you've already downloaded, 5.0.0 is what it is.

I'm not really sure if this is truly a fix to the underlying problem.

Anyone coming to a new version of the game without reading about the updates expecting it to behave exactly as the old one did is of course going to be confused.

Yeah, but adding FAQ Issues isn't really a solution from my point of view. A well designed UI should be the solution.

The answer to this is of course a better UI, but without volunteers to do that work the work doesn't get done.

I've looked at it, could provide a "quick fix", but if I understand QT correctly, a lot of changes are necessary to provide a proper implementation. If you are okay with quick and dirty, I'll file a PR.

DanAlbert commented 2 years ago

If you are okay with quick and dirty, I'll file a PR.

Depends on just how dirty it is. If it's not incurring massive tech debt, probably fine. The UI code is pretty messy in general so the bar isn't high.