UIS and UCC with Quest Machine

Announcements, support questions, and discussion for Save System for Opsive Character Controllers.
zadealer
Posts: 2
Joined: Sun Apr 03, 2022 5:02 pm

UIS and UCC with Quest Machine

Post by zadealer »

I need to save the quest progress with the UIS when the user saves.
and there is another issue with the save system.

The save system only saves the inventory but not the character position, I tried to use UCC Saver on the player but there is a message saying "GameObject has more than one saver component. Make sure each saver has a unique name."

For sure I didn't buy the save system since I already own UCC (and the description box in the Save System for Opsive says so.)

So on the player, there are 2 scripts for saving (Inventory Bridge Saver and Currency Owner Saver).
And on the "Game" Object there are 2 scripts (Save System Manager and Inventory System Manager Item Saver).
And there is the Save System UI (it is the same setup in the demo version of UCC).

The Save System is built as the Demo Verison of UCC.
So, these extra save files from the integration like (Pixel Crushers to UIS Saver), I don't know where exactly put these extra scripts. And do I have to add extra scripts?

So how I can save the Quest and Character Position?

N.B: I'm currently disabling the extra save system files like (UCC Saver and Pixel Crushers to UIS Saver) till I know where I have gone wrong.
Attachments
Game Script (Part 2)
Game Script (Part 2)
4.jpg (472.15 KiB) Viewed 8781 times
Game Script (Part 1)
Game Script (Part 1)
3.jpg (469.94 KiB) Viewed 8781 times
Player Script (Part 2)
Player Script (Part 2)
2.jpg (476.92 KiB) Viewed 8781 times
Player Script (Part 1)
Player Script (Part 1)
1.jpg (507.12 KiB) Viewed 8781 times
User avatar
Tony Li
Posts: 20703
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

The UCC Saver and UIS Saver components work with the Pixel Crushers Save System.

Are you using the Pixel Crushers Save System or Opsive UIS's save system?

I'll assume you want to use the Pixel Crushers Save System, and that you have imported Quest Machine's UCC and UIS integration packages from Opsive's website.

1. Download and import the SaveSystemPrefabs from the Dialogue System Extras page. These also work with Quest Machine. The prefabs are preconfigured so you don't have to set them up yourself.

2. Add the LoadingScreen scene to your project's build settings.

3. Add the Save System prefab to your scene. Make sure there are no other "Save System" components in your scene.

4. Enable the player's UCC Saver component. Set a unique Key value such as "uccPlayer". UNtick Save Inventory.

5. Remove the Pixel Crushers To UIS Saver component.

6. Add a UIS Saver component to the Save System prefab. Set a unique Key value such as "uis".

7. For testing only: Add a Save System Test Menu component to the Save System prefab. Add a Redirect Save Load Button To Test Menu component to the UIS Inventory System Canvas > Main Menu > Save/Load button GameObject. In the UIS+UCC demo, it's in Inventory System Canvas > Demo Full Layout > Main Menu > Center Panel > Main Menu Tab Button (second one). Then assign the UIS Save Menu GameObject to it, which is in Main Content > Save Menu in the demo. Note: This script is not intended for release builds. Use it only for quick testing.

(These steps are on page 5 of the Opsive_UIS_Support.pdf manual if you need to review them in the future.)
zadealer
Posts: 2
Joined: Sun Apr 03, 2022 5:02 pm

Re: UIS and UCC with Quest Machine

Post by zadealer »

Are you using the Pixel Crushers Save System or Opsive UIS's save system?
by default when you implement the UCC and UIS of Opsive, these systems implement their own save the system by default.
all you have to do is to make the UI and interact with the pre-existing scripts which it is inside the systems.
you have imported Quest Machine's UCC and UIS integration packages from Opsive's website.
yes, I did import the Quest Machine Integrations of UIS and UCC and I assume it works just fine (Usually when I import a new integration, in the integration menu of UIS and UCC, it shows the name of the system which have the integration; But nothing have appeared in my case. Maybe there is nothing that should be shown in the first place.).
Add the Save System prefab to your scene. Make sure there are no other "Save System" components in your scene.
Should I add it to the loading Scene or the Main Scene?!

