MV Straight to choosing a save slot?

Hey all,

So I've been tinkering with the idea of having manual saves disabled and using frequent auto-saves. I'm using Yanfly's autosave plugin.

I'm most of the way there. I figured out how to remove the save command from the Save/Load screen. But the issue is that this plugin requires the player to create a save before it can work, and doesn't give any commands to do that. So when I use any command (that I know) to open the save screen, it'll go to the one where I disabled the save command.

So I either need to open straight to the window where the player chooses a save slot via script (as a one-time event through the course of the game). Or, I need to auto-generate a save that doesn't save over any previous slots (again a one-time event).
Is your game permadeath or roguelike? If possible, I would limit the player's ability to manually save, but not remove it completely. I'm sure others feel differently, but unless it made sense from a design and mechanic perspective, it'll probably only prove to frustrate your players.

Have you considered persistent variables? I believe HimeWorks has tutorials on that.
No, normal RPG. There's a lot to consider on the design aspect. Which is why I'm still mostly considering it. Basically I'm worried my game has a high degree of save-scumming available. So limiting saving is actually about encouraging the player to accept the consequences. I'm making sure they are never in an unwinnable scenario, and trying to ensure that their consequences are always their choice.

Persistent variables? So they load a previous save and they're stuck in the same situation? Now THAT sounds frustrating.
TSR_Save can start from a save slot to start your adventure.
as it isn't compatible with YEP_SaveCore, it does have an autofeature
in it (per map, by force etc) on the saveslot that was selected.

you can even fully customise it as well or keep it plain simple for use.
Basically I'm worried my game has a high degree of save-scumming available. So limiting saving is actually about encouraging the player to accept the consequences. I'm making sure they are never in an unwinnable scenario, and trying to ensure that their consequences are always their choice.
Hey, throwing this out there for you to consider;

One save file, that is shared with the autosave feature. That way when important things happen that have consequences, it saves the game. That way, you can allow people to leave off where they want to as well as having a way to do exactly what you want to do!
You can get to the save slot screen with:
JavaScript:
SceneManager.push(Scene_Save);

If you're saying that you disabled the ability to save from that screen, then it won't work. But I don't know why you would have done that, so I'm assuming (possibly incorrectly) that you just disabled the save button in the main menu, instead of actually breaking Scene_Save.

Or if you don't need them to pick, and you just want to forcefully save in the first empty slot, I believe this would work:
JavaScript:
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
    if (!DataManager.isThisGameFile(i)) {
        DataManager.saveGameWithoutRescue(i);
        break;
    }

    if (i === DataManager.maxSavefiles()) {
        console.log('There are no save slots available!');
    }
}

It won't do anything if all the slots are full (by default it's a max of 20), since I dunno how you wanna handle that situation.
No, normal RPG. There's a lot to consider on the design aspect. Which is why I'm still mostly considering it. Basically I'm worried my game has a high degree of save-scumming available. So limiting saving is actually about encouraging the player to accept the consequences. I'm making sure they are never in an unwinnable scenario, and trying to ensure that their consequences are always their choice.

Persistent variables? So they load a previous save and they're stuck in the same situation? Now THAT sounds frustrating.
In that case, sounds like it could work pretty well then. However, keep in mind that this type of system can also be easily abused — all somebody needs to do is make constant backups of the autosave file, and replace the current one with a backup if they don't like the outcome. This is also a problem in AAA games. I figure, why not allow the player flexibility, because there's always ways to exploit systems anyway.

Persistent variables are only frustrating if you're using it as a way to prevent or impede on gameplay in a negative way. If used responsibly and in moderation, they can add a lot to your game. For example, imagine your title, menu or window skin changing based on where you are in the story.
TSR_Save can start from a save slot to start your adventure.
Well I would wanna try it first then pay after if I like it. I'm scared to name my own price at zero :hswt:
Regardless, I guess I'm holding off on tackling new plugin authors to avoid possible compat issues.
One save file, that is shared with the autosave feature. That way when important things happen that have consequences, it saves the game. That way, you can allow people to leave off where they want to as well as having a way to do exactly what you want to do!
I'm not sure how this is different from the idea I want. You mean they can also manual save in the auto-save slot? That prevents some versions of save-scumming, but not the one I care about most. Which is people going "dang, I used too many items" and trying again. I want people to move on and not get all perfectionist, heh.
However, keep in mind that this type of system can also be easily abused — all somebody needs to do is make constant backups of the autosave file, and replace the current one with a backup if they don't like the outcome.
I find the best policy is to not worry about modders/hackers. The average player doesn't even change their keybindings. I only care about the normal user experience.

