CG-Tespy / FungusSlotBasedSaveSystem_Unity

A replacement for the built-in Fungus Save System that is closer to the standard save systems you see in games.
MIT License
14 stars 3 forks source link

The system of saving #20

Open ilka2 opened 1 week ago

ilka2 commented 1 week ago

Hi. I came across some misunderstanding about how saves work in this extension.

First, I would like to know if the background corresponding to the moment of saving is saved somewhere. I want to put in the save slots, in addition to the save date, the background that was in the game at the moment, so that it would be easier to find the right save.

Secondly, I did not understand how to add my data to the saves and then count them. As I understand it, SaveDataMy (the so-called SaveData subclass) stores the data that we need to save. Data Saved My creates a list with this data. SaveLoaderMy takes a Json file and reads the data from there. But how to implement it is not clear to me. And it is not clear how my classes are implemented into the existing preservation system.

CG-Tespy commented 1 week ago

I'm... not entirely sure what you're getting at here. For example, it's not clear what you mean by "background". Also, this system doesn't have any class called "SaveDataMy". Please explain what you're trying to do as far as far as making custom save data goes.

ilka2 commented 6 days ago
  1. Background. When I have saved the Fungus data, I want to upload it. The download works fine, except instead of the background (what the "view" indicates) I get a gray picture.
  2. All classes ending in "...My" are subclasses of the classes of the same name from the SlotBasedSystem (SaveData, DataSaver, SaveLoader). In my understanding, SaveDataMy stores user data that we need to save. DataSaverMy - creates a list with this data (which we will have to write to JSON later). SaveLoaderMy - takes a Json file and reads data from there. But it sounds beautiful in words. And how it actually interacts, I don't understand.
CG-Tespy commented 2 days ago

Sounds to me like I should explain how classes like SaveData and DataSaver interact. Let’s start with...

The Process of Creating Save Data

This is centered around the GameSaver component: the head honcho of this process. It creates GameSaveData instances that hold the more specific save data types (such as FlowchartData).

Right after creating such an instance, it passes it around to its minions (which I also call subsavers), one by one. The minions here are DataSaver subclasses. One example of that is FlowchartSaver. Their job is to gather up what they want saved and then give it to the head honcho. The head honcho then takes what it was given, adding it to the GameSaveData instance. When the subsavers' work is done, the GameSaver adds in stuff like the scene name and the last-hit Progress Marker. And with that, the GameSaveData instance is ready to be loaded, written to disk, and such.

There’s a lot more involved in this system (such as the process of reading save data). But before I move onto that, please let me know if you have any questions.