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

Nowis-337

Villager
Member
Joined
Oct 29, 2019
Messages
19
Reaction score
24
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
69
Reaction score
10
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

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top