One save per character, with autosave/save&quit

ekhartpl

Veteran
Veteran
Joined
Apr 18, 2015
Messages
71
Reaction score
37
First Language
Polish
Primarily Uses
RMVXA
I was wondering how to get around creating a system where player has one save file per "new game".

Basically, Player creates a new character, names him "Guts", makes him a barbarian. Save #1 is created upon starting new game - whenever player ends game, the only option is to save and quit (which automatically saves to Save #1). But after two, three hours Player is bored with smashing everything with his Greatsword, so he decides to create a new character. Upon starting new game, a Save #2 is created - and is assigned to his new character, let's name him "Parry Hotter", as he's a mage. Again, quitting game saves the progress to Save#2.

Also as the game progresses (as our only option to save is to quit the game), I'd periodically autosave - again, to proper save files.

How would I get around doing just that? I'm somewhat familiar with Ruby, less so with RGSS3 (but I still can do a thing or two, I guess).

As for scripts that I have that relate to saving, I only have Yanfly's Save Engine (as well as Main Menu engine).

Huge thanks for any help, recommendations etc!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,666
First Language
German
Primarily Uses
RMMV
one thing you'll need is a script for persistent variables (variables that stay the same over all savefiles). Then you use one variable stored for all games that is counted up every time a new game is started, and only then. It needs to be copied to a non-persistent variable directly after, making each game have its own specific number in the non-persistent variable while keeping track of the maximum number for the next new game in the persistent variable.

then change the save screen to only be able to save to the slot with the number in the non-persistent variable.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
There is no need for any complicated workarounds here with variables, etc.

The last created file or the last loaded file is the currently played "file". So when you save the game, you should always overwrite that one.
There are built-in methods in Ruby to check file creation/modification, so it's fairly easy to check for these things.
Also there is a default method that returns the last file loaded/saved in the DataManager module, so you can use that too.

You don't even need a separate screen for saving the game if the player can only have one save per character, it would be redundant.
Just mash a little "Save in progress" image for eye candy and drop a popup saying "Save completed!" or even just a "save successful" sound effect, or something similar at the end. Usually games with one save per character do exactly this.

You can easily remove the save option from Yanfly's script too in the setting area, if I remember correctly, leaving only the load and delete option there, which is exactly what you need here.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,968
Members
137,561
Latest member
JaCrispy85
Top