WoD Denver Forums

Full Version: Super randomness of random (also dice)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


Hi there,

Lets start with the very basics of how a dice or Random number generator works. A dice is a cube shaped object with normally six (eight, ten or hundred) sides. These when thrown display a random number based on variables such as force, friction, gravity, physics, quantum mechanics and GODDAMN NINJA ASSAMITES!

RNG is what the jove program uses to replicate this effect (RNG stands for RANDOM NUMBER GENERATION). RNG is generated based on a SEED value. A seed value is a decimal point number between 0 and 1 that is used to figure out all future algorithms to generate the number. A seed value can be calculated from a variety of different components on your PC/ server but the most regular ones are internal clock time, CPU cycle and CPU temperature. Due to seed value only being calculated once and then used in future, the randomness of a virtual RNG isn't true randomness as you've no doubt noticed.

JOVE uses the bare basic random number generator and to put it plainly that's not very good. It's barely passable as random and this is why you'll notice dice rolled in close proximity to be almost identical. The edit I'm going to suggest is the MERSENNE TWISTER.

Many random number generators of older libcs have dubious or unknown characteristics and are slow. By default, PHP uses the libc random number generator with the rand() function. The mersenne twister in contrast uses a random number generator with known characteristics using the ยป Mersenne Twister algoritm, which will produce random numbers four times faster than what the average libc rand() provides. It'll also be significantly faster than the libc rand().

HOWEVER! The mersenne twister becomes biased towards even numbers when its max (optional highest number, in the case of a d10 dice, this should be 10) is above 2^32(4294967296)

To implement the Mersenne twister into the php code you simply change rand(); to mt_rand(); (If there's numbers in the brackets, keep those in!)


I don't know WHO you think you IS, Sergee

but you can totally stay and sit by me. I just dropped that change into the code and successes have changed dramatically.

I went ahead and made the change to the sitewide roller. Since on a little sample of dice rolls I got massive successes, I'd like it if people (Admins in particular) kept an eye on the dice rolls. If they are at an optimal level we may need to discuss reintegrating the "1s cancelling suxx" rule, which was only removed because the Jove roller sucked and everyone was tired of failing rolls with 6+ dice because 1s would swoop in and steal all the suxx.

For me it's less about sticking to rules and more about finding a balance that makes players feel like they had to work for their triumphs without feeling like they have to climb all the way to the top of Mt. Doom every time they roll some dice (Samael, I'm looking at you, bud).

Anyway, yeah, so. Yeah! That's a thing to think about.

And thank you so much, Sergee! Welcome to Denver!