Hi all,
I am looking into script calls to delete save files from within the game in MZ.
From researching around the forums, I found the following script call for MV which works perfectly for my purpose when used within MV:
From my amateur digging around the MZ corescript, I've narrowed it down to:
With this, I can physically see the save file delete from the save folder. However, the save file information remains in the file slot in the save file list window (although it acts like an empty save slot). Neither refreshing the window nor reloading the save/load scene would get rid of it. The only way for that stubborn save slot to empty is to close the game and test-play again.
It would be much appreciated for someone to point me in the right direction to allow that save file window to update appropriately.
Thanks in advance!
EDIT 1:
DISCLAIMER: I am still a beginner at JS stuff so I'm not sure if it breaks anything else!
The following seems to solve my issue. Would be great for confirmation from someone who actually knows what they are doing though!
EDIT 2: Deleting files this way seems to somehow affect the DataManager.selectSavefileForNewGame() function (tends to select an empty save slot down the list when others are empty) - no idea how to fix this.
I am looking into script calls to delete save files from within the game in MZ.
From researching around the forums, I found the following script call for MV which works perfectly for my purpose when used within MV:
Code:
StorageManager.remove(id);
From my amateur digging around the MZ corescript, I've narrowed it down to:
Code:
var saveName = DataManager.makeSavename(id);
StorageManager.remove(saveName);
It would be much appreciated for someone to point me in the right direction to allow that save file window to update appropriately.
Thanks in advance!
EDIT 1:
DISCLAIMER: I am still a beginner at JS stuff so I'm not sure if it breaks anything else!
The following seems to solve my issue. Would be great for confirmation from someone who actually knows what they are doing though!
Code:
var saveName = DataManager.makeSavename(id);
StorageManager.remove(saveName);
DataManager.removeInvalidGlobalInfo();
Last edited:

