Force/Auto Save

Hey everyone,

I am looking for a plugin or way to automatically save the game on command. My game features lootboxes with randomized loot, and without a force save on opening those boxes, people can simply reload their game until they get the item of their dreams.

If a plugin like that is already available, I apologize for being so inadequate at using the search function and would appreciate a link to it.

Regards,
Gin-Shiio
This would be a hard one to coordinate for the purpose you want it for, as assuming the player is able to save games via other means they could still load a save from before they opened the lootbox if they wanted something else from it.
This would be a hard one to coordinate for the purpose you want it for, as assuming the player is able to save games via other means they could still load a save from before they opened the lootbox if they wanted something else from it.

That is very true. The only way to circumvent that would be to lock the player to one specific save file at a time, or disable manual saving altogether. The latter is rather easily accomplished, and would be my go-to approach, granted someone can come up with an auto save plugin. (Dying in my game doesn't lead to a gameover, so it would be impossible to back oneself into a corner via save files.)
The simplest thing if you were just locking the player to one specific save that gets autosaved without the ability to manual save would be to just look at the code for when the player hits 'ok' on a save slot in the save scene and copy it.
The simplest thing if you were just locking the player to one specific save that gets autosaved without the ability to manual save would be to just look at the code for when the player hits 'ok' on a save slot in the save scene and copy it.

I'm starting to feel guilty towards you, but how would I determine the index number of the current active saveslot?
DataManager.lastAccessedSavefileId()
Thank you. I am pretty bad at this, but will try figure it out.

StorageManager.save(savefileId, json);
this._lastAccessedId = savefileId;
var globalInfo = this.loadGlobalInfo() || [];
globalInfo[savefileId] = this.makeSavefileInfo();
this.saveGlobalInfo(globalInfo);
return true;

looks interesting to me at first glance. This will probably be a trial and error affair for me. Which is okay!
Pardon the doublepost, but I managed to figure it out. Huge thanks to you, Trihan! This topic can be closed.
Pardon the doublepost, but I managed to figure it out. Huge thanks to you, Trihan! This topic can be closed.
Hey man, before this is closed, I'm just gonna throw my opinion in here xD
Why dont you choose the random loot right when they start the game, not before they open the chest?
It's still different most times you play the game, and if you save before opening the chest, it still gives you the same item.

Edit: I wrote this with the idea that you were using var's xD but maybe if you arent, it can still work?
Hey man, before this is closed, I'm just gonna throw my opinion in here xD
Why dont you choose the random loot right when they start the game, not before they open the chest?
It's still different most times you play the game, and if you save before opening the chest, it still gives you the same item.

Edit: I wrote this with the idea that you were using var's xD but maybe if you arent, it can still work?

Thanks for the input. My loot system works similar to that in let's say Diablo. It is possible people will find many boxes, or none. It is all RNG. Since I cannot know the amount people will find, and the amount can go up to infinite, it would be impossible for me to determine the drops at the beginning of the game.
hey guys ... Did this work then as I have tried plugins and many script calls but they don't seem to work on my project.. I have mostly yanfly plugins and there causing the problems for me.. Lol thanks

Original thread: https://forums.rpgmakerweb.com/threads/force-auto-save.75817/