so should I remove the 4 saving scripts (Inventory Bridge Saver and Currency Owner Saver which are on the player and Save System Manager and Inventory System Manager Item Saver which is on the "Game" object) and the save system UI and then Implement the Save System of Pixel, right ?!

and does the Pixel Save System Save the Currency of the player? (Since I will remove the save system files of Opsive).
User avatar
Tony Li
Posts: 20703
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Please use the setup steps I provided above.

Do not remove the UIS save system.

The Pixel Crushers save system works on top of the UIS save system to provide additional functionality, such as saving UCC information and other scene information. To work with UIS, it requires the UIS save system to still be in place. Since it works on top of the UIS save system, it will save everything that the UIS save system normally saves, including currency.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Hi,

I am trying to get this to work for my project and don't know that I've done everything right. I'm using DS, QM, Opsive Third person controller, and UIS. I would like to use the UIS save menu and system since it's built into the UI already for the inventory system, rather than the test menu. Is this possible?

I have followed the steps above and got the save system to save the game, but it's not saving the inventory of the player when I load that save game. What did I miss?

Thank you for all your help.
User avatar
Tony Li
Posts: 20703
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Things to check:
  • Add Scripting Define Symbol "UIS". (Edit > Project Settings > Player > Other Settings)
  • Untick the UCC Saver's Save Inventory checkbox.
  • Player or inventory GameObject has an Inventory Bridge Saver component but not an Inventory Saver.
  • Scene has a UIS Saver.
  • Keys are unique on all saver components.
If those all check out, try setting up the SaveSystemTestMenu temporarily. See if it makes a difference. If so, then the issue is with the setup of the UIS save menu. If the issue is still there with the SaveSystemTestMenu, then the issue is with the save system setup.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

I have checked all that, and it saves the game state but not the inventory.

I have a save system prefab in the scene and a UIS saver on that prefab.

I have unticked the Save Inventory on the UCC Saver component and the player character has both the inventory bridge saver and inventory saver components. Is the inventory saver not supposed to be there?

I have set up the test menu redirect also. The loading screen works, it saves the game state and loads the game state just not the inventory state.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Just for the sake of clarity, I'm trying to get the UIS saver to save all the state, game state, quest state, character position, etc. I would like to utilize the Loading Screen that the test menu uses, but want to use the UI from UIS. I took out the Test menu redirect set up since I would like to keep the Save/Load UI from UIS.

For reference, here is the Save Systems prefab in my scene:
Screen Shot 2022-05-10 at 3.04.06 PM.png
Screen Shot 2022-05-10 at 3.04.06 PM.png (30.8 KiB) Viewed 8586 times
Here are the components that my character has:
Screen Shot 2022-05-10 at 3.05.35 PM.png
Screen Shot 2022-05-10 at 3.05.35 PM.png (66.91 KiB) Viewed 8586 times
User avatar
Tony Li
Posts: 20703
Joined: Thu Jul 18, 2013 1:27 pm

Re: UIS and UCC with Quest Machine

Post by Tony Li »

Hi,

Remove the "Pixel Crushers To UIS Saver" component. That's only if you want to use UIS's save system. Since you want to use The Pixel Crushers save system (saving to slots, loading screen, spawnpoints, etc.), you should remove that component. You can still use UIS's save/load UI. You'll just need to hook up those buttons to the Pixel Crushers save system methods instead of the UIS save system methods. But let's get saving and loading with the Pixel Crushers save system working first.

Also remove the Inventory Saver from your player.

Make sure there's a UIS Saver somewhere in the scene.
vectorfrog
Posts: 86
Joined: Mon May 02, 2022 12:16 am

Re: UIS and UCC with Quest Machine

Post by vectorfrog »

Ok, I've done that and added the Test menu back in. I'm still not getting a saved and restored inventory. When I save with inventory, it restores empty. Do the save slots have to match? I have UIS saver Save Slot set to 0 and the Save System Test menu set to the same.
Post Reply