Questions

Announcements, support questions, and discussion for Save System for Opsive Character Controllers.
Marcus
Posts: 9
Joined: Wed Mar 30, 2022 8:25 pm

Questions

Post by Marcus »

I bought the save system for Opsive TPC months ago, I just got around to messing with it for the first time last night.
I read threw the documentation and followed the steps as best I could, I had to make some assumptions, but after the UIS steps etc I gave it a try and literally the only thing that saves is Attributes, char position & rotation etc, No inventory items are saved what so ever, and there is a issue with the characters shader when it loads causing the "shaded areas" on the character to be extremely dark, which I couldn't fix.. but the rest of the scene seems fine, enemies etc using the same shader.

now I did read the bit about the UCC Saver runtime components, and this is kinda strange in and of itself..
firstly, when using UIS everything item is a Runtime pick up, at least to my understanding of this difference from TPC normal to the TPC and UIS integration. so my player starts with nothing in inventory and every item is picked up.
the built in UIS save has no issue saving and loading the inventory as it should.. but this UCC saver runtime component
only accepts prefabs of items made a certain way, I believe threw the conversion tool, to convert weapons and usable items into UIS compatible items.. which My project doesn't use. literally a 100% of items in my project are added threw
Random item pickups or an inventory item prefab placed in the world and UCC saver runtime component will not accept
those files.... and seems to be unable to save or load items in the inventory otherwise.. what's more is nearly all items I have created have no prefab or presence as a File in my assets folder, being they were created in the UIS system, given an Item Ability and a common drop model and a icon.. no model or prefab for the item exists..

I'ma bit confused here as nothing seems to work in an intended fashion, I looked to try and determine if maybe my version of TPC & UIS and integration are some how maybe not compatible with the latest version of the save system,
but specifics on this I couldn't find anywhere. and I couldn't find a place to download previous version of the save system.. Idk what's going on the instructions are bit hard to follow but I feel like after checking rechecking and checking again everything in the document match what I have but the results are not what's expected..
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions

Post by Tony Li »

Hi,

I'm sorry for the difficulty setting it up. Let's take it step-by-step from the top:

1. Does the included example scene ThirdPersonControllerDemoScene work correctly? I'll assume so, since you wrote that it saves attributes and position (and presumably non-UIS inventory).

2. Did you use the steps listed on page 15 of the manual to add UIS saving? I'll paste them here with some additional details:

To also tie Ultimate Inventory System into the Pixel Crushers Save System:
  • Import Save System for UIS.unitypackage, located in Pixel Crushers / Save System for
    Opsive / Extras.
  • Set up your scene for UIS. It should have a UIS GameObject named Game. It should also have a Save System GameObject (from the Save System for Opsive Controllers asset).
  • On the UIS Game GameObject, UNtick the Inventory System Manager component's Dont Destroy On Load checkbox. This will prevent duplicate copies when loading saved games.
  • On the Save System GameObject, add a UIS Saver component.
  • If you want to save the positions of items in a grid such as the player’s inventory, add an Inventory Grid Saver component to the Inventory Grid in the UI.
  • On the player, use an Inventory Bridge Saver component but do not add an Inventory Saver.
  • UNtick the UCC Saver's Save Inventory checkbox.
  • Optional (for testing only): If you want to connect to UIS’s inventory menu to the Pixel Crushers
    Save System's test menu script, add a Redirect Save Load Button To Test Menu component to
    the UIS MenuCanvas's SaveLoadButton GameObject. Then assign the UIS SaveLoadMenu
    GameObject to it. Note: This script is not intended for release builds. Use it only for quick testing

If you'd like me to take a direct look at your project, please feel free to send a reproduction project to tony (at) pixelcrushers.com. Any project size is fine. All customer files are handled confidentially.
Marcus
Posts: 9
Joined: Wed Mar 30, 2022 8:25 pm

Re: Questions

Post by Marcus »

HI, Thanks for taking the time to respond.

I did everything listed above, with no deviation from the setup instructions, and when it didn't work I started making assumptions to why that maybe. (wrong assumptions at that)I had played with the UIS built in save components in the past in projects created
just learning the system, and had great success with it, I purchased this asset because I liked the idea and I like to
support things that support software I really think is exceptional ( UCC & UIS ) that being said, In this project I never
added any of the UIS saver components to the project, because I never intended to use them, and I thought this asset was it's own thing completely not relying on those components.. and that was the problem with the Inventory not saving.
complete user error.

the only problem I have and can not seem to wrap my head around is the shaders darker shaded areas all go very dark
when loading the game.. I tried coming at this multiple ways but I can't seem to figure out a solution.
I created a lets call it a Main Menu Scene and then loaded from there and shaders are still busted.
I tried loading it directly from in the current scene while the shaders are working correctly, on load the shaders go dark.
I've tried unloading the current scene then loading the new scene with a blank go between scene to hold data.. the same problem persists.. however if I don't use the save system, everything works as it is intended no shader hiccups.

I'm not convinced this problem is coming from this asset, but this asset causes the problem.. this could very well be a unity issue in general, its not related to the shader itself as Ive tried multiple different shaders including built in shader and still arrive at the same problem.. But I discovered if I build the project to any device everything works..

any ideas?

Thanks again

Quick Edit: I Intend to give the product a good review, as it does what it says and is well put together and I originally
planned to just check it out and have a look at the code to just get some ideas on ways to implement my own system.
however, It works great and I haven't had any trouble modifying it for my needs and I can't waist my time making something else when this literally just works great. so cheers..
didn't want you to think this issue would cause a negative review or whatever.
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions

