Here is the first version of the plugin. I'll upload it to Pastebin, once it's finished:
/*: * @plugindesc Replaces the default load/save system of MV with a single savefile, that automatically gets used. * <Iavra Single Save> * @author Iavra * * @param Savefile Id * @desc The id to be used to save and load the game. I don't actually see, why anyone would want to change this. * @default 1 */var IAVRA = IAVRA || {};(function($) { "use strict"; /** * Loads the plugin parameters independent from the plugin's actual filename. */ var _params = $plugins.filter(function(p) { return p.description.contains('<Iavra Single Save>'); })[0].parameters; /** * The savefile id we will be using, to save/load the game. This can be changed via the "Savefile Id" plugin * parameter and will automatically be kept within the range [1, 20] (or whatever DataManager.maxSavefiles() is). */ var _savefileId = (parseInt(_params['Savefile Id']) || 0).clamp(1, DataManager.maxSavefiles()); //============================================================================= // IAVRA.SINGLESAVE //============================================================================= $.SINGLESAVE = { /** * Saves the game in the designated save slot and returns, whether the save was a success or not. Can also be * used to implement an autosave or quicksave. */ save: function() { $gameSystem.onBeforeSave(); return DataManager.saveGame(_savefileId); }, /** * Loads the game from the designated save slot and returns, whether the load was a success or not. Can also be * used to implement a quickload. */ load: function() { if(DataManager.loadGame(_savefileId)) { $gameSystem.onAfterLoad(); Scene_Load.prototype.reloadMapIfUpdated.call(null); SceneManager.goto(Scene_Map); if(SceneManager._scene) { SceneManager._scene.fadeOutAll(); } return true; } else { return false; } } }; //============================================================================= // Scene_Title //============================================================================= (function($) { /** * On continue, automatically load the designated savefile. If the load was a success, play the sound effect, * close the command window and fade out the scene. If the load failed, play the buzzer and reactivate the * command window. */ $.prototype.commandContinue = function() { if(IAVRA.SINGLESAVE.load()) { SoundManager.playLoad(); this._commandWindow.close(); } else { SoundManager.playBuzzer(); this._commandWindow.activate(); } }; })(Scene_Title); //============================================================================= // Scene_Menu //============================================================================= (function($) { /** * On save, automatically save to the designated savefile and play a sound effect, depending on whether the * save was a success or failure. Also reactivate the command window, since we haven't changed the scene. */ $.prototype.commandSave = function() { if(IAVRA.SINGLESAVE.save()) { SoundManager.playSave(); } else { SoundManager.playBuzzer(); } this._commandWindow.activate(); }; })(Scene_Menu); //============================================================================= // DataManager //============================================================================= /** * Since we only care about a single savefile, we only need to check that one. Otherwise, the "continue" option of * the title scene would be activated, if a different savegame exists. */ DataManager.isAnySavefileExists = function() { return this.isThisGameFile(_savefileId); };})(IAVRA);
Features:
- The "Continue" option of the title menu automatically loads savefile #1 (or whatever id was set in the plugin parameters).
- The "Save" option of the game menu automatically saves to the same savefile.
- The script calls "IAVRA.SINGLESAVE.save()" and "IAVRA.SINGLESAVE.load()" can be used to quicksave/quickload the game (can be used for autosaving, too).
Planned Features:
- Automatically overwrite the savefile, when starting a new game (controllable by plugin parameter?)
- If overwrite is enabled: Ask the player, if he really wants to overwrite the existing save, before starting a new game.
- Maybe show a "game saved" popup, when the player pressed "Save" in the game menu, because currently the sound effect is the only feedback to know, whether the save was successful.
Please note, that the event command "Open Save Screen" shouldn't be used, since it's technically still possible to save the game in other slots (although the "Continue" option of the title scene will only be enabled, if the specified savefile exists. Other will be ignored).
/edit: I can change the "Open Save Screen" command to either
(In the future, post general how-to/is-this-possible questions in the appropriate Support subforum, not in Game Mechanics Design. Script requests go in the appropriate Script Request subforum.)
I believe the default scripts contain a parameter for "max save files" (VX Ace's is "self.savefile_max" under DataManager) where you can choose how many save files there are. You can choose "1" if you want to! I guess Pokemon let you save with a single click rather than making you choose this one save file, but this would be a really good stopgap until someone makes a script for you.
DataManager.maxSavefiles = function() { return 20;};But yeah, this would still show the save/load menus displaying 1 entry. Although this would be an interesting alternative: Instead of just saving/loading the game, i could modify the save/load menus to display the 1 save in a better way (show more details, maybe map snapshot, etc).Since this is GameDevon's request, i'll leave it up to him/her to choose the alternative:
- Completely disable the save/load menus and just use the 1 save.
- Modify the menus to just display the 1 save and show more detailed information.
@Wavelength thanks for the idea! I will keep that in mind.
@lavra thank you so much! The features you've added so far and the ones you plan to add are perfect!
On using the event command "Open Save Screen", I don't think I will have that problem as I evented a custom menu (shown in the spoiler below) with no save option as I will be using save points instead.
Automatically overwriting save file, confirming the overwrite and showing a game saved popup would be perfect though!
However, it seems to me that those can be done using choices and show text in events - am I missing something?
The save/load menu will display the save contents, a short message and a confirmation windows ("load game?" "Yes"/"No"). When creating a new game, the game will be saved with a confirmation dialogue, if there was already an existing save.
For quick-/autosave or quickload it's still possible to bypass the dialogues and directly save/load via "IAVRA.SINGLESAVE.save()" / "IAVRA.SINGLESAVE.load()".
@Wavelength thanks for the idea! I will keep that in mind.
@lavra thank you so much! The features you've added so far and the ones you plan to add are perfect!
On using the event command "Open Save Screen", I don't think I will have that problem as I evented a custom menu (shown in the spoiler below) with no save option as I will be using save points instead.
Automatically overwriting save file, confirming the overwrite and showing a game saved popup would be perfect though!
However, it seems to me that those can be done using choices and show text in events - am I missing something?
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.