InventoryBridgeSaver issue with saving changed item definition attributes

siendel

New member
I just started working on the various save systems for my game, and I've been able to use the InventoryBridgeSaver to successfully equip/unequip my UCC weapons. I've have modified the script to also allow me to equip/unequip my clothing, as by default these were just getting moved from the equipped collection to the main collection. This works, I'm able to find my clothing items and fire off my equip event to equip them (if they were equipped when saved), however they have also reverted to using their default item definition attribute values, not the values they were changed to during runtime. These are color attributes which I use for coloring the clothing items (and also the associated icon).

I disabled my code changes, dyed a piece of clothing and left it unequipped, but this also didn't keep the changed attribute values when loading. So it doesn't appear to be an issue with my code changes. Are item definition attributes supposed to be saved?

Thanks
 
Item Definition attributes should not be changed at runtime.
I'm assuming you mean Item attributes (there is a difference). Item Attributes can be changed at runtime.
They are saved by a component called InventorySystemManagerItemSaver.
1613377088685.png

The InventorySaver (and the bridge saver) tell the InventroySystemManagerItemSaver what Items it should save by calling:
SaveSystemManager.InventorySystemManagerItemSaver.SetItemsToSave(FullKey, listItemIDs);

Make sure you are indeed changing Item Attributes. and not definition attributes.
Then I would recommend Using the Debug Json Copy to make a "human" readable save file to see whether the data is saved correctly or if the problem is during the loading.

Pro-tip: if you right click the Save System Manager component, you'll see a custom context menu function to print the file path of your save data.
 
Thank you so much for the very quick response! It turns out I was using Item Definition Attribute instead of Item Attribute for those parameters (I was copying from other items where these values were fixed). Moving them over to Item Attributes solved my problem right away. Doesn't look like my version has the 'Debug Json Copy' flag (I might be a version behind), but looks like it would be pretty easy to add that in. Thanks again!
 
Top