[BUG] Saved Item ID 1147884498 could not be retrieved from the Inventory System Manager.

Hi,

when i'm loading my items i'm getting this warning and no items have been loaded, what I do is first load the
InventorySystemManagerItemSaver and then my inventory saver and inventorygridsaver. I do them one after the other without using a coroutine.

Warning: "Saved Item ID 1147884498 could not be retrieved from the Inventory System Manager."
This repeats for every item.

Items are Mutable & Unique, if it matters.

The only solution I found is to wait 5 seconds and then load it, works everytime on my machine, but I'm worried that the timing may be different on other computers. I should mention that I load one more inventory before that (which also uses InventorySystemManagerItemSaver, but in it's case I only wait for 2 seconds (maybe because it's smaller in size or something).


Edit:

I think I have done one mistake, I'm saving and loading the "Inventory System Manager" in 2 different places.

1. For stash
2. For player

I guess this one is universal and should only be saved and loaded from one place, so can you confirm Inventory System Manager must be saved in one file and it's shared across all inventories even if they are 10? If so, one downside i see is imagine player has 3 stash inventories only available in the menu scene (like escape from tarkov), then I don't see a reason to always re-save the items in them in the game scene when they remain untouched, because they are only available in the menu.
 
Last edited:
Hey SkinWalker. This is correct all the save data is saved in a single shared save file. This is how all games work. I understand your concern about having to save data that was already saved but if you profile it I'm sure you'll see it makes a negligeable difference.
Also for save data to be safe during saving all software need to rewrite the entire file anyways in case the save is interrupted which if not duplicate can corrupt your save data with no backup.

There are techniques to make this more efficient, but rarely used in video games and definetly goes way out of scope for what an inventory system requires.
 
Hey SkinWalker. This is correct all the save data is saved in a single shared save file. This is how all games work. I understand your concern about having to save data that was already saved but if you profile it I'm sure you'll see it makes a negligeable difference.
Also for save data to be safe during saving all software need to rewrite the entire file anyways in case the save is interrupted which if not duplicate can corrupt your save data with no backup.

There are techniques to make this more efficient, but rarely used in video games and definetly goes way out of scope for what an inventory system requires.

Thanks for the reply, so if I'm making a hero shooter with say 5 characters that have their own inventories, when character 1 requests a save all of the other characters(2-5)'s data will be re-saved once again, right?
 
Correct. Requesting a save is telling the save system to write the save data to disk. The save data is made up from the loaded data and any changes that was made during the play session. The save system also request all active Saver components to serialize the data and update the save data before it is saved to disk. Saver components can also do that without writing to disk if you call the relevant function manually, this way only the relant object data is "temporarily saved" until you write it to disk

I hope that makes sense
 
Back
Top