MZ Autosave Only

I want to disable all save files except autosave so when I click on continue on title screen it loads me to the autosaved playtime 😍

Ive been trying to script this but it seem like it doesnt work. I have a Hendrix Title plugin and visustella mz core engine

I was wondering if i can script this?
1749907999018.png

just don't let the player access the Save window at all I guess might fix the issue.
It sounds like it shouldn't be too difficult to do. I guess you'd start by disabling "Save" in the System 2 tab as described above, and then add a custom "Continue" command to your title menu. I don't know how Hendrix Title works, but… it looks like the following code run from a menu command works:

JavaScript:
Scene_Title.prototype.reloadMapIfUpdated = Scene_Load.prototype.reloadMapIfUpdated;
DataManager.loadGame(0).then(Scene_Load.prototype.onLoadSuccess.bind(SceneManager._scene)).catch(() => SoundManager.playBuzzer());

Technically, the first line doesn't need to go in the menu command. It just needs to run once, so it can go basically anywhere. But if you don't have a good plugin to dump it in then in the menu command isn't the worst place.
if its similar to MV, you can go to continue, if it exist, load the savefile
directly instead of going to "Scene_Load".

while there is a plugin for MV doing exactly that, I don't know if MZ
also has a similar plugin for it.

TSR_Title added a "true continue", loading the last save file,
there are simplify plugins as "single saveFile".

Single Save file mostly load the savefile while clicking on continue.
I think Triacontain has one, but cannot say for certain.
It sounds like it shouldn't be too difficult to do. I guess you'd start by disabling "Save" in the System 2 tab as described above, and then add a custom "Continue" command to your title menu. I don't know how Hendrix Title works, but… it looks like the following code run from a menu command works:

JavaScript:
Scene_Title.prototype.reloadMapIfUpdated = Scene_Load.prototype.reloadMapIfUpdated;
DataManager.loadGame(0).then(Scene_Load.prototype.onLoadSuccess.bind(SceneManager._scene)).catch(() => SoundManager.playBuzzer());

Technically, the first line doesn't need to go in the menu command. It just needs to run once, so it can go basically anywhere. But if you don't have a good plugin to dump it in then in the menu command isn't the worst place.
Omg! it kinda worked? but when I press the continue from title screen with your script attached to the button command it loads me to the game so I think It doesnt delete my previous autosave so I exported my project into a game so theres no saves but when I press on continue it freezes my title screen 😅
I would say you should make the continue option be disabled or hidden if there's no autosave. The following condition should work for that:

JavaScript:
!!DataManager.savefileInfo(0)

I don't know where you'd put that code though.
I would say you should make the continue option be disabled or hidden if there's no autosave. The following condition should work for that:

JavaScript:
!!DataManager.savefileInfo(0)

I don't know where you'd put that code though.
hm, Im not sure either, maybe with the script you provided maybe if theres no autosave it loads back to the title screen? 😍
it would help to show the code where you have it, so just in case, we can correct it.
it would help to show the code where you have it, so just in case, we can correct it.
This how i setted it up, i made a custom title command called " continue " and i added the script "
Scene_Title.prototype.reloadMapIfUpdated = Scene_Load.prototype.reloadMapIfUpdated;
DataManager.loadGame(0).then(Scene_Load.prototype.onLoadSuccess.bind(SceneManager._scene)).catch(() => SoundManager.playBuzzer()); " from solar_flare 😅
1749921057957.png
Did you try just putting what's on the script call list (or like modify the continue command function with the stuff)? Seems to work for me. Didn't have to make any custom command. (Also, you can remove that turn switch 100 on after load that's in the script call list.)

Scene_Title.prototype.commandContinue = function() {
this._commandWindow.close();
DataManager.loadGame(0)
.then(() => {
SoundManager.playLoad();
SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
const p = $gamePlayer;
p.reserveTransfer($gameMap.mapId(), p.x, p.y, p.direction(), 0);
p.requestMapReload();
}
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad();
}).catch(() => {
SoundManager.playBuzzer();
}).finally(() => {
$gameSwitches.setValue(100, true);
});
};
It looks like your plugin doesn't have a place to set a condition to disable or hide the item, which seems like a rather big missing feature in their plugin. I guess you can get around it by adding this code to the script, above the code I previously gave you:

JavaScript:
if(!DataManager.savefileInfo(0)) {
SoundManager.playBuzzer();
return;
}

That'll make it look like it's selectable but complain when you try to select it. Not ideal, but definitely better than freezing up the title screen.

