Page 2 of 2
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 9:56 am
by om3n
Ah ok. That helps clarify some. I managed to get the quest state to save between scenes now, is there a saver I could add to the inventory objects for example and have their state persist through the changes as well? Inventory is my sticking point now. The current method of save seems easiest to manage, so I'd like to keep the systems together if at all possible.
Thanks again
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 10:10 am
by Tony Li
Hi,
How are you changing scenes?
If you're using TDE's methods, it should carry over the inventory.
If you're using a Scene Portal, add a DialogueSystemSaver to the Dialogue Manager GameObject (if not already present), and an InventoryEngineSaver to the inventory. If your project doesn't have an InventoryEngineSaver component, import Plugins / Pixel Crushers / Common / Third Party Support / Inventory Engine Support.
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 11:00 am
by om3n
That script was exactly it. Thanks so much. One last inquiry if I could.
I've played with the name a few times. The scriptable object is the same as the ID listed in said scriptable object. However I still get this error:
InventoryEngine : Couldn't find any inventory item to load at Items/ named Assaultammo. Make sure all your items definitions names (the name of the InventoryItem scriptable objects) are exactly the same as their ItemID string in their inspector. Once that's done, also make sure you reset all saved inventories as the mismatched names and IDs may have corrupted them.
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 11:10 am
by Tony Li
Is Assaultammo inside a folder named "Items" that itself is inside a folder named "Resources"?
Does this happen on an old saved game, or when changing scenes?
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 11:21 am
by om3n
after loading after the save. the location is assets/Survival/Items/Ammo/Definitions.
Is this determined by something? Should it be in a specific location/should I change something?
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 1:09 pm
by Tony Li
It's an Inventory Engine thing. Can you move it to Assets/Resources/Items/Assaultammo?
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 1:41 pm
by om3n
Assets/Resources/Items did the trick. Thanks a lot I really appreciate the assistance!
If I entended my character definition like levels, stats etc, how might I include those in the save?
Re: Saving between scenes.
Posted: Thu Feb 03, 2022 2:08 pm
by Tony Li
Write a custom saver script. (How To:
Write Custom Savers)
They pretty much only require light familiarity with scripting. They don't require any complex programming.