Gamble System with Poker Chips instead of Gold

Status
Not open for further replies.

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
I want to make a Casino mini-games, and I want to make the player use Poker Chips to gamble instead of using their Gold
(so they need to exchange the gold with poker chips, and when they're done playing, they can exchange it back to gold)
I also want to show the Chip amount that the player has using HUD Maker by SumRandomDude.

Is there any efficient way to do this? :aswt:

(I tried to make the Chips as items and meddle with variables check but it cannot go above 99, even when I use the Yanfly's core)
 
Last edited:

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
276
Reaction score
80
First Language
English
Primarily Uses
RMMV
Just make a single variable that represents the players chip amount. Sounds like you’re overthinking it.
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
Just make a single variable that represents the players chip amount. Sounds like you’re overthinking it.
That's the thing, somehow when I did it, the variable cannot go above 99. That's why I was asking if there's any other way to do it. I already wrote that I did the variable thingy, didn't I? XD

Example :
You bet all 60 chips to the dealer.
If you win, your chip will be doubled. So you'll get 120 chips, right?
But the variable only shows 99 chips instead of 120 chips.
I wonder if I can make it show the whole 120 chips..
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
454
Reaction score
201
First Language
PT-BR
Primarily Uses
RM2k3
I would do this for events, and it would be enough to limit the chips with "Conditional Branch":
Code:
◆Control Variables:#0001 Chips = 100
◆If:Chips > 99
  ◆Control Variables:#0001 Chips = 99
  ◆
:End

But in casino games there is not just one type of chip, so I realized he wants the player to really think about which chips to bet on, or am I wrong?
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
276
Reaction score
80
First Language
English
Primarily Uses
RMMV
Indeed you did, my apologies. I wonder if you can store your chips in multiple variables and add them up in hud maker. Eg. $gameVariables.value(1) + $gameVariables.value(2)
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
I would do this for events, and it would be enough to limit the chips with "Conditional Branch":
Code:
◆Control Variables:#0001 Chips = 100
◆If:Chips > 99
  ◆Control Variables:#0001 Chips = 99
  ◆
:End

But in casino games there is not just one type of chip, so I realized he wants the player to really think about which chips to bet on, or am I wrong?
That's the thing, I want the chips to go beyond 99. But somehow it just stuck at 99.

Nah, I only want to use one kind of chip so I don't need to make so many chip types (that's more complicated for me-)
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
Indeed you did, my apologies. I wonder if you can store your chips in multiple variables and add them up in hud maker. Eg. $gameVariables.value(1) + $gameVariables.value(2)
Ohh.. Hmm, okay I'll try that. Thank you for the suggestion! :>
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
454
Reaction score
201
First Language
PT-BR
Primarily Uses
RM2k3
I'm sorry, in your first message I got it wrong.
Without seeing the code, we have no way of knowing why "Hud" is showing a limit.

Edit:
Just press the F9 key to see the real value of the variable.
 
Last edited:

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
276
Reaction score
80
First Language
English
Primarily Uses
RMMV
You would have to use a conditional branch to decide which variable gets used though. I just realized the real issue here though, why your variables are not going past 99? They should be able to.
The issue must be with your events. You should post a screenshot.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,335
First Language
English
Primarily Uses
RMMZ
If you use items as chips, yeah, they're going to max out at 99. That's the max items RPG Maker allows by default. A variable can go as high as you need.

Alternatively, you could use an "Extra Currencies" plugin and make poker chips one of your extra currencies.
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
If you use items as chips, yeah, they're going to max out at 99. That's the max items RPG Maker allows by default. A variable can go as high as you need.

Alternatively, you could use an "Extra Currencies" plugin and make poker chips one of your extra currencies.
Ahh.. I see. Maybe that's why.
If I use the Extra Currencies plugin, will it be compatible to be shown with HUD Maker?

(Is there no other way but to use the plugin tho? Hahaha XD)
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
276
Reaction score
80
First Language
English
Primarily Uses
RMMV
Ha just use one variable to the represent the chips and one to represent how much is exchanged for gold. My original thought was correct, you’re over thinking it. You don’t need items or extra plugins. Add or subtract the second variable from the first when buying chips or exchanging them for gold.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
454
Reaction score
201
First Language
PT-BR
Primarily Uses
RM2k3
Edit:
You probably need it to be items, so only through plugins can you increase this limit.
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
23
Reaction score
5
First Language
Indonesian
Primarily Uses
RMMV
@Frogboy @Dev_With_Coffee @Rugman
Okay, now it works correctly. I don't know what I did.
When I tried to test it for the third time, it works normally. That's strange, because when I tried it first time, it's limited. But now it works perfectly like what I wanted.

I'm really sorry for your time and all. Should've meddle with the testing more before I asked here. ^^"

But that "Extra Currency" from @Frogboy is interesting though, I'll take a look :>
And the double variable @Rugman said looks interesting to be implemented with :D
Also thanks @Dev_With_Coffee for reminding me that there's multiple chips in a casino, I'll try to use that, it'll be fun I guess X,D
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
454
Reaction score
201
First Language
PT-BR
Primarily Uses
RM2k3
When I tried to test it for the third time, it works normally.
If the maximum per item is 99, I think it is unlikely that you have not changed anything. :LZYshock:

In any case, if you are still using an item as chips, put this Script command in the introduction of your game, it will modify the maximum limit of items:
JavaScript:
Game_Party.prototype.maxItems=function(item){
    return 9999;
}
If you need more, just change that number.

Good lucky :thumbsup-right:
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,211
Reaction score
14,683
First Language
English
Primarily Uses
RMMV
Why don't you just use a variable?

Edit: just saw your report

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Last edited:
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Working on a case. Get all the evidence to prosecute some bad guys. :kaojoy:
But, the game development schedule delayed. :kaoswt2:
The moral of the story: No good deed goes unpunished... I guess...
Now, hopefully, some certain people will not be stupid enough to leak my name on the reports.
just beat ff7 original for the first time since 2010. having played remake last year, I have a much better appreciation for the original oddly enough. I still like some of the character presentation in remake more, but the original's got a lot going for it.
Ever reach that moment in your life when your juggling a dozen or more projects that you know will never be made but don't have the heart to delete them? Ugh, I hate those moments...
:kaosigh: Why must you hurt me so?
my main character isn't the warrior of light or the chosen one, he's a self righteous, invasive try hard who gets ahead of himself and makes a critical error, resulting in a downward moral spiral that, eventually, leads him to truths that make him a better man, and im DAMN proud of that.

Forum statistics

Threads
111,448
Messages
1,061,193
Members
144,817
Latest member
tocurse
Top