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

[Request] Custom Number on Dice Sides

Hello everyone! I am in need of coding help! I'm a complete newbie when it comes to using the API script, so I'm require a bit of help. I want to create a script for a custom dice roller. Instead of using pictures (I have the rollable table for that), I want the die to use specific numbers on its sides. It is a six-sided die that has the following numbers: 1, 2, 2, 3, 3, 4. I'm sure it's very simple, but I can't for life of me figure it out. Oh, one more thing, if this has been done, please let me know as well. I tried to find something in the github repository but wasn't able to find anything like it. It's possible that there's one there, but since I don't know much of the systems in that database I don't know what to look for. Thank you for your help and happy holidays!
1513438960

Edited 1513438980
Silvyre
Forum Champion
Typically, a Rollable Table (without images) would be used for this: Table Items 2 and 3 would have a weight of 2. Is there a particular reason you would prefer an API Script over using this solution?
You can also do this with rollable tables, just put 1,2,3 and 4 as your outputs and give each outcome the appropriate weights (1 for 1 and 4 and 2 for 2 and 3) and it will act like a 6 sided dice with the numbers you've set.
Ok, Thanks for the suggestions and the help!