As mentioned in the title I'm using Visustella Savecore and their autosave.
It works fine except for one thing: when loading a savefile, it's generally the last saved that is automatically picked, except autosave is never considered. I don't think it's very natural or convenient and would like to know if there is any way around it?
Thanks in advance for any suggestion.
MZ - Visustella Autosave not considered "last"
● ARCHIVED · READ-ONLY
-
-
Could you provide some screenshots. I have a few follow up questions but I want to make sure I'm not making any assumptions about your view
-
I'm on phone right now but what do you want a screenshot of?
-
Was out sorry.
The title screen and then what you see when you click Load Game -
The title screen shows pretty much the usual menu.
Then when clicking on continue it's just something pretty usual as well.
But instead of picking directly file 6 with the timer at 6:29:35, I'd like it to pick the autosave if the timer is more advanced, eg:
-
That's core behaviour, so if VisuStella doesn't have a parameter for that, a plugin written for the core scripts might help. E.g. (untested):
(Design note:plugin codeJavaScript:/*: * @target MZ * @plugindesc Allows auto-select of autosave slot on Scene_Load. * @author Caethyril * @url https://forums.rpgmakerweb.com/threads/173786/ * @help Free to use and/or modify for any project, no credit required. */ // Patch - also check timestamp of autosave. ;void (alias => { Scene_Load.prototype.firstSavefileId = function() { const r = alias.apply(this, arguments); if (this.needsAutosave() && r < DataManager._globalInfo[0]?.timestamp) return 0; return r; }; })(Scene_Load.prototype.firstSavefileId);DataManager.latestSavefileIddeliberately excludes autosave and the core scripts only use it for this auto-select thing. I don't know why it was coded that way, though, so I preferred to patch the load scene instead.) -
It looks like it works. Thank you very much.
-
OK, so it turns out it didn't work correctly...because I was comparing the usually-selected save file ID against the autosave timestamp. Should be timestamp vs timestamp: obvious in hindsight. :kaoslp:
Try this instead~
I did a quick test and it seemed OK, but let me know if you have any more problems with it~ :kaohi:plugin code v2JavaScript:/*: * @target MZ * @plugindesc v2 - allows auto-select of autosave slot on Scene_Load. * @author Caethyril * @url https://forums.rpgmakerweb.com/threads/173786/ * @help Free to use and/or modify for any project, no credit required. */ // Patch - also check timestamp of autosave. ;void (alias => { Scene_Load.prototype.firstSavefileId = function() { const r = alias.apply(this, arguments); if (this.needsAutosave()) { // Get & compare timestamps for usual & auto save files. const t = DataManager.savefileInfo(r)?.timestamp; const a = DataManager.savefileInfo(0)?.timestamp; if (t < a) return 0; } return r; }; })(Scene_Load.prototype.firstSavefileId); -
It looks like it did work this time, thank you.
-
Great, you're welcome! :kaojoy: