UIS and UCC with Quest Machine

Announcements, support questions, and discussion for Save System for Opsive Character Controllers.
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

The UIS and Pixel Crushers slots don't need to be the same.

Would you please send a reproduction project to tony (at) pixelcrushers.com?

You could also tick the Debug checkboxes on the SaveSystem and PlayerPrefsSavedGameDataStorer components. When you save, it will log the data that it's saving. When you load, it will log the data that it's loading. Somewhere in the output, you should see your UIS Saver component's Key. For example, if the Key is "UIS":

uisSave.png
uisSave.png (4.29 KiB) Viewed 7462 times
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

I'm not sure about sending a project. I'd have to strip a bunch out so it wouldn't be so big. I definitely appreciate the offer, and would like to reserve that as a last resort if I could? Not sure how comfortable I am sending my project to someone, no offense. You've been extremely helpful.

I can see the key for the UIS Saver component in my debug log. With that key there, does that mean for sure that it's saving and restoring the data? It is there both on save and load.

Something I noticed is that the PlayerPrefs Saved Game Data Storer doesn't have any saved games in the list in the inspector. I think there should be one listed here after I have saved a game, right?
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Any size project is fine to send.

Does the save info for the UIS Saver's key look something like the text shown in blue below?

Save System: DiskSavedGameDataStorer - Saving C:/save_0.dat: {"m_version":0,"m_sceneName":"UIS DS Demo","m_list":[{"key":"UIS","sceneIndex":-1,"data":"{\"m_SaveDataKeys\":[\"StorageHouse_Opsive.UltimateInventorySystem.SaveSystem.InventorySaver_\",\"Player Character_Opsive.UltimateInventorySystem.SaveSystem.InventorySaver_\",\"Player Character_Opsive.UltimateInventorySystem.SaveSystem.CurrencyOwnerSaver_\",\"Player Character_Opsive.UltimateInventorySystem.UI.Grid.ItemShapeGridDataSaver_\",\"Main Inventory Grid_Opsive.UltimateInventorySystem.SaveSystem.InventoryGridSaver_\",\"Game_Opsive.UltimateInventorySystem.SaveSystem.InventorySystemManagerItemSaver_\"],\"m_SerializedSaveData\":[{\"m_ObjectType\":\"Opsive.UltimateInventorySystem.SaveSystem.InventorySaver+InventorySaveData\",\"m_ValueHashes\":[733500480,1708831699,-2071929160,-583050453,956548525,-2071928787,-583164486,956367676,-2071927902,-586728887,960210127,-2071927529,-586842920,960094814],\"m_ValuePositions\":[0,4,8,8,12,16,16,20,24,24,28,32,32,36],\"m_Values\":[1,0,0,0,4,0,0,0,242,233,98,45,1,0,0,0,242,233,98,45,1,0,0,0,7,211,231,196,1,0,0,0,251,157,130,70,5,0,0,0],\"m_UnityObjects\":[],\"m_Version\":\"3.1\"},{\"m_ObjectType\":\"Opsive.UltimateInventorySystem.SaveSystem.InventorySaver+InventorySaveData\",\"m_ValueHashes\":[733500480,1708831699,-2071929160,-583050453,956548525,-2071928787,-583164486,956367676,-2071927902,-586728887,960210127,-2071927529,-586842920,960094814,-2071927676,-586917689,960022081,-2071927047,-587200426,960272080,...
On your UIS Saver component, is 'Save Across Scene Changes' ticked?

On your Save System Manager component, are all of the Auto Load *** checkboxes UNticked?

Here's a Pixel Crushers save system + UIS + TPC example scene:

SS_TPC_Test_2022-04-05.unitypackage

If you're using UCC, then the TPC scene should work.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Yes, the output looks like that. Yes, the Autoload checkboxes are unticked for the Save System Manager No Disk component.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Ok, so it looks like I needed to add the Inventory System manager Item Saver component. It is now restoring my inventory, I also needed to add the Currency Owner Saver to the player. Is this the correct way of doing it?

It is now restoring the game state, inventory, and currency. I have yet to check to make sure it is saving the quest information. But I can see it in the data output.

Now, I would like to get the UIS Save/Load UI working with this.
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Great! I'm glad you got the save/load working.

For the UI, I recommend making a copy or variant of the Main Menu prefab so you're not editing the original prefab.

Inspect the Save/Load button and remove the Redirect Save Load Button To Test Menu component.

Then inspect the Save Menu child. Remove everything inside Main Content and replace it with buttons (styled to look the same) that save and load using the Pixel Crushers save system. A quick way to do that is to add a SaveSystemMethods component to your button, and configure the click event to call SaveSystemMethods.LoadFromSlot(#) or SaveSystemMethods.SaveSlot(#). To get summaries and confirmations, you'll need to do a little scripting. I've finished work for the night, but if you have questions about that let me know and I'll try to help tomorrow.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Looks like I spoke a little too soon. It's not loading the quest information correctly. I'm getting an exception:

Quest Machine: Player Can't find quest welcomeToTheCity. Is it registered with Quest Machine?

This quest was in an active state when I saved. I'll keep trying. Thank you for the help so far.
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Make sure your quest is added to your quest database, and that the quest database is assigned to your Quest Machine GameObject.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

I had forgotten that I had done some work earlier today with quest machine and didn't reassign the database. That fixes it. Thanks!

Now on to the menu system.

Thanks again for your help, even after hours.
User avatar
Tony Li
Posts: 20705
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Glad to help!
Post Reply