For what it's worth, I think the plugin-oriented code @rpgLord69 posted has the same downside, at least if used in isolation.
But the base game checks if you have any save files, if not, it greys out the continue? So it's greyed out until they play the game and it autosave for the first time. And after that the continue loads the autosave with that code.
Did you try just putting what's on the script call list (or like modify the continue command function with the stuff)? Seems to work for me. Didn't have to make any custom command. (Also, you can remove that turn switch 100 on after load that's in the script call list.)

Scene_Title.prototype.commandContinue = function() {
this._commandWindow.close();
DataManager.loadGame(0)
.then(() => {
SoundManager.playLoad();
SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
const p = $gamePlayer;
p.reserveTransfer($gameMap.mapId(), p.x, p.y, p.direction(), 0);
p.requestMapReload();
}
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad();
}).catch(() => {
SoundManager.playBuzzer();
}).finally(() => {
$gameSwitches.setValue(100, true);
});
};
hm, I dont quite catch, the hendrix plugin allows me to add a video on my title screen so it is important for me to add. I added the script to the custom command but when I run it and click the continue it freezes the buttons and the hover even if I restart and run new game and click on it again 😢


Scene_Title.prototype.commandContinue = function() {

this._commandWindow.close();

DataManager.loadGame(0)

.then(() => {

SoundManager.playLoad();

SceneManager._scene.fadeOutAll();

if ($gameSystem.versionId() !== $dataSystem.versionId) {

const p = $gamePlayer;

p.reserveTransfer($gameMap.mapId(), p.x, p.y, p.direction(), 0);

p.requestMapReload();

}

SceneManager.goto(Scene_Map);

$gameSystem.onAfterLoad();

}).catch(() => {

SoundManager.playBuzzer();

};

It looks like your plugin doesn't have a place to set a condition to disable or hide the item, which seems like a rather big missing feature in their plugin. I guess you can get around it by adding this code to the script, above the code I previously gave you:

JavaScript:
if(!DataManager.savefileInfo(0)) {
SoundManager.playBuzzer();
return;
}

That'll make it look like it's selectable but complain when you try to select it. Not ideal, but definitely better than freezing up the title screen.

For what it's worth, I think the plugin-oriented code @rpgLord69 posted has the same downside, at least if used in isolation.
hm, like this?


if(!DataManager.savefileInfo(0)) {

SoundManager.playBuzzer();

return;

}

Scene_Title.prototype.reloadMapIfUpdated = Scene_Load.prototype.reloadMapIfUpdated;

DataManager.loadGame(0).then(Scene_Load.prototype.onLoadSuccess.bind(SceneManager._scene)).catch(() => SoundManager.playBuzzer());
Aha ok, I thought that it allowed you to use the basic commands and stuff. But anyway, don't put the function in there, put the code that's inside. But yeah, I just commented about the basic stuff, maybe what the other dude is saying works for you.

SceneManager._scene._commandWindow.close();
DataManager.loadGame(0)
.then(() => {
SoundManager.playLoad();
SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
const p = $gamePlayer;
p.reserveTransfer($gameMap.mapId(), p.x, p.y, p.direction(), 0);
p.requestMapReload();
}
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad();
}).catch(() => {
SoundManager.playBuzzer();
}).finally(() => {
$gameSwitches.setValue(100, true);
});
Aha ok, I thought that it allowed you to use the basic commands and stuff. But anyway, don't put the function in there, put the code that's inside. But yeah, I just commented about the basic stuff, maybe what the other dude is saying works for you.

SceneManager._scene._commandWindow.close();
DataManager.loadGame(0)
.then(() => {
SoundManager.playLoad();
SceneManager._scene.fadeOutAll();
if ($gameSystem.versionId() !== $dataSystem.versionId) {
const p = $gamePlayer;
p.reserveTransfer($gameMap.mapId(), p.x, p.y, p.direction(), 0);
p.requestMapReload();
}
SceneManager.goto(Scene_Map);
$gameSystem.onAfterLoad();
}).catch(() => {
SoundManager.playBuzzer();
}).finally(() => {
$gameSwitches.setValue(100, true);
});
this one works but when theres no autosave ( hasnt started new game ) the title screen reloads ( goes fades out and in ) and it freezes 😅
Yeah, like I said, I thought it worked with the default command functionalities, but seems like not. So you need to make the conditional to check if the save file exists (like the other dude told you).

How does it add the commands in the plugin file? I think the base game adds them with like the add command where you select if it's enabled, something like: addCommand(key, "text", enabled);If it uses that, maybe you can also make it greyed out with that.
But the base game checks if you have any save files, if not, it greys out the continue? So it's greyed out until they play the game and it autosave for the first time. And after that the continue loads the autosave with that code.
If you're using the basic menu, I think that's correct, yes, but they're using a custom menu that completely replaces the basic one from what I understand.

hm, like this?
Yes.

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