[Solved...?] Deleting Save File In-Game In MZ

Nowis-337

Villager
Member
Joined
Oct 29, 2019
Messages
18
Reaction score
22
First Language
English
Primarily Uses
RMMV
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:
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);
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!
Code:
var saveName = DataManager.makeSavename(id);
StorageManager.remove(saveName);
DataManager.removeInvalidGlobalInfo();
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.
 
Last edited:

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
56
Reaction score
9
First Language
English
Primarily Uses
RMMV
Glad to know how to do it in MV. Your question answered one of mine. Good luck finding your answer.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.

Forum statistics

Threads
104,390
Messages
1,006,035
Members
135,919
Latest member
SuitonKoton
Top