[RMMV] BEST WAY TO MAKE GAMBLING

Posts

Pages: 1
I have gotten this idea, and there are many videos about it. I learned how to make a dice roll event, I tested it and it works. But I can't figure out to do other ones, especially slot machines. A slot machine appears in one one of the RTP tilesets, so it looks like gambling was meant to be in RPGMV games.

The way I'm trying it now would take a million years to complete. I'm trying to make the following slots : ✦1 ✽2 ♠3 ♣4 ✿5. The are three slots, with five possibilities each. I was going to make a conditional branch for every possibility, but that would take hundreds of conditional branches, and the end vs else would be too confusing for me to sort the scripts.
Marrend
Guardian of the Description Thread
20053
You likely don't need to have to check against every possible combination. Just the combinations where you only loose the money that you bid. For example, the Suikoden series typically have a mini-game called Chincirorin. I don't want to get into too many details here, but, the general rule is that you "score" when you roll doubles (the other die represents your score), and triples can either double your bid, triple it in the case of three 6s, or you have to pay double your bid in the case of three 1s.

All that aside, It might behoove you to move the processing out of the realm of event-commands, and into scripting. Obviously, you'll want a variable for each slot. The process, itself, would depend on what combinations do notable things, as mentioned. The thought in my head is to deal with triples first, then figure out the other stuff later. That particular condition might look something like...

if $gameVariables.value(2) == $gameVariables.value(3) && $gameVariables.value(2) == $gameVariables.value(4) {
  // Whatever happens on a triple?
}

...this, give or take some ID values?
author=Marrend
You likely don't need to have to check against every possible combination. Just the combinations where you only loose the money that you bid. For example, the Suikoden series typically have a mini-game called Chincirorin. I don't want to get into too many details here, but, the general rule is that you "score" when you roll doubles (the other die represents your score), and triples can either double your bid, triple it in the case of three 6s, or you have to pay double your bid in the case of three 1s.

All that aside, It might behoove you to move the processing out of the realm of event-commands, and into scripting. Obviously, you'll want a variable for each slot. The process, itself, would depend on what combinations do notable things, as mentioned. The thought in my head is to deal with triples first, then figure out the other stuff later. That particular condition might look something like...

if $gameVariables.value(2) == $gameVariables.value(3) && $gameVariables.value(2) == $gameVariables.value(4) {
  // Whatever happens on a triple?
}

...this, give or take some ID values?

You can't really have a slot machine without seeing the slot combination.

For example :

Is there anyway to increase font size in RPG Maker?
Marrend
Guardian of the Description Thread
20053
author=Abashi76
You can't really have a slot machine without seeing the slot combination.

For example :

I read your post to mean that the symbols had a one-to-one ratio with the numbers. That a "1" would only ever appear with a "✦", and a "2" would only ever appear with a "✽", and so on. In that case, you could add that text after figuring out what the action the slots would indicate. If a slot can have a "1" and a "✿", with combination-matching with either the number or suit, that can certainly get more complicated!

author=Abashi76
Is there anyway to increase font size in RPG Maker?

I think you can use "\}", and "\{" to alter font-size within a regular Show Message? Either way, it should be part of the floating-text help if you hover over the text box within the Show Message event-command.
If you use icons for the symbols, you could use \I[\V] to display an icon number specified by a variable in a message window.

You could use events for the reels, and have an event page displaying each symbol (this would work with transferring the player to another map where the slots game happens, and transferring them back afterward)

You could use pictures for each reel, and move them up or down a number of pixels determined by the variable multiplied by the vertical size of each symbol, and show through transparent holes in a slot machine picture displayed above.

Or, the *easiest* way for RPGMV is to look in the dlc folder for KadokawaPlugins_New/js/plugins/SlotMachine.js
(I believe this to be a free update in the steam version, you'd probably have to search for the download on RMWeb if you use the standalone version)

That would give you something premade, though you can replace the images / configure some of the messages.
author=If you use icons for the symbols, you could use \I[\V
to display an icon number specified by a variable in a message window.]

And how would I do this? Can you give me an example? Where do I type ]I? How many conditional branches would I still need?

Examples :
✦ ♠ ♣
✦ ♣ ✦
♠ ♣ ♣
♠ ♠ ♠

I think there are multiple hundreds of combinations, or at least a 150 of them.
OK, you have three reels with 5 symbols on each.
So you need three variables:

example:
◆Control Variables:#0001 = Random 161..165

Why 161..165? That's the icons for the 5 coloured orbs in the default icon set.
You will add your 5 symbols to the icon set anywhere you like, just make sure the icon numbers are sequential (e.g. put them in a horizontal row)

Do this three times using three different variables, so you have your three reels each randomized.
Then a "show text" command with the variable substitutions so that you get the icons displayed

◆Control Variables:#0011 reel 1 = Random 161..165
◆Control Variables:#0012 reel 2 = Random 161..165
◆Control Variables:#0013 reel 3 = Random 161..165
◆Text:None, None, Window, Bottom
: :\i[\v]\i[\v]\i[\v]

With just this, each time you interact with the slot machine, you'll see three symbols pop up.

Next, we want to check if the player wins or not. A win is getting three of the same symbol. So let's check for that first:

◆If:reel 1 = reel 2
◆If:reel 1 = reel 3
◆Text:None, None, Window, Bottom
: :You Win!

:End

:End

See marrend's post above for how to use a single conditional branch with a script call instead of two nested branches.

Next, you probably want a different payout on different symbols.
Since we already know that all three symbols are the same, we just need to check the first symbol - so 5 branches

The whole event looks like this:
◆If:Self Switch A is OFF
◆Text:None, None, Window, Bottom
: :This machine has a 2\g stake.
◆Control Self Switch:A = ON

:End
◆If:Gold < 2
◆Text:None, None, Window, Bottom
: :The stake is 2\g, but you don't have enough.
◆Exit Event Processing

:End
◆Play SE:Coin (90, 100, 0)
◆Change Gold:- 2
◆Control Variables:#0011 reel 1 = Random 161..165
◆Control Variables:#0012 reel 2 = Random 161..165
◆Control Variables:#0013 reel 3 = Random 161..165
◆Text:None, None, Window, Bottom
: :\i[\v]\i[\v]\i[\v]
◆Control Variables:#0014 payout = 0
◆If:reel 1 = reel 2
◆If:reel 1 = reel 3
◆If:reel 1 = 161
◆Control Variables:#0014 payout = 5

:End
◆If:reel 1 = 162
◆Control Variables:#0014 payout = 10

:End
◆If:reel 1 = 163
◆Control Variables:#0014 payout = 15

:End
◆If:reel 1 = 164
◆Control Variables:#0014 payout = 20

:End
◆If:reel 1 = 165
◆Control Variables:#0014 payout = 50

:End

:End

:End
◆If:payout > 0
◆Play ME:Victory3 (90, 100, 0)
◆Change Gold:+ {payout}
◆Text:None, None, Window, Bottom
: :You win \v\g!

:End
Nice! You are so brave, guys. On a forum, I also read about a boy who made his game of blackjack. Wow, boys, you are so lovely. I would gladly play in the games made by you. I also want to do my game of *SPAAAAAAAAAAAAAM*. I adore this card game. I play it online, but I want to do my own. I know that Java will help me a lot in such experiments. I also watched and read a lot of information about how to do it. But until I play this online game, I get more experience. By the way, this will also help you.
Pages: 1