Hello you lovely lot.
I've tried various auto-save plugins, and Yanfly's is perfect, with the ability to set saves on different dependencies and the nice little pop-up box in the bottom right corner of the screen.
However, I'd really like it to use one specific slot - in this case, slot 24. It should be really easy to do, as the script is very straight forward and simple, but I'm having a brain fart and would like some help!
I should be as simple as setting the savefileId to 24, right? Or am I being stupid?
Thanks for any help!
~Mat
I've tried various auto-save plugins, and Yanfly's is perfect, with the ability to set saves on different dependencies and the nice little pop-up box in the bottom right corner of the screen.
However, I'd really like it to use one specific slot - in this case, slot 24. It should be really easy to do, as the script is very straight forward and simple, but I'm having a brain fart and would like some help!
//=============================================================================
// ConfigManager
//=============================================================================
ConfigManager.autosave = Yanfly.Param.AutosaveDefault;
Yanfly.Autosave.ConfigManager_makeData = ConfigManager.makeData;
ConfigManager.makeData = function() {
var config = Yanfly.Autosave.ConfigManager_makeData.call(this);
config.autosave = this.autosave;
return config;
};
Yanfly.Autosave.ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
Yanfly.Autosave.ConfigManager_applyData.call(this, config);
this.autosave = config['autosave'] || Yanfly.Param.AutosaveDefault;
};
//=============================================================================
// DataManager
//=============================================================================
Yanfly.Autosave.DataManager_setupNewGame = DataManager.setupNewGame;
DataManager.setupNewGame = function() {
Yanfly.Autosave.DataManager_setupNewGame.call(this);
StorageManager.setCurrentAutosaveSlot(this._lastAccessedId);
$gameTemp._autosaveNewGame = true;
$gameTemp._autosaveLoading = false;
};
Yanfly.Autosave.DataManager_saveGame = DataManager.saveGameWithoutRescue;
DataManager.saveGameWithoutRescue = function(savefileId) {
var value = Yanfly.Autosave.DataManager_saveGame.call(this, savefileId);
$gameTemp._autosaveNewGame = false;
$gameTemp._autosaveLoading = false;
StorageManager.setCurrentAutosaveSlot(savefileId);
return value;
};
Yanfly.Autosave.DataManager_loadGame = DataManager.loadGameWithoutRescue;
DataManager.loadGameWithoutRescue = function(savefileId) {
var value = Yanfly.Autosave.DataManager_loadGame.call(this, savefileId);
$gameTemp._autosaveNewGame = false;
$gameTemp._autosaveLoading = true;
StorageManager.setCurrentAutosaveSlot(savefileId);
return value;
};
//=============================================================================
// StorageManager
//=============================================================================
StorageManager.getCurrentAutosaveSlot = function() {
return this._currentAutosaveSlot;
};
StorageManager.setCurrentAutosaveSlot = function(savefileId) {
this._currentAutosaveSlot = savefileId;
};
StorageManager.performAutosave = function() {
if ($gameMap.mapId() <= 0) return;
if ($gameTemp._autosaveNewGame) return;
if (!$gameSystem.canAutosave()) return;
SceneManager._scene.performAutosave();
};
I should be as simple as setting the savefileId to 24, right? Or am I being stupid?
Thanks for any help!
~Mat