I’m trying to make a saving system for my Creature catching game, but the problem is; I’ve never made a game long enough and so story based that I don’t have the knowledge how to make a saving system that can save my creatures, the amount of capture devices I have, (I can save pos just fine.) Or even how to save where I am in the story. I need help, I’m stressing to get this game done and I feel so close!
Thank you for your time and pls try to find some time to help me.
Kind of depends on what all you plan to save, either just the creature, or the creature and their stats included.
Trying to save a creature with all of their stats would be quite a bit, since you would not only need a save just to determine what creature you have, but also a save for each of its stats.
Best thing I can think of is to make a number list, first number determining which creature it is, and the following numbers could be their stats in a certain order, since you can change the option on a save behavior to save a number list.
Then just load the list upon either opening the game or an option to reload the saved numbers and then use “One” input on the number list to extract each number. Let’s say you have a basic pet that is numbered “1” which stats “2” “4” “7”… etc. If you put a 2 into the One input of the number list, it’ll output the “2” from the number list. A 3 would be “4”, 4 would be “7”, and so on.
That would be your best bet, if you have multiple stats of your creatures to save as well.
Capture devices is pretty easy, just have a save behavior to save the number you have. The story kind of depends on how linear it is. If it’s similar to Pokemon where you have multiple trainers and Gyms you can choose to either ignore or interact with, you may just want to use individual save features, so if you beat one trainer and ignore a second, have the first trainer set a save behavior from 0 to 1, so when it reads 1, it’ll already have been beat, while the second still reads 0 since you haven’t battled them yet. Same for Gyms if that is what you are aiming for, I’m not quite sure how you plan to arrange your battling systems.
If the story is linear or basically a straight line, just have a single save behavior that basically keeps track of what chapter you’re in. Such as if you have trainers and gyms in a set order that can’t be changed in any way, you could just have it so every time you beat one of the milestones, the number value just goes up.
For example, if you have 2 trainers and a gym followed by another 2 trainers and a second gym, if you have the number saved to 4, it means you already beat the first two trainers, the first gym, and one of the second set of trainers.
Then for the menu, you could have a save behavior that can determine if you have played before, and you could add an option to either continue or play from the beginning, then have it set every existing save behavior either to 0 or their original starting value so the game starts over, but the continue option won’t change any existing save values.
Save behaviors may seem a bit difficult to grasp at first, but once you understand how Globals work, save behaviors aren’t much different, except you have to remember that the data is carried between levels as well as whenever the game is closed and/or restarts. So, you have to make sure to have counter measures to reset the saves if needed and typically I would only use Once behaviors or one time triggers when dealing with saves, if you are constantly extracting and updating data from a single save, it could potentially lead to an infinite loop or break the game depending on how you set it up.
I will try this, thanks!
My explanation might be a bit complicated, but if you do need further help on it, I can try to set up some screenshots when I get some free time.