Post by Tony Li »

Hi,
Marcus wrote: Fri Apr 01, 2022 5:08 pmthe only problem I have and can not seem to wrap my head around is the shaders darker shaded areas all go very dark when loading the game.. ... But I discovered if I build the project to any device everything works..
When you build the project, Unity generates lightmap data in the build.

When you play in the editor and you haven't generated lighting in a scene yet, that scene's lighting will be strange when you load the scene. Try generating lightmaps in your scenes. (Menu item Window > Rendering > Lighting, then click the Generate Lighting button at the bottom.)
Marcus
Posts: 9
Joined: Wed Mar 30, 2022 8:25 pm

Re: Questions

Post by Marcus »

Yeah I tried that and haven't had any success with it..

I am having another strange issue, this one is kinda odd in that, everything else works as intended but this..

lets say I have a weapon with ammo equipped, and it has 50 bullets in it and I have lets say 100 ammo in inventory when
I save. When I load the game everything is restored, items, ammo, equipped items player position etc no issues accept
that the inventory ammo amount will always decrease by the equipped weapons max capacity, so I'd only have 50 ammo in the inventory, the weapon would be loaded with 50 ammo as it was when its saved.. I believe something is happening here where the gun is being restored and then reloaded from the inventory ammo when its equipped.. any ideas on this..?


I'm not getting any errors, so I'm not sure where to start..
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions

Post by Tony Li »

I'll look into this with Opsive. It sounds like a bug.

Just making sure -- did you UNtick the UCC Saver's Save Inventory checkbox?

If you haven't already, please also review Opsive UIS's UCC integration page. In particular, make sure you've set up a Character Inventory Bridge. When it comes to UIS, the Save System just calls UIS's save manager to save and restore inventory.
Marcus
Posts: 9
Joined: Wed Mar 30, 2022 8:25 pm

Re: Questions

Post by Marcus »

Yeah it's unticked, I have been using TPC & UIS for awhile, I don't have any errors in my project though it is very complex.
I have spent a lot of time modifying and changing TPC & UIS but I have done most everything inside the abilities, Item Ability & state systems & I brought in all my own Assets not using much from the package.. That being said, It's possible Ive made a mistake some where at some point, but when everything is working as intended its hard to figure out what may not be lol..

But I doubled checked everything I know to check and I don't see where this is happening.. ill try to dig little deeper, later tonight and see if I'm missing something..

from what I can tell with my limited test setup of the save system, is this one type of item "ammo" that's loaded in a weapon, isn't saving, and UIS is equipping it on load and its empty so it grabs the ammo from inventory and adds it to
the weapon..

I do not have the latest version of TPC and UIS, I updated my project to latest version a few weeks ago and a couple days later there was a new update for TPC UIS and integration, its sometimes a pain to update when the project has grown in size.. so maybe that's possibly an issue here, idk?

anyway I'll keep hacking at it and see what I come up with...

on an off topic, or rather the original topic, I fixed the Shader problem, I reinstalled unity and then rebaked light maps again and the problem was gone, which is odd because I rebaked light maps as soon as the problem showed up and it didn't fix the problem, but I read a post online about someone who also had a similar problem with a different circumstance and he couldn't remedy it and reinstalled and it also fixed for him so I tried that and it worked..

thanks for the help..
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions

Post by Tony Li »

Hi,

I'm glad you got to the bottom of the shader/lightmap issue.

I'll reply back tomorrow with an update on the ammo restoration issue.
User avatar
Tony Li
Posts: 20704
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions

Post by Tony Li »

Hi,

Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com?

I haven't been able to reproduce the issue. Here's an example scene that uses the Save System for Opsive Controllers with the UIS integration. It's based on Opsive's TPC + UIS integration scene. I just added the Save System to it.

SaveSystem_Test_TPC_UIS_2022-04-02.unitypackage
Marcus
Posts: 9
Joined: Wed Mar 30, 2022 8:25 pm

Re: Questions

Post by Marcus »

Sorry for late response I worked till midnight tonight and have to leave back to work in a couple hours until sometime tomorrow night..

I quickly downloaded your package, loaded it up and the same problem persists in your scene, with TPC and UIS characters and weapons (My Project doesn't use these same items, models etc, not even the same database).

I simply started the scene, pickup the 1000 rounds of ammo, equipped the gun in hands, 36 rounds gets loaded into the gun
(which leaves 969 rounds in the inventory), walked a few steps forward as to not re pickup the ammo from the item drop when loading back in, went to menu saved the game walked a couple steps and hit load.. when loading back in and putting the same gun back into hands ammo in inventory is 933 rounds. 36 rounds vanish..

I can see about sending at least part of my project but that could take sometime, I have extremely busy work week, and there is the issue now that, this has happened in two different projects with different well everything.. the only constants at this point is UIS TPC and the Saver, I'm wondering which versions of TPC & UIS and the integration your using? I'm using 1.2.6 of UIS and the corresponding TPC & Integration versions for the UIS 1.2.6 version.. maybe this is the difference?

thanks for at least taking a look, and sorry to bring problems your way. I'ma bit baffled in this as it seems like if something wasn't right on my end that more then this would be broken, but literally everything else works perfect, which makes me feel like my settings and setup are exactly the way they should be. but im certainly not perfect ill dig around some more..
Post Reply