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

Roll 1 die, compare to multiple abilities?

Let's say I wanted to make a macro to roll a single 1d20, then compare it to every ability score on a character's sheet with success on rolling under. What would such a macro look like? I am unsure how to "refer" to a die previously rolled. Thanks for reading.
1531509602
Gen Kitty
Forum Champion
There is no way to do what you wish elegantly outside of API scripting, which requires a Pro level subscription.  There are workarounds, where you list the dieroll and list all attributes to compare against and then if you decide you succeed you can then use another macro to do whatever success does. As far as APIs go, I point you at Powercards, which will do what you want and do it well -- once you learn how to use the script.  Powercards predate Roll Templates; Powercards can do everything a roll template does, and so much more .  Well worth looking into.  :) (Please note, this post doesn't have my ModHat on, this is my POV as a longtime user :) )
1531510059
The Aaron
Pro
API Scripter
It's not possible with Macros.  You might be able to do it with the Roll Template on a custom character sheet, but more likely would be writing an API script, which would require a Pro Subscription.
You may be able to use queries -  you roll a dice, then you run a macro, enter the dice result manually, and then a series of queries test the manual entry against the skills - it does require you to understand how to make use of queries, and honestly, goes slightly beyond my own knowledge of queries, but relies on the fact that Roll20 will, when faced with multiple identical queries in a macro, only ask the query once and use the entered result for all the queries.
1531559207
Ziechael
Forum Champion
Sheet Author
API Scripter
If it is just visibility you are looking for and would be willing to manually check for success you could have a table of skills along with the result of the roll outputted to chat and take it from there (you'd need to replace the bold sections with appropriate attribute names from the sheet you are using, the 'name' one could be replaced with hardcoded skill names if they never change too for ease): &{template:default} {{name=Skills}} {{Roll=[[1d20]]}} {{ @{selected|skill1name} = [[ @{selected|skill1value} ]]}} {{ @{selected|skill2name} = [[ @{selected|skill2value} ]]}} {{ @{selected|skill3name} = [[ @{selected|skill3value} ]]}} {{ @{selected|skill4name} = [[ @{selected|skill4value} ]]}} {{ @{selected|skill5name} = [[ @{selected|skill6value} ]]}}