As for persistent variables, how would that work with multiple playthroughs? Perhaps this is silly of me, but I'd rather players have access to multiple saves of different progression. Say they're a speedrunner, or a shared household PC.

@Arthran
Ah, brilliant! I tried to touch it up a little:
JavaScript:
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
    if (!DataManager.isThisGameFile(i)) {
        DataManager.saveGameWithoutRescue(i);
        break;
    }

    if (i === DataManager.maxSavefiles()) {
        $gameMessage.setPositionType(1);
        $gameMessage.add("No save slots available! Please delete a save and try again.");
        SceneManager.push(Scene_Save);
    }
}
The problem I have is that the message and the save scene happen at the same time. I'm an idiot, I don't know how to make it do those things one at a time ^_^;;;

EDIT: Whoops, just discovered the saves it creates can't be loaded. Not sure if that's because of changes I made. Will have to check.
I'm not sure how this is different from the idea I want. You mean they can also manual save in the auto-save slot? That prevents some versions of save-scumming, but not the one I care about most. Which is people going "dang, I used too many items" and trying again. I want people to move on and not get all perfectionist, heh.
Make it autosave after every battle
@woootbm
You will need two separate script calls to do that. The first one:
JavaScript:
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
    if (!DataManager.isThisGameFile(i)) {
        DataManager.saveGameWithoutRescue(i);
        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;
    }
}

The second one (put this in a new Script... command, right after the first one):
JavaScript:
if ($gameTemp.pickSlot) {
    $gameTemp.pickSlot = false;
    SceneManager.push(Scene_Save);
}

You also might want to change that message a little. "Please delete a save and try again" makes it sound like you need to activate the event again, after picking a file. It'd probably be better to say something like: "Please choose a save to overwrite", or something like that.
You also might want to change that message a little. "Please delete a save and try again" makes it sound like you need to activate the event again, after picking a file. It'd probably be better to say something like: "Please choose a save to overwrite", or something like that.
Well, yes. Since I disabled the save button entirely they can't choose a slot on their own. I'm thinking of just having this be a moment at the start of the game where the player is tasked to push a button (event) to confirm their save... I haven't hashed out the details to make it more "immersive." Otherwise I'd have to add much more to this script to make it loop until the player successfully deletes a slot and also successfully saves.

So I tested some more and I don't think this error is due to changes I made. When I undo those changes, I can load new saves fine but not new saves created by this script. Is it missing something to create saves fully?

Code:
TypeError: Cannot read property 'name' of null
    at Function.AudioManager.playBgm (rpg_managers.js:1180)
    at Game_System.onAfterLoad (rpg_objects.js:239)
    at Scene_Load.Scene_File.terminate (YEP_SaveCore.js:1246)
    at Scene_Load.terminate (YEP_SaveCore.js:1250)
    at Function.SceneManager.changeScene (rpg_managers.js:1998)
    at Function.SceneManager.updateMain (rpg_managers.js:1982)
    at Function.SceneManager.update (rpg_managers.js:1907)
There is probably another step that has to happen during the initial saving process, which I missed. I'll have to take a look at it a little later. I'm gonna be tied up with some work I gotta take care of for the next several hours.

But why did you disable saving on the save screen? Couldn't you have just removed the save option from the main menu, so they can't get to that screen in the first place?
Basically I'm worried my game has a high degree of save-scumming available. So limiting saving is actually about encouraging the player to accept the consequences. I'm making sure they are never in an unwinnable scenario, and trying to ensure that their consequences are always their choice.
So just throwing my opinion out there...don't bother. It seems kind of at odds to me that you say you want to encourage players to accept the consequences of their choices...while simultaneously eliminating their choices 😛

