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 .
×

Handle specific roll

Hi ! I've searched in the doc but i didn't found how to manage this case :  Ask for a number  and  roll  : number - ((number/12)+1)d12 Thx for your answers.
1632072560

Edited 1632072618
vÍnce
Pro
Sheet Author
Hi Jérôme , See if this works; roll: [[ ?{number|1} - [[ (floor(?{number}/12))+1 ]]d12 ]]
Thx but perhaps it work but i'm not sure because i don't see the result of trown dices :s
1632082717
GiGs
Pro
Sheet Author
API Scripter
If you want to see the rolled dice, replace the outermost [[ ]] and start with /roll, like this: /roll ?{number|1} - [[ (floor(?{number}/12))+1 ]]d12 You must be using pretty big numbers for this roll to make sense!
@GiGs Thx i just find it  Yes it's a custom game from a friend the system has pretty bad probabilities but we have fun and it's the most important.
1632087182

Edited 1632087234
GiGs
Pro
Sheet Author
API Scripter
I just noticed there's an unneccessary set of brackets in the expression. It doesnt make any real difference in this case, but if you want your code to be a bit more efficient: /roll ?{number|1} - [[ floor(?{number}/12)+1 ]]d12