Page 1 of 1

Existing SaveSlots?

Posted: Wed Sep 25, 2024 1:41 pm
by ModestFacialHair
Hi,

I'm working through the learning curve of the SaveSystem - great work, very easy to handle, thanks!

I was hoping to have an arbitrary number of saveslots and then just display existing saves by iterating from slot 0 to slot n. Then I can allow the player to overwrite, delete or add an existing one.

There doesn't seem to be any obvious way of tracking what slot n might be, though. I feel like I'm missing something obvious. Should I just track the highest slot number in a metadata file? Or iterate through files in the directory and identify what the slot number is on each? If so, do I just have to use FileSystem objects, there's no nice easy wrapper for them in the SaveSystem? Or am I just going about it wrong?

TIA!

Re: Existing SaveSlots?

Posted: Wed Sep 25, 2024 5:14 pm
by Tony Li
Hi,

Yes, you can track that by yourself, or set a very high upper bound for n and loop from 0 to n (or n down to 0 if you prefer) to check SaveSystem.HasSavedGameInSlot().

Re: Existing SaveSlots?

Posted: Wed Sep 25, 2024 5:39 pm
by ModestFacialHair
I should have thought of just 'a very high upper bound for n' - thanks.

Re: Existing SaveSlots?

Posted: Wed Sep 25, 2024 5:43 pm
by Tony Li
Glad to help!