As Pasteleptic points out, if a player really wants to circumvent your game mechanics and cheat, you can't prevent them. And forcing me to manually copy a save game that I can restore is really not a very difficult thing...you're liable to spend more time coding this workaround into your game than a player would spend circumventing it.

I'm a big proponent of letting players do what they want. So long as this isn't a multiplayer game where they have the potential to ruin it for other people, what difference does it make to you what the players do with the game they bought? Those who want to play it vanilla will experience the game you crafted, and those who want to min-max will find a way (or will just delete your game if you make it too frustrating).
But why did you disable saving on the save screen? Couldn't you have just removed the save option from the main menu, so they can't get to that screen in the first place?
Yeah, I can certainly do that. This change is VERY QoL. And minor at that. I'm assuming players will still want to hit the load button in-game, but I can't let them do that without them seeing a misleading greyed-out save button. But I'd love to get this kind of polish where I can. In my next prototype, I'll want to include this auto-saving design to see how well it goes.

So just throwing my opinion out there...don't bother. It seems kind of at odds to me that you say you want to encourage players to accept the consequences of their choices...while simultaneously eliminating their choices 😛

As Pasteleptic points out, if a player really wants to circumvent your game mechanics and cheat, you can't prevent them. And forcing me to manually copy a save game that I can restore is really not a very difficult thing...you're liable to spend more time coding this workaround into your game than a player would spend circumventing it.

I'm a big proponent of letting players do what they want. So long as this isn't a multiplayer game where they have the potential to ruin it for other people, what difference does it make to you what the players do with the game they bought? Those who want to play it vanilla will experience the game you crafted, and those who want to min-max will find a way (or will just delete your game if you make it too frustrating).
Alright, so I didn't think I'd have to explain the design philosophy in a Javascript forum, so mods don't blame me for this turning into a design topic for a little bit, hehe.

There's a saying that goes something like, "You have to protect players from themselves." In this case, it is about players optimizing the fun out of the game. After talking with a friend, we discussed how my game has a lot of "consumable" management. And as a result, players will be highly tempted to save-scum to get the best results of every fight. This can snowball and the player will become some miserable hoarder counting their pennies, spending more time reloading saves than actually playing the game; killing pacing, tension, etc. So even though this is a limitation, it is ironically meant to free the player!

