RPG Maker Forums

I've been trying to make a thieving formula in my game

The formula is $game_variables[306] = $game_variables[304] + 1 /$game_variables[305], where variable 304 is the thieving level and 305 is a constant.

Variable 304 is meant to be used as the fail rate maximum.

Ex: If a player has a thieving level of 19 and the constant is 4, (19+1)/4 = 5. Then, I would create another variable which would be a random one, which would determine whether the player has failed or successfully thieved the NPC.

It would be a random variable anywhere from 1 to variable 304, the maximum variable. If that variable were to equal Variable 304, then the player would be caught.

So in the example above, it would be rand(1..4), and if the newest var were to equal 4, then the player is caught.

Unfortunately, I do not know how to get this to work, as rand(1..$game_variables[306]) does not do what I expected it to do.

Does anyone know how to go about this?

Thanks

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top