RPG Maker Forums

Hello again!

I've made a small casino mini game in one of my towns. By playing the games, the player can win Yellow Casino Chips. These can be upgraded to Green, then Blue, then Red when the player holds 99 (current item MAX) of the lower tier Chip. The chips can be cashed in for a number of prizes from their respective tiers.

I was moving right along, getting the first game to play flawlessly, when I discovered the maximum of 99 items despite throwing money at the game NPC. In order to prevent players from losing money from winning with no reward, I tried to implement a counter of sorts where the game keeps track of the number of Chips you hold with a variable. Basically the relevent Event code looks like this

You Win!

Change Items: Yellow Casino Chip +10

Control Variables: [0003: Yellow Casino Chip] +=10

You Lose :(

Nothing happens, Event ends.

At the very top of the event, I have it check the [0003 Yellow Casino Chip] variable to see if it's 99, and if so, prevent the player from playing the mini-game. The NPC seems to ignore this check. To debug, I made a Treasure Chest give 99 Yellow Chips, Add 99 (+=99, same as the Game NPC) to the variable and a Debug NPC to tell me how many I had. That seems to work. The Game NPC then correctly prevents the player from playing the casino game.

The problem seems to come from the counter not building from the Casino NPC. Might it possible that the game only displays 99, but the counter itself exceeds 99 and that maybe why the game isn't catching it... BRB testing...

Final Edit: Yep, that's exactly what was happening. The Variables can exceed the Max Carry Item limit, so when my NPC was rewarding 10 each, the counter skipped right over the 99 check. Once I told it to check >= (greater than or equal to) instead of simply == (exactly equal to), the NPC started blocking the player from playing.

Mods, I read the part where you don't was us 'mini-modding', so uh, consider this help topic closed as I seemed to have solved it myself.

Thanks for your help! :D

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top