To make this not a pain in the behind, I have made a number of considerations:
  • Difficulty setting (not implemented yet) that can be changed at any time (and has no effect on rewards, achievements, etc).
  • Generous use of auto-saves:
    • After every victory
    • Loading into a map (that's safe)
    • NOT saving after conversations, in case the player chose the wrong thing or didn't understand what they were choosing
  • In general, it should be difficult to get into an unwinnable state.
    • Usually fights end with a Restore All for the party.
    • "Consumables" are the main concern, but regular fights can be hobbled through. Big fights should have restocking (like putting a bunch of chests before a boss). And the player can always change the difficulty if they have to
    • There's also several ways to play the game that avoid depending on limited resources as well.
  • Story choices will be very deliberate
    • IE it should be obvious whether killing someone or sparing them is the good choice. As opposed to some arbitrary butterfly effect where some unpredictable thing comes about from your choice.
    • But at the same time, a common theme is that people are selfish jerks. You will do the good thing, but bad things still happen anyway
I'm trying to do a lot of playtesting on this one. I even plan to have a kind of beta test where I'm thinking of actually paying folks to do bug hunting and qual testing (at the end of production, so not any time soon). I'm not the Dark Souls fanboy type, so I'm not going to be making some aggravating experience where the player dies left and right. What I am trying to do is find that sweet spot between modern streamlining/QoL stuff and old school "figure it out yourself" mentalities. And that means there's definitely like a Mass Effect approach where the game always progresses, even if you're being a big jerk.
I find the best policy is to not worry about modders/hackers. The average player doesn't even change their keybindings. I only care about the normal user experience.

As for persistent variables, how would that work with multiple playthroughs? Perhaps this is silly of me, but I'd rather players have access to multiple saves of different progression. Say they're a speedrunner, or a shared household PC.
You have a valid point. At the end of the day, it's your game, and you should develop it how you see fit. My original reply was trying to figure out if you were trying to do it this way due to design choice or native engine limitations. As you've explained in your latest post, I think it's a pretty good system that would benefit from incremental automatic saves, if that is within the realm of possibility for you.

To answer your question about the variables, I believe they are limited to each user account on the system. They're permanent in the sense that the game keeps them stored as a value, regardless if you save or not, you could always change them on the code side of things at any point if you needed it changed. The main benefit I can think of on the top of my head are for unique dialogue options (for choices and NG+), and, to prevent save scumming random treasure boxes.
Alright, so I didn't think I'd have to explain the design philosophy in a Javascript forum
You don't have to do anything - as I said, I was simply expressing an opinion in case you hadn't considered it.

I do disagree with you on people's mentalities.
players will be highly tempted to save-scum to get the best results of every fight.
I don't believe that happens to any significant degree. People tend to behave in the same/similar ways in their lives. If someone is the kind to strategize and play their way through other games, they're doing to do that for yours.

If someone is accustomed to save scumming/min-maxing in other games, they're going to do that in yours. The way your consumables function is unlikely to affect that, unless you have overly punishing random results (in which case the player is doing it to correct a perceived fault in your game, not because your design has warped their personality 😉).

Anyway, I didn't intend to derail your thread, sorry.
@woootbm the plugin is free though, payment is optional.
so you can try it in a new project or back up your project
and test it out.

but if you have a smaller one is good too, but starting from
a savefile is nicer (which I use), and save points.
prevent save scumming random treasure boxes.
Oh, that's right. I need to auto-save on looting because there's some randomness there, too. That makes things a little weird with my aggro system :apparentlythere'snothinkingemoji:
You don't have to do anything - as I said, I was simply expressing an opinion in case you hadn't considered it.
Oh no, I might be a narcissist. The first thing I thought of when you said this was my own game 🤣:
1654120804320.png

If someone is accustomed to save scumming/min-maxing in other games, they're going to do that in yours.

(in which case the player is doing it to correct a perceived fault in your game, not because your design has warped their personality 😉).
This is true. Ultimately I want things to not be so severe that save-scumming feels needed, even on the hardest difficulty. But I am worried that players are conditioned to save-scum. Anecdotal, but I feel like everyone I've met save-scums given the tools. But, like I said, a lot of people don't fiddle with their game files. They don't even change their keybindings, which is crazy to me. So if <1% of my players want to shoot themselves in the foot by manually managing saves in Windows, they can go ahead. I'm more worried about the 99% who just play games as they are presented to them: if they can save-scum, they will. If they can't, they won't.

As research, I've been replaying Fallout 3 and 4 (I'll get to 2) and forcing myself as much as possible to spend spend spend. And also to not save-scum. I've failed a couple times in 3, heh. But it's a totally different experience. Myself and everyone I've known who plays these is soooo miserly in how they hoard and reset. And this is even when they choose an efficient stealth+one-shot type build. I want players to try out a lot more of the random cool items I throw their way. How to create that feeling that, "Yes, I should use my good things now" more consistently is my journey.
the plugin is free though, payment is optional.
I'll give it a shot if I can't figure out this save command properly. I just feel guilty downloading it for free :hswt:

Anyway, I've realized I'm dumb and I can fix this thing to loop more cleanly for UX:
1654121587578.png

I've got it so that if it creates a save, the player doesn't even see anything; the switch moves the event onto the next page. But it will stop players who manage to fill their save slots (somehow) until they clear up space. Pretty DUH. Sometimes I forget the most obvious things...

Fun fact: this freaking Script command has a line limit. I didn't even notice it was DELETING the brackets at the bottom when I added lines. Why is this a thing!

EDIT:
Anyway, I didn't intend to derail your thread, sorry.
Forgot this one. No need to apologize at all, I love talking about this stuff. I'm just worried we'll catch the eye of Sauron, heh.
it limits in lines, not in 1 line which in infinite 😛

but nice job figure a nice workaround that works too.
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);}

Where "index" is the number of the save slot. In my case, the variable "i."

So the final version looks like this:
1654195121970.png

I also moved where the switch happens, since originally I was saving before the switch got flipped. Which means if you loaded that save you would have this script run again.

Such clean UX now, ooooh.

EDIT:
I don't think I thanked @Arthran enough. Thanks, yo! You are a champion!

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