MV Straight to choosing a save slot?

Thanks @Arthran and @woootbm for the codes. 🙏

With regards to the purpose of this thread @woootbm, why not just create an easy mode where drops are guaranteed if save-scumming for drops is an issue?

Besides, if I were a player who wants to cheese your game, I won't bother with save-scumming. I'll just open the data folder and play with the JSON files there.
After some digging around the internet, it turns out this command seems to be what to do to create a valid save:

JavaScript:
$gameSystem.onBeforeSave();
if (DataManager.saveGame(index)) { StorageManager.cleanBackup(index);}

EDIT:
I don't think I thanked @Arthran enough. Thanks, yo! You are a champion!
No problem. Sorry I didn't get back to you sooner. I had actually logged in to help you resolve this just now, but I'm glad you got it figured out.

Really, the lack of $gameSystem.onBeforeSave(); was the cause of the issue you were experiencing. The other line is a good practice, but it doesn't have any bearing on why it's now working. The difference between DataManager.saveGameWithoutRescue(i) and the new line that you're using is that the latter backs up the previous save file before saving, and restores it if there is some type of error. However, I had gone with the former, since that functionality isn't necessary for your purposes. Since you're only using the command to create an initial save file, there will be nothing to backup anyway. But the latter is definitely a better practice for regular saving.
@Arthran I think that makes sense. Perhaps one of my plugins needs some of the extra data saved by the backup? My project is a little sloppy. I hope a real coder like yourself never looks at the thing, I'm sure you'd be upset :hswt:

@Anastasius Save-scumming shouldn't be necessary even on the hardest difficulty. Players just have bad habits. Drops will be frequent and I'll cap the totals pretty low so players can't horde but shouldn't need to. I also made a stat called Efficiency which drastically lowers resource usage. So if you want to spam, you just dump points into that.
The saga continues...

Just for the posterity of internet searchers out there, there was one last bug I needed to iron out:

JavaScript:
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
    if (!DataManager.isThisGameFile(i)) {
        $gameSwitches.setValue(41, true);
        $gameSystem.onBeforeSave();
if (DataManager.saveGame(i)) { StorageManager.cleanBackup(i);
if (DataManager.loadGame(i)) {$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);$gamePlayer.requestMapReload();SceneManager.goto(Scene_Map);}}
        break;}
    if (i === DataManager.maxSavefiles()) {
        $gameMessage.setPositionType(1);
        $gameMessage.add("No save slots available! Please delete a save and try again.");
        this.setWaitMode("message");
        $gameTemp.pickSlot = true;}}

I had to put in a load game command because Yanfly's plugin doesn't seem to consider the save created by this command to be the "most recent" until it's been loaded. I missed this bug because I was loading the saves each time to make sure they weren't corrupt. There's probably a more elegant solution to inform the Autosave plugin which save is most recent, but this is what I came up with.

Original thread: https://forums.rpgmakerweb.com/threads/straight-to-choosing-a-save-slot.148106/