Question on save_0.dat Location

Announcements, support questions, and discussion for Save System for Opsive Character Controllers.
Post Reply
jkaczmar
Posts: 24
Joined: Thu Jun 29, 2023 7:15 pm

Question on save_0.dat Location

Post by jkaczmar »

I have a question on the underlying mechanics for UCC/UIS/QM saving. First, everything seems to be working as intended in that location, attributes, and quest status are saved when I run it through simple one scene tests. However, I'm trying to design the detailed multi-slot approach for the full game and I don't quite understand how the file structure works. Right now, I don't get any save_0.dat file created even though that's what shows up in Disk Saved Game Data Storer as the save location. I do get a saveinfo.dat file that I understand is a catalog of locations for all the save_*.dat files of which I should only have one right now (save_0.dat).

Where do the save_*.dat files actually get saved? I can't find them anywhere in the structure, but the save/load is clearly working so they must exist somewhere. They aren't in the same persistent data path location as all my other files even though that's the directory in Disk Saved Game Data Storer and that's where the saveinfo.dat was created.
User avatar
Tony Li
Posts: 23278
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question on save_0.dat Location

Post by Tony Li »

Hi,

The save_*.dat files should be in the same location as saveinfo.dat.

When you save a game, is saveinfo.data updated? If not, then maybe that's an old file and the save system is using a different saver such as PlayerPrefsSavedGameDataStorer or a DiskSavedGameDataStorer that saves to a different location.

Also, are there any errors or warnings in the Console window?
jkaczmar
Posts: 24
Joined: Thu Jun 29, 2023 7:15 pm

Re: Question on save_0.dat Location

Post by jkaczmar »

It's interesting behavior in that if I delete the saveinfo.dat file it creates a new one in the same persistent data folder. However, if I then subsequently save, the saveinfo.dat file isn't updated to a new date/time. Despite that, the save is working for UCC and QM both which leads me to believe there is save_0.dat somewhere. However, I did a full scan on my pc to search for the file and it didn't show up.

I'm definitely using disk rather than playerprefs. I have the playerprefs component in the scene, but its turned off (inactive). Perhaps I should completely remove it?

There are no errors or strange message in the debug log. One thing I did do a few weeks ago is I changed the company, etc. in Unity project settings which changes the persistent data location. I had to update it for some of the other products I was using like Easy Save and Easy Build System. The Pixel Crushers save system window shows the correct updated file location, but is there a smart way to trick it to see if some internal link is messed up? I guess I could try hard coding the file location to be my persistent directory to see if that has the desired effect. It would be the same location, but the change might trigger something in the code to point to the right spot.
jkaczmar
Posts: 24
Joined: Thu Jun 29, 2023 7:15 pm

Re: Question on save_0.dat Location

Post by jkaczmar »

My fix worked. I changed it to custom location with the same path as my persistent directory and that did the trick. I will probably change it back to persistent data so that I don't cause myself issues in the future, but making the change triggered save system and now the file shows up in the expected spot.
User avatar
Tony Li
Posts: 23278
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question on save_0.dat Location

Post by Tony Li »

Good find! I'm glad you were able to resolve the issue.
Post Reply