Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Old Pseudorandom

1427186748

Edited 1427186767
I suppose there is no way i can switch to old pseudorandom system (before the quantum thing). Maybe it is possible with API (if it have its own random functon different from rolls).
The random function in javascript is pseudorandom. You'd have to use the api. Why though?
I belong to a secret cabal that belives that god is a machine and so by making pseudorandom roll i may rely on His power to provide me with good rolls. But seriously, i just like pseudorandom more. So with API i can just use js math.random? Nice.
1427189947
Gen Kitty
Forum Champion
You... you want the method less guaranteed to give perfectly random results? Ooookay. ^_^ If it is the deciding factor for you to get a mentor subscription, who am I to look at you funny? (Aside from being a cat; cats look at everyone funny!)
What if i belive that "perfect" random is less random than "chaotic" random because it have less entropy? :D
1427195439
The Aaron
Pro
API Scripter
You could just always use 4, the ANSI Standard Approved Random Number. :) Seriously though, if you want pseudorandom numver streams, you'd need a mentor account at the least. Then you'd need to adapt something like this: <a href="https://gist.github.com/banksean/30049" rel="nofollow">https://gist.github.com/banksean/30049</a> :to run in the API (not terribly hard). Math.random() in the API uses quantum rolls now, I believe.
1427201713
Lithl
Pro
Sheet Author
API Scripter
Alex said: What if i belive that "perfect" random is less random than "chaotic" random because it have less entropy? :D I'm sorry, but this statement is actually painful in its inaccuracy. The Aaron said: Math.random() in the API uses quantum rolls now, I believe. Pretty sure the Math functions are untouched by Roll20. The randomInteger function may be using quantum rolls, though; not sure.
Brian said: I'm sorry, but this statement is actually painful in its inaccuracy. Y? Phear the wizard for he can inflict pain with words alone!
1427255450
The Aaron
Pro
API Scripter
Brian said: The Aaron said: Math.random() in the API uses quantum rolls now, I believe. Pretty sure the Math functions are untouched by Roll20. The randomInteger function may be using quantum rolls, though; not sure. From: <a href="https://wiki.roll20.net/API:Utility_Functions#Rand" rel="nofollow">https://wiki.roll20.net/API:Utility_Functions#Rand</a>... Math.random() You can call Math.random() like normal in your API scripts, trusting that the results will be random, because the "default" Math.random() in Javascript has been replaced with the cryptographically-secure PRNG that powers Roll20. So existing scripts that use Math.random() can be used with knowing that the results really are as close to random as it's possible to get on a computer. Do not use Math.random() if even distribution of numbers in a range are desired. While Math.random() gives you as good of a random number as Roll20 can manage the math to turn that random number into a range with even distribution (like a dice roll) is not as straight forward as multiplication with a modulo or a floor call. Use randomInteger(max) for those cases.
1427256053
Lithl
Pro
Sheet Author
API Scripter
I stand corrected. =)
1427257050
The Aaron
Pro
API Scripter
That's right! Adjust the scoreboards! Twenty more times of me correcting you and we should be even!!! =D
Ok, so there is no way to get proper random that does not depend on outside phenomena except the moment i press the button?
1427282484
The Aaron
Pro
API Scripter
That Mersenne Twister I posted takes a seed value and produced a pseudo random number stream. It does not depend on any outside data and is completely predictable for a given seed value. It should fit the requirements you've specified thus far.
The Aaron said: That Mersenne Twister I posted takes a seed value and produced a pseudo random number stream. It does not depend on any outside data and is completely predictable for a given seed value. It should fit the requirements you've specified thus far. Oh, thanks. Dont know what i was thinking.