Autosave only

Hi everyone, i'm new. I have a bit of experience with older versions of RM and I got back to it a few days ago (MZ). I've never been a "code person" tho, and as the title says, I'm looking for a way to autosave only in my game.

I searched and tried a few MV scripts, and while one effectively save the game, the last command line crashes the game : "no such command exists" or so.

Code:
$gameSystem.onBeforeSave();
if(DataManager.saveGame(1)) {
   StorageManager.cleanBackup(1);
}

From this thread : https://forums.rpgmakerweb.com/index.php?threads/autosave-autoload-with-script-only.91803/

I replaced the 1 with a 0 (so it's an autosave), but as I said, the last line won't work in MZ. How can I make it work ? I'm ready to dive in myself but I don't even know where is the source lol (yeah I'm a noob).

Also a few more questions. The save was effective but it doesn't appear in the continue menu, so where can I load it, I don't understand. Talking about the save list, is it possible to jump directly into the save by clicking "continue" on the main title ?

Thank you all
I replaced the 1 with a 0 (so it's an autosave)
From the thread you linked to,
replace the "1" with whatever save slot you would like to use. There is no save slot 0, it starts counting at 1


Also a few more questions. The save was effective but it doesn't appear in the continue menu, so where can I load it, I don't understand.
Because, according to what you typed above, you saved it in an invalid location.
Talking about the save list, is it possible to jump directly into the save by clicking "continue" on the main title ?
Yes, if you write a function for it.

If this doesn't solve your problem, please post screenshots of your code, the loading and saving routines, don't just link to something else and say "It's like this but I changed it" 😉

The cleanBackup function isn't in MZ but it also isn't necessary - nothing you're doing requires there to be a backup file.
From the thread you linked to,




Because, according to what you typed above, you saved it in an invalid location.

Yes, if you write a function for it.

If this doesn't solve your problem, please post screenshots of your code, the loading and saving routines, don't just link to something else and say "It's like this but I changed it" 😉

The cleanBackup function isn't in MZ but it also isn't necessary - nothing you're doing requires there to be a backup file.

So first off, there is no save slot 0 in MV, but there is in MZ, it's the number of the native autosave.

At first I tried the code in the first post without touching anything, and then I tried to replace 1's with 0's. Both works and create a save file effectively.

But the game crashes and write this :
TypeError
StorageManager.cleanBackup is not a function

How did I call the script ?
Spoiler
issue1.pngissue2.png

And you said about the continue button that makes you jump right into the the game "Yes, if you write a function for it." ; but I don't understand.
So first off, there is no save slot 0 in MV, but there is in MZ, it's the number of the native autosave.
Okay.
But the game crashes and write this :
TypeError
StorageManager.cleanBackup is not a function
I addressed this in the reply above. Just delete that.
And you said about the continue button that makes you jump right into the the game "Yes, if you write a function for it." ; but I don't understand.
You'd use a plugin that allows you to add options to the title screen and call the loading method when they select the Continue text. I've used some for MV, but you'd have to Google it for MZ options.
Okay.

I addressed this in the reply above. Just delete that.

You'd use a plugin that allows you to add options to the title screen and call the loading method when they select the Continue text. I've used some for MV, but you'd have to Google it for MZ options.

I manage to figure out what was the good sentence to save from a script, thanks to you.

I'm gonna dive in the existing plugins to call a save from main title.

Original thread: https://forums.rpgmakerweb.com/threads/autosave-only.145527/