dcs-liberation / dcs_liberation

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

Custom Loadout only applying to first aircraft in flight even though "use same loadout for all flight members" is checked #3111

Closed Starfire13 closed 1 year ago

Starfire13 commented 1 year ago

Affected versions

Development build

Build information

DCS Liberation 9.0.0 Build 5372 Git revision f9f2c79aeb4db51d74e61f4b0125b22b9313757f

Description

See the DEAD BULLDOG package in the attached save. I have 3 flights in that package.

  1. SEAD flight carrying TALDs
  2. DEAD flight carrying SLAM-ERs
  3. Escort flight carrying AMRAAMs

I modified the loadouts by clicking "use custom loadout" and:

  1. Switched the SEAD flight from HARMs to TALDs and added 1 extra external tank
  2. Added 1 extra external tank to DEAD flight
  3. Added 1 extra external tank to Escort flight

Here's a screenshot showing the SEAD flight. You can see that the "use same loadout for all flight members" is checked. Screenshot 2023-07-25 003715

In the mission editor, the first aircraft in each flight is using the modified loadout. Aircraft 2 to 4 are using the default loadouts.

Save game and other files (save game required, bugs without saves will be closed)

Noisy Cricket #5372 Turn 2.liberation.zip

DanAlbert commented 1 year ago

Presumably it's only syncing named liveries... Will check that later.

Starfire13 commented 1 year ago

I tried again without using a custom loadout. Just switching from a HARM preset to a TALD preset. I encountered the same problem. Only the first aircraft in the flight has the correct loadout. The rest are still on defaults.

DanAlbert commented 1 year ago

Hmm. I used this the other day without issue. I'll have a look tonight hopefully.

Starfire13 commented 1 year ago

I just did a quick test switching a bunch of flights to different loadouts and they all were generated with only the first aircraft's loadout changed. This was true for both player flights and fully AI flights. Here's an examplke file with a couple of AI flights with all their loadouts changed to different ones.

Loadout Change Bug Example.liberation.zip

DanAlbert commented 1 year ago

I'd misread at first, it's the opposite of this that I used successfully the other day :)

This happens because the way that checkbox doesn't actually bind the loadouts together, it just sets all the loadouts to match the first member the moment it's checked (was not the intent). I think I can fix it at the UI layer, but otherwise I can make this work during mission generation time (the former is better because it's more obvious what's going on for the player).

DanAlbert commented 1 year ago

PR's, up, and found (and fixed) another bug in the process: https://github.com/dcs-liberation/dcs_liberation/pull/3115