acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
1.01k stars 737 forks source link

ACE Loadouts saved with Global Mobilisation RPG backpacks (both variants) don't save the backpack #10346

Open Joe-Banks opened 1 month ago

Joe-Banks commented 1 month ago

Mods/DLCs:

Description: Attempting to save a loadout with either GM RPG backpack causes the entry to "grey out", and the backpack is lost when the loadout is loaded.

Steps to reproduce:

  1. Go to the ACE 3 Arsenal (on a unit in Zeus/Editor, or the Virtual Arsenal)
  2. Create a loadout with either gm_gc_army_backpack_80_at_str or gm_gc_army_backpack_80_at_gry in it
  3. Save the loadout, then close the loadout menu
  4. Go back to the loadout menu and attempt to load it
  5. Observe that the RPG backpack will be missing

Expected behavior: The expected outcome is that the RPG backpacks would save properly and load properly when the loadout is selected

Where did the issue occur?

Log Files:

Relevant section of .rpt file: "23:48:02 ACE_Arsenal - Loadout: Name: TEST Missing items: [] Unavailable items: ["gm_backpack_base"]"

Additional context: As mentioned above, the effected classnames are gm_gc_army_backpack_80_at_str and gm_gc_army_backpack_80_at_gry

Exported example loadout using the Strichtarn backpack (first one before save/loading, second one after loading); [[[],[],[],["gm_gc_army_uniform_soldier_80_str",[]],["gm_gc_army_vest_80_leader_str",[]],["gm_gc_army_backpack_80_at_str",[]],"","",[],["ItemMap","ItemGPS","","ItemCompass","ChemicalDetector_01_watch_F",""]],[["ace_earplugs",true]]]

[[[],[],[],["gm_gc_army_uniform_soldier_80_str",[]],["gm_gc_army_vest_80_leader_str",[]],[],"","",[],["ItemMap","ItemGPS","","ItemCompass","ChemicalDetector_01_watch_F",""]],[["ace_earplugs",true]]]

LinkIsGrim commented 1 month ago

Related to https://github.com/acemod/ACE3/pull/9799, specifically the base class lookup at https://github.com/acemod/ACE3/blob/master/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf#L70-L73

Do all GM backpacks have some sort of inventory item by default? The relevant bit in CBA (https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_getNonPresetClass.sqf#L49-L54) should stop long before reaching gm_backpack_base

Joe-Banks commented 1 month ago

Okay so, I used the command sent on Discord to test a variety of backpacks; -RPG Backpacks: Default Inventory of 3 rockets -Flecktarn Backpack: No Inventory -Medical Satchel: No Inventory -MG Ammo Bag (Strichtarn): 2 75 round RPK mags -Assault Pack, MG (Strichtarn): 4 75 round RPK mags

In testing this I also spotted the same thing happening with that MG Ammo Bag (gm_gc_army_backpack_80_lmg_str) and Assault Pack (gm_gc_army_backpack_80_assaultpack_lmg_str) which I hadn't noticed before.

I tested saving a loadout with each Backpack in the CDLC, and it only happens with the two RPG bags previously identified, and the two Strichtarn MG bags just mentioned.

LinkIsGrim commented 1 month ago

@johnb432 unsure if we go the roundabout way of fixing this (recreate the CBA loop and break if the base backpack's model isn't the same? Opens us up for more edge cases I think though. Alternatively break for scope 2 backpacks with inventory) or just mark as wontfix.

@Joe-Banks this is the filter for preloaded backpacks working as designed. Should ideally be fixed on GM's end, but won't happen most likely. We look for the first parent of the backpack without any items in the inventory and then save that in the loadout. Are those backpacks visible in the ACE Arsenal if they're not equipped (just in the left panel, not when loading a loadout)

Joe-Banks commented 1 month ago

Yup, they're visible in the ACE Arsenal fine, it's only saving them that's the problem. How would the GM guys have to go about fixing this - making a second version of the backpack that's empty, and hiding the current preloaded one from the Arsenal?

johnb432 commented 1 month ago

gm_gc_army_backpack_80_at_gry doesn't exist.


The best solution would be for GM to make classes available to the arsenal that don't have items. However, there are some areas where the arsenal doesn't handle such backpacks properly, so we might be able to fully address the problem on our end. EDIT: not possible as far as I can tell, GM needs to change stuff on their end.

johnb432 commented 1 month ago

@johnb432 unsure if we go the roundabout way of fixing this (recreate the CBA loop and break if the base backpack's model isn't the same? Opens us up for more edge cases I think though. Alternatively break for scope 2 backpacks with inventory) or just mark as wontfix.

I'm not a big fan of either solution tbh, but the second one sounds more robust to me.

Joe-Banks commented 1 month ago

gm_gc_army_backpack_80_at_gry doesn't exist.

The best solution would be for GM to make classes available to the arsenal that don't have items. However, there are some areas where the arsenal doesn't handle such backpacks properly, ~so we might be able to fully address the problem on our end.~ EDIT: not possible as far as I can tell, GM needs to change stuff on their end.

Cool - I can always mention it over on GM's server and see what they think about it?

Joe-Banks commented 1 month ago

Update - They agree it should be an easy fix, looks like it should be sorted at some point in the future! Thanks for the help both