tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
812
Reaction score
1,383
First Language
English
Primarily Uses
N/A
With permission from shunroid, I'm sharing minigame tutorial in English here.

I thought I'd come up with this event where some middle-aged dude challenges people randomly all around town to a duel of dices, so here it is.


|| Stuff I want to do with the dice duel

There's this middle aged dude who randomly appears in town and challenges people to a duel of dices.

When you accept the duel, you pay.

If you win, you get rewarded with the double amount of money you paid.

If you lose, you don't get your money back.

That's it.


|| Preparing of dice pictures

We'll use dice images from [wpclipart] https://wpclipart.com/recreation/games/dice/

Note: I used an alternate website instead of Japanese tutorial to skip registration step.

Download "transparent png" (below download png) for each 'die face 1-6' to complete six dice set.

NDh0kIa.png


File names can be named die1.png to die6.png respectively.

Images should be inside img/pictures folder of your RPG Maker MV project.


|| Event contents

The contents of the events are shown below.

Edit: For version with showing 2 dices at once, scroll down to || Extra event contents are in the spoiler.

◆If:Gold ≥ 500
◆Text:None, Window, Bottom
:Text:Say, you there.
:Text:Why don't you accept my challenge?
:Text:Just toss your dice and if your roll is bigger than mine
:Text:You win!
◆Text:None, Window, Bottom
:Text:The bet will be 500G.
:Text:If you win, I shall pay you twice as much!
:Text:If you lose though, you will not get your money back.
:Text:So what do you say?
◆Show Choices:I accept!, Nah, no thanks... (Window, Right, #1, #2)
:When I accept!
◆Text:None, Window, Bottom
:Text:Alright!
:Text:Hand over your 500G then.
◆Change Gold:- 500
◆Text:None, Window, Bottom
:Text:You paid 500G.
◆Label:start
◆Text:None, Window, Bottom
:Text:It is my turn!
:Text:Go!
◆Play SE:Absorb2 (90, 150, 0)
◆Control Variables:#0003 dice duelist = Random 1..6
◆If:dice duelist = 1
◆Show Picture:#1, die1, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 2
◆Show Picture:#1, die2, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 3
◆Show Picture:#1, die3, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 4
◆Show Picture:#1, die4, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 5
◆Show Picture:#1, die5, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 6
◆Show Picture:#1, die6, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆Erase Picture:#1
◆Text:None, Window, Bottom
:Text:It is your turn now!
◆Play SE:Absorb2 (90, 150, 0)
◆Control Variables:#0004 your dice = Random 1..6
◆If:your dice = 1
◆Show Picture:#1, die1, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 2
◆Show Picture:#1, die2, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 3
◆Show Picture:#1, die3, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 4
◆Show Picture:#1, die4, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 5
◆Show Picture:#1, die5, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 6
◆Show Picture:#1, die6, Upper Left (248,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:dice duelist = your dice
◆Erase Picture:#1
◆Text:None, Window, Bottom
:Text:It is a draw!
:Text:One more time then!
◆Jump to Label:start

:End
◆If:dice duelist > your dice
◆Erase Picture:#1
◆Play SE:Buzzer1 (90, 100, 0)
◆Text:None, Window, Bottom
:Text:I wiiiiiiiiin!
:Text:Muwahahahahahaha!
:Text:I win! I win!
◆Text:None, Window, Bottom
:Text:Let's do this again!
◆Control Switches:#0043 dice duel = ON

:End
◆If:dice duelist < your dice
◆Erase Picture:#1
◆Play SE:Applause1 (90, 100, 0)
◆Text:None, Window, Bottom
:Text:You win.......
:Text:I shall pay you double then......
◆Change Gold:+ 1000
◆Text:None, Window, Bottom
:Text:You received 1000G.
◆Text:None, Window, Bottom
:Text:Let's do this again!
◆Control Switches:#0043 dice duel = ON

:End

:When Nah, no thanks...
◆Text:None, Window, Bottom
:Text:You scaredy cat!!
:Text:Scaredy cat!! Scaredy cat!!

:End

:Else
◆Text:None, Window, Bottom
:Text:You don't have money do you, you petty one.
:Text:You are not worth my time if you don't even have 500G.
:Text:Get lost.

:End

I decided to add the conditional branch based on whether you have more than 500G or not.

Otherwise you won't be able to accept the challenge if you don't have the money.

I decided to show the numbers along with the image of the dice and the text.

I included the “#00043 dice duel = ON” so you will not be able to play back to back.

It will turn OFF once the dude leaves the town.


|| Preview

YtXZfFo.png



|| Video



|| Afterword

There's one thing I actually realized while I was making this thing ; you can save it before you accept the challenge, then reset it again afterward if you lose, then keep redoing it until you win.

So I decided not to add the setting where you can specify how much to pay from your pocket money.

Otherwise it will turn into an event where you can simply double your money! LOL


|| Extra

For showing 2 dices at once

◆If:Gold ≥ 500
◆Text:None, Window, Bottom
:Text:Say, you there.
:Text:Why don't you accept my challenge?
:Text:Just toss your dice and if your roll is bigger than mine
:Text:You win!
◆Text:None, Window, Bottom
:Text:The bet will be 500G.
:Text:If you win, I shall pay you twice as much!
:Text:If you lose though, you will not get your money back.
:Text:So what do you say?
◆Show Choices:I accept!, Nah, no thanks... (Window, Right, #1, #2)
:When I accept!
◆Text:None, Window, Bottom
:Text:Alright!
:Text:Hand over your 500G then.
◆Change Gold:- 500
◆Text:None, Window, Bottom
:Text:You paid 500G.
◆Label:start
◆Text:None, Window, Bottom
:Text:It is my turn!
:Text:Go!
◆Play SE:Absorb2 (90, 150, 0)
◆Control Variables:#0003 dice duelist = Random 1..6
◆If:dice duelist = 1
◆Show Picture:#1, die1, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 2
◆Show Picture:#1, die2, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 3
◆Show Picture:#1, die3, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 4
◆Show Picture:#1, die4, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 5
◆Show Picture:#1, die5, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆If:dice duelist = 6
◆Show Picture:#1, die6, Upper Left (44,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:The opponent's dice rolls
:Text:\{\V[3]

:End
◆Text:None, Window, Bottom
:Text:It is your turn now!
◆Play SE:Absorb2 (90, 150, 0)
◆Control Variables:#0004 your dice = Random 1..6
◆If:your dice = 1
◆Show Picture:#2, die1, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 2
◆Show Picture:#2, die2, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 3
◆Show Picture:#2, die3, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 4
◆Show Picture:#2, die4, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 5
◆Show Picture:#2, die5, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:your dice = 6
◆Show Picture:#2, die6, Upper Left (452,80), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Your dice rolls
:Text:\{\V[4]

:End
◆If:dice duelist = your dice
◆Text:None, Window, Bottom
:Text:It is a draw!
:Text:One more time then!
◆Erase Picture:#1
◆Erase Picture:#2
◆Jump to Label:start

:End
◆If:dice duelist > your dice
◆Play SE:Buzzer1 (90, 100, 0)
◆Text:None, Window, Bottom
:Text:I wiiiiiiiiin!
:Text:Muwahahahahahaha!
:Text:I win! I win!
◆Erase Picture:#1
◆Erase Picture:#2
◆Text:None, Window, Bottom
:Text:Let's do this again!

:End
◆If:dice duelist < your dice
◆Play SE:Applause1 (90, 100, 0)
◆Text:None, Window, Bottom
:Text:You win.......
:Text:I shall pay you double then......
◆Erase Picture:#1
◆Erase Picture:#2
◆Change Gold:+ 1000
◆Text:None, Window, Bottom
:Text:You received 1000G.
◆Text:None, Window, Bottom
:Text:Let's do this again!

:End

:When Nah, no thanks...
◆Text:None, Window, Bottom
:Text:You scaredy cat!!
:Text:Scaredy cat!! Scaredy cat!!

:End

:Else
◆Text:None, Window, Bottom
:Text:You don't have money do you, you petty one.
:Text:You are not worth my time if you don't even have 500G.
:Text:Get lost.

:End

Preview
wmZ5tSI.png

Tip:
Use Script call to run two commands as they were shown here.

Code:
$gameSystem.onBeforeSave();
DataManager.saveGame(DataManager.latestSavefileId());


It will save it to last save file you used and if you don't have any save file it will save it to 1.

You can place Script call on where you want autosave to take place.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,331
Reaction score
1,248
First Language
Dutch
Primarily Uses
RMMV
nice tutorial, but I think the switch is not really needed, you can add a choice though
if you win, play again? when yes, label start, when no, scary cat or what ever.

another way to avoid reloading is, whenever you play or when you lose,
you can autosave it, so they cannot redo it or they can cheat :)

or when button is pressed (F5) to reload, the save game is deleted (cheat) :D

Nice tutorial though. but you can also show both dices on screen to make it cleaner
as well.
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
812
Reaction score
1,383
First Language
English
Primarily Uses
N/A
Things to consider
- shunroid original dice tutorial is over few years old
- At the time, picks large image that takes up the screen
- A rule of wait time: 72 hours before bumping your thread

Extra was added as spoiler at the end for showing two dices.
Also included a tip for using autosave as a Script call.

Switch was in place for a field event of another guide.
 

Latest Threads

Latest Profile Posts

AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!

Forum statistics

Threads
108,810
Messages
1,039,644
Members
141,255
Latest member
yam655
Top