PDA

View Full Version : Irregular dice (/die) do not roll their highest possible number



Weissrolf
November 20th, 2020, 12:06
Ahoi.

Die rolls (/die) other than the standard dice never roll their highest possible number. So a /die d21 maxes out at 20, a /die d5 maxes out at 4 and a /die d256 maxes out at 255.

I noticed this when I rolled over 4 mio d256 to create a suitable data base for proper statistical analysis and then verified by quickly rolling 5000 d21.

https://i.imgur.com/4vD2c7k.png

Weissrolf
November 20th, 2020, 12:19
I edited the original post to make an important correction: At first I posted that dice higher than d20 would suffer form this bug, but then I specifically tested d100 and it worked correctly. So I tested /die d5 instead and could reproduce the bug again. So only irregular die rolls that are not part of the standard collection (d2, d3, d4, d6, d8, d12, d20, d100) are affected.

LordEntrails
November 20th, 2020, 16:16
I didn't make a million rolls, but a few hundred d5 rolls and I could not get a result of a 5 either.

Tabarkus
November 21st, 2020, 22:31
I use the Dungeon Crawl Classics ruleset and the irregular dice are an essential part of that ruleset. I tested a d5 and my first roll was a "5". I'm not sure if it uses a different process than the /die. I tested the /die 1d5 in the DCC Ruleset and had a 5 in the first 10 rolls. Also tested /die d5 and my first roll was a 5.

Moon Wizard
November 21st, 2020, 23:28
Thanks for reporting. I'll look into this for the next release.

Regards,
JPG

Weissrolf
November 24th, 2020, 22:33
This got fixed by the v4.0.2 update. Thanks for that.

Now before I start rolling millions of dice for statistical analysis: does the /die command use a different RNG process than the regular dice (sans physics engine, aka double-click instead of mouse-movement)? Or in other words, will any statistical results about /die be applicable to regular dice at all?

Are FGC /die and FGU /die expected to be equal or different (I already ran some quick FGC tests)?

Moon Wizard
November 24th, 2020, 22:51
No, non-physical dice and physical dice use completely different systems.

JPG

Weissrolf
November 24th, 2020, 23:44
Too bad, I hoped that they would use the same initial RNG, just that the physics engine uses it for initial dice rotation and impulse. We can test /die 256-1 for randomness using established test-suites, but anything smaller than that likely wont work. No idea if anyone ever uses /die for non-standard dice at all, but thanks for the insight and for fixing the issue.