Skip to content

Instantly share code, notes, and snippets.

@stevenwithaph
Created August 4, 2021 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenwithaph/83e25ebd51eb6a2ac42a068796bf1cea to your computer and use it in GitHub Desktop.
Save stevenwithaph/83e25ebd51eb6a2ac42a068796bf1cea to your computer and use it in GitHub Desktop.
Allow quick saving in rpg maker mv from the menu.
(() => {
var quickSaveId = 1;
Window_SavefileList.prototype.drawTitle = function(savefileId, x, y) {
if (savefileId === 0) {
this.drawText(TextManager.autosave, x, y, 180);
} else if (savefileId === 1) {
this.drawText('Quick Save', x, y, 180);
}
else {
this.drawText(TextManager.file + " " + (savefileId-1), x, y, 180);
}
};
Scene_Menu.prototype.commandSave = function() {
DataManager.saveGame(quickSaveId)
.then(() => this.onSaveSuccess())
.catch(() => this.onSaveFailure());
};
Scene_Menu.prototype.onSaveSuccess = function() {
SoundManager.playSave();
this.popScene();
};
Scene_Menu.prototype.onSaveFailure = function() {
SoundManager.playBuzzer();
this.activateListWindow();
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment