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