How to prevent "Load Games exploits" ?

Hello everybody,

I would like to thank in advance whoever will find some time to answer this question.
The game I am developing has many random things such as item boxes/treasures and so on.

Is there a way to store variables to prevent players to Exit and Load a game to open the treasure boxes many times
until they find what they want ?

Alternatively, is there a way to use only one save slot and make the game autosave once they open a crate?

The script code for treasure boxes is something like this, in case you mind:

Spoiler: treasure boxes
var weapons = [];

for (var i = 1; i <= 66; i++) {

weapons.push(i);

}

var index = Math.randomInt(weapons.length);

if (weapons[index] > 0) {

var reward = $dataWeapons[weapons[index]];

$gameMessage.add("Ottenuto " + reward.name + "!");

$gameParty.gainItem(reward, 1);

}

players could exploit even Skillchecks, as there are many, in the game.
Good evening.
Going into an arms race against save scalpers will only lead to hindering players who wont even reload a save if they got 2 coins from a chest, if people want to save scum they will find workarounds for your workarounds.

You autosave after the chest? excuse me while i save before the chest and reset the game while the chest text rolls if i deem the reward crappy enough.

Cant manually save? you better bulletproof tightly against locking a player in any unwinnable situaton ever as locking autosaves to one single slot and constantly overwriting it at every decision means if the player is on a super unfavorable state and got a very crappy chest that could actually give a potion to save their playtrough are now locked on a "haha sucks to be you! -dev" state, not fun.

People love the crap out of fallout new vegas, guess how many skillchecks, decisions and outcome variations that game has while allowing manual save and reloads freely.
You could make them sit through a minute-long NPC rant for savescumming like Mr Resetti from Animal Crossing but even AC got rid of that because it was annoying.
Is there a way to store variables to prevent players to Exit and Load a game to open the treasure boxes many times
until they find what they want ?
you could try seeding the rng maybe? reserve some variable that gets written to at the start of the run that determines what the chests drop for the rest of the run/some specified timeframe.

Alternatively, is there a way to use only one save slot and make the game autosave once they open a crate?
I advise against that as well. New Vegas was mentioned, so heres another NV example: i once had to abandon a save because i wanted to do a run where i didnt save/load and relied on only the autosave. a bug had me fall through the floor and into a basement of a locked building that i couldn't leave, but the autosave triggered after it happened and i had no save to load. 100% did it to myself, but the bottom line is an autosave slot shouldnt be the only slot, nor should it overwrite manual slots
Thanks for the advices so far till now.
Seeding the rng could work actually.
As prior people suggested...it really isn't worth it.

How does it harm or affect you, the developer, how people play your game?

If people want to grind, they're going to grind. If they want to save scum or cheat or exploit to get optimal results, they'll find a way.

If it's not a multiplayer game where that can harm other people's enjoyment, then why bother spending time and effort to try to prevent it?

"Best" case scenario, if someone wants to play by save scumming the best results and you actually manage to prevent it, they'll return the game and you're out a sale.
I can only echo @ATT_Turan here. Not only is it pointless to prevent savescumming, if we go a little further back and you're using the default RM encryption, I can easily decrypt your entire game within 5 seconds and just make the chests drop whatever the heck I want.

Another super simple thing a player can do is just using cheat engine. You can't win, and why would you even bother? Let them have fun with the game.
One more for team "Just let people savescum" here 😀
I'm basically a horrible, terrible, no good save scummer ever since I got my grubby li'l scum fingers on NETHACK, which I proceeded to scum the heck out of! And, may I say, I've gleaned a deep and dirty pleasure outa scummin ever since! Scumming, I LOVE IT 😍

However, if you wanna prevent save scumming, seeding the rng as per @Robro33's suggestion is prolly okay. Altho, Fire Emblem 7 had some kinda seeded rng, but I recall there was a way to skip the seed ahead a bit... WHICH LED ME TO SAVE SCUMMING LEVEL UPS SO I CUD GET OP 😍 WALLACE 😍 I have spoken. 😀
If you are really against it, search for a "persistent variables" plugin, there are several for other purposes.

However as with the people above I strongly suggest to use that only for specific select cases - it will not only irritate most players, it can also break a game if the player gets something too bad or too powerfull. NEVER make the winning of the game dependent on a random chance.
The most famous bad example was a game where the only weapon capable of harming the final boss dropped with a random chance <1%...

Or as an alternative you can implement savepoints: if the player can only save at the beginning of the level, he won't go savescumming to get the treasure at the end...
Another "it's not worth the effort" supporter here. Just let me play how I want, otherwise I can go find a game that will.

Altho, Fire Emblem 7 had some kinda seeded rng, but I recall there was a way to skip the seed ahead a bit... WHICH LED ME TO SAVE SCUMMING LEVEL UPS SO I CUD GET OP 😍 WALLACE 😍 I have spoken. 😀
Moving the RNG up is ridiculously easy. I've done on it on several occasions in order to trigger a life saving crit, though only in difficult hacks. But why Wallace though? You only get him if you go the crappy version of Four-Fanged Offense, which means you left one or more Lords severly underpowered.

I'm also biased toward Geitz, so there's that.
@Sword_of_Dusk Wallace is love!😍 I just really like Generals, and altho Oswin is technically better, well, I cud never get into him. I'm also in my pink mecha with Amelia, sooo... 😀
People overthink this.

Just limit the game to only have one save file and make it autosave when you open a treasure chest but before the actual randomization occurs.

Should you do this? No.

Anti-Save Scumming is a pointless gesture because the player will fight to get what they want regardless, and you're a fool if you think otherwise. Might as well make the process fun for the player by removing the pretense.
@Sword_of_Dusk Wallace is love!😍 I just really like Generals, and altho Oswin is technically better, well, I cud never get into him. I'm also in my pink mecha with Amelia, sooo... 😀
Ooh, another Amelia fan! Wonder if you like Gwendolyn too.
If you treat your players like no good dirty cheaters , they will either leave or actively try to cheat just to level the playing field.

Let the save scummers save scum. If someone getting consistent good RNG breaks your game, It would probably be wiser to rebalance the game itself.
I wouldn't try too hard. If you're mainly interested in protecting people from the temptation to do it casually, just roll your random stuff well in advance. Use some method of resetting the variables, as well, at inobvious times. But also make sure that generating random things, which truly, absolutely, permanently may not be ideal loots results or whatever, is the right design choice for your game.
Personally I think it's best to avoid a design that makes you want to save scum for loot. Fixed treasure chests with random content is not fun IMO.
Let the save scummers save scum.
That sounds very humanitarian.
Civilization had a checkbox to scramble the seed of the game on save, so that you couldn't save-scum to escape a disastrous outcome of a battle.

so, you can get out of that, that it's seed driven.
could seeds be used in something like RM?
Thanks for your help.
If you are using autosave-only, it is very easy. In your event for the loot roll, just do:

Roll random variable
Give fixed loot based on roll result
Change the event self-switch so the chest is now "opened"
Auto-save game
Show text: "You found X"

If the player resets when they see they received an item they don't want, it will be too late as the chest is switched to opened and the item is already in their bag before the auto-save, they will only miss the message saying what they got. If they reset too soon, they won't know what they would have received, so pointless to save scum.

Of course, if you are using normal save files, this won't work as they can just ignore the autosave file and load their last manual save.

As others have said though, I don't think it is worth worrying about. You can cheat in any game if you want to, most people just don't want to. A bit of scumming is also kind of useful if your game ever becomes popular enough that people want to dissect and document it to create guides and secret-hunt.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-prevent-load-games-exploits.163791/