I keep seeing people talk about Math.random not being truly "random". Since 2015, it looks like Chrome and Firefox (Chome v8 and SpiderMonkey engines) switched to the xorshift algorithm. I couldn't find any information on what algorithm Chakra uses. In practice, I'm not finding anything that would make Math.random (at least in Chrome & Firefox) insufficient for generating dice rolls. It may not match Roll20's QuantumRoll system, but the results meet the 3 criteria for random numbers (full-period, equi-distribution, unpredictibility). I'm parsing out dice rolls using the following regex: // [\d]*d[\dFf]+[\!]? Standard syntax, FATE, Exploding
// (?:(?=[Kk][\d]+)[Kk][\d]+|(?![Kk][\d]+)) keep dice
// (?:(?=\[[^\]]+[\]])\[[^\]]+[\]]|(?!\[[^\]]+[\]])) Roll Tags
static RegExp = /[\d]*d[\dFf]+[\!]?(?:(?=[Kk][\d]+)[Kk][\d]+|(?![Kk][\d]+))(?:(?=\[[^\]]+[\]])\[[^\]]+[\]]|(?!\[[^\]]+[\]]))/g So far in my tests it matches with a limited version of the roll syntax that Roll20 uses. 3d6!+2dF+3d8[Bludgeoning]+3d6!k1+7-1 returned all the correct matches, and using Math.random, seemingly random results (apparently uniform distribution at 10,000 iterations on each roll portion). So what what are the flaws for using Math.random on sheetworkers in FF and Chrome (possibly Edge, but Microsoft is a closed-source butt-munch about Chakra)? (Any advice on the regex patter would be appreciated, but that's a separate issue)