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

[Script] Weighted Dice: Automated Rollable Table creation with proper statistical distribution for minimum rolls.

1403470323

Edited 1629346756
The Aaron
Pro
API Scripter
Update v0.2 -- Fixed off by one error in setting up the range of the table. My GM rolls his dice with a minimum, but wants the statistical distribution to be correct. I threw together this script for him to use to create rollable tables for the dice: !weighted-die 12 8 This creates a rollable table named d12min8 (if it doesn't exist already) with 5 entries: 8 with a weight of 8 9 with a weight of 1 10 with a weight of 1 11 with a weight of 1 12 with a weight of 1 Which can then be rolled as /r 8t[d12min8] Git:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/WeightedDice/WeightedDice.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/WeightedDice/WeightedDice.js</a> Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1403475063
Lithl
Pro
Sheet Author
API Scripter
What's the real use-case here? Wouldn't it be simpler to use /r {d12,8}kh1?
1403476376
The Aaron
Pro
API Scripter
hmm.. maybe... Can you roll multiple of those d12s that way, the equivalent to /r 10t[d12min8] ?
1403476469
The Aaron
Pro
API Scripter
For that matter, I keep getting: Cannot mix sum and M rolls in a roll group When I try that expression.
1407766929
The Aaron
Pro
API Scripter
Fixed an off by one bug.