Gambling minigame - avoiding an obvious exploit

Scribblestick

Villager
Member
Joined
Jun 25, 2020
Messages
18
Reaction score
4
First Language
English
Primarily Uses
RMMV
In my poject, I've created a simple gambling minigame between the player and an NPC. The game can be replayed indefinitely until the player lacks the funds to make a minimum bet. However, clever players can save between bets and just always bet the maximum, then reload the game if they lose. Repeat for infinite money. I'm wondering how I can prevent this. My first thought was to trigger an autosave after each bet, but clever players can circumvent that with multiple save files.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,548
Reaction score
3,314
First Language
Binary
Primarily Uses
RMMZ
smarter players can open the game console and type $gameParty.gainGold(999999999999999999999999) and hit enter. I wouldnt worry about it too much tbh. Hackers gonna hack, just concentrate on making your game as fun as possible to give the 'regular' players a better time. :)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,888
First Language
English
Primarily Uses
RMVXA
A few ways you can get around Save Scumming with quick, random events are to:
  • Actually determine the RNG results far in advance (for example, right after the start of your game) and store them in an array for whenever they get used - this means that when you reload a save and try an event again, you'll get the same results each time, not new results
  • Autosave the game as soon as the player hits enter to play the event, or (like Evolution: Worlds) force the player to save after choosing to play the event but before revealing the result - I don't recommend this, it's a very unfun approach
  • Detect save scum behavior (for example with a global file stored on a Notepad somewhere that detects how often the game is loaded shortly after an RNG event), lets the player know in some cute way that it knows you're save scumming, and punishes the player (for example removing access to the minigame for a few hours) - be careful with this technique; it can be pretty awesome to know the game is that aware, but it can feel horrible if you had a legitimate reason to be loading a lot and you get punished for it
  • Make the rewards for save scumming moderate enough that it's not worth the player's time; for example, if the max bet for a slot machine is 50 gold, then even if you can win 50000 gold with a really lucky pull, the max a player will lose is 50 gold - in a string of mostly losses, it's not really worth the player's time to shut the game off, turn it back on, and reload, when they could more quickly recover their losses by heading into the field and winning a battle
 

trouble time

Victorious
Veteran
Joined
Jan 2, 2014
Messages
808
Reaction score
623
First Language
English
Primarily Uses
N/A
A simple way qpuld be to give the casino a finite amount of cash and have it refresh at certain story points or over time.
 

hloevrona

Warper
Member
Joined
Oct 26, 2021
Messages
2
Reaction score
0
First Language
RU
Primarily Uses
VNM
A good strategy also plays a role.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,140
Reaction score
504
First Language
English (USA)
Primarily Uses
RMMV
I use the token model where you buy in at registration and then have a separate currency for the casino games to which your coins are added. Then, instead of simply being able to cash out for the value of your winnings you have to buy your rewards using only the coins that you have won, and this must be done by increments. Even goldbrick that can be sold for its value in regular, spendable gold has to be done this way, but you can also use your coins for premium items that are only found in the casino's prize shop.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
6,028
Reaction score
6,042
First Language
English
Primarily Uses
RMMZ
I concur with a subset of the points already made. Having a separate currency that must be exchanged in the context of the game itself can be a good way to curb "cheating" like this, and there are certainly methods you can use to detect whether a player is manipulating saves, but...ultimately, does it matter? The whole point of the game is to have fun with it. If player X decides that fun is having infinite money, then just leave them to it I say. All that saving/loading takes a significant amount of time where they'd probably earn the same amount just fighting random encounters for regular money anyway; the only person they're cheating is themselves, in the end. It might make the game significantly easier for them, but if they don't like that it's their own fault for taking advantage of the loophole that facilitated making it so.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,140
Reaction score
504
First Language
English (USA)
Primarily Uses
RMMV
I should also note that on my console build (currently targeting Xbox) all of the game saves are stored in the cloud and are not directly accessible, and in fact are only loaded to disk for the purpose of populating the game load menu from the cloud sync during the bootstrap process after which the local copies are immediately deleted. I might see if I can find some way to do likewise for Steam, but at least the console build is secure enough for my intentions.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,788
Reaction score
2,232
First Language
English
Primarily Uses
RMMV
Autosave the game as soon as the player hits enter to play the event, or (like Evolution: Worlds) force the player to save after choosing to play the event but before revealing the result - I don't recommend this, it's a very unfun approach
Omg, that game brings back memories! Too bad, not many people have played it...

Btw, that detecting save scumming method sounds neat! I gotta look more into that, heh.
 

Piyan Glupak

Veteran
Veteran
Joined
Nov 14, 2016
Messages
136
Reaction score
72
First Language
English
Must admit that I thought that the whole point of casinos in RPGs or gambling mini-games was to test the player's ability to save regularly. I don't tend to bother with them either as a player or in my RPG Maker projects.
 

alice_gristle

Veteran
Veteran
Joined
Jul 2, 2019
Messages
711
Reaction score
1,276
First Language
English
Primarily Uses
RMMV
What everybody sayin', and this: I like to scum my saves. :biggrin: It's like paths, ya know? I go for a walk, there's a gravel path, I'm meant to follow it... but instead, Imma climb over that fence and cut across the field! If somebody implement mechanics to prevent me climbing over the fence... Imma get angry. Same with save scumming. More love to the scum! :kaoluv:
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,140
Reaction score
504
First Language
English (USA)
Primarily Uses
RMMV
Another thought that I just had is that encoding the casino currency in base64 may be an option, however I'm not 100% sure on the specifics for doing this so I have an open request for assistance on the matter. Preferably stacked like 3-5 times worth of encoding for some extra protection.
 

Fortunastreet

Veteran
Veteran
Joined
Jul 8, 2015
Messages
323
Reaction score
180
First Language
French
Primarily Uses
RMMV
I would say the best way to avoid save scam (if you really want to, as said before, you shouldn't focus to much on that) is to give the player minigames where the odds are in his/her favors. Otherwise, how is the hell is the player suppose to gain the 100000 coins needed to get the ultimate sword of light?
 

hloevrona

Warper
Member
Joined
Oct 26, 2021
Messages
2
Reaction score
0
First Language
RU
Primarily Uses
VNM
Don't you think that gambling is the worst idea in the various entertainments?
 

pawsplay

Veteran
Veteran
Joined
Mar 29, 2012
Messages
495
Reaction score
270
First Language
English
Primarily Uses
RMMV
Determine the random result earlier in the game. When they play, make a new random result. Make your results array about three deep. They can still scum to some extent but it won't be as fruitful; if they are determined to have infinite loot, they will just edit the save.
 

Saireau

Veteran
Veteran
Joined
Dec 19, 2019
Messages
133
Reaction score
73
First Language
German
Primarily Uses
RMMV
I thought about this quite a bit too, because in Wildsilver, there's this fountain that gives you random items for tossing coins into it.

My conclusion was that I simply don't mind if players want to save and reload. If they think it's worth the time, let them do it. :) There will be plenty of players who use the mechanic as intended out of an intrinsic motivation.
 

Latest Threads

Latest Profile Posts

Time to wrap things up and release a demo of my game.
My son is smelling the house out with waffles and homemade strawberry sauce. Sometimes he has leftovers. I hope he has leftovers today!
I really, really, REALLY hate it when I'm trying to make an event work but I keep screwing it up and somehow mess up the conditional branches and can't figure out the proper order!:kaolivid:
I got a function working to load the last save after a game over. Really proud of myself.
Still a WIP...

car.png
I started the evening loving vintage cars... by the time I am done however I might not anymore... xD

Forum statistics

Threads
130,002
Messages
1,206,940
Members
171,252
Latest member
Liuyu
Top