#Vanilla VTOL Overwrites Saved Campaign Equips for Unloaded Aircraft

1 messages · Page 1 of 1 (latest)

tough pelican
#

This issue mainly effects modded aircraft, but could also potentially affect dlc aircraft that is being installed then reinstalled. Entering the loadout config room seems to reduce the weapon equip size to 7 for all campaigns for aircraft currently not loaded. Attached is a before and after picture. The root cause seems to be that the game is falling back to the AV-42 in the GetPlayerVehicle function (I tracked down where this issue happens). Which leads to the game deleting half of a saved loadout from a campaign. Which is particularly frustrating with modded vehicles, since half of the equips from a previous play session disappears and you have to requip everything

#

a before and after of entering the loadout config room in a vanilla game

#

the f-16 mod's loadout^

#

and this leads to half the equips being gone whenever you load into a previously played campaign/mission

#

I believe the issue is happening in CampaignSave.LoadFromConfigNode, where it gets the hardpoint count using PilotSaveManager.GetPlayerVehicle. But since that function returns the AV-42, it's defaulting the hardpoint count to seven

#

ideally, CampaignSave.LoadFromConfigNode should

  1. Use GetPlayerVehicle like normal
  2. Then, if it defaults to the AV-42, check how many weapons are currently in that campaign save
  3. Default to the AV-42's hardpoint count of 7 if there's no weapons in that campaign save