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

Help finding API solution for getting one query answer to output multiple values?

Hi all, In trying to streamline some things and make my game run more elegantly, I stumbled upon the fact that multiple queries with identical names in the same call will only ask the query once. I had hoped that this would be able to output different values if the two queries had the same answers but different associated outputs, but testing proved otherwise, confirmed by several forums threads I found.  Some of these threads mention that it is not possible without the help of API, but I did not see any API's suggested as solutions.  Does anyone know of/have a custom API that is capable of doing this?  Here is my specific scenario: I am giving a player an ability to fire breathing akin to a circus act as an attack, with various strengths of alcohol having different damage outputs. That part is easy, what is not easy also getting that same query for which alcohol is being used to track the resource for that alcohol like ammunition.  For this, I am using the damage section of the attack on the 5E OGL sheet for the damage query: ?{Which strength of drink are you using?| Weak Ale,1d4| Moderate Ale,2d4| Strong Ale,3d4| Very Strong Ale,4d4| Deadly Ale,5d4} For the ammunition, I pulled all of the resource ID's using the ammunition section in the hopes of using them in the query: ?{Which strength of drink are you using?| Weak Ale,Weak Ale|-MSYnJg4hYiiInxrl_5Y| Moderate Ale,Moderate Ale|-MSYnlvfzNNCUWxkMNPn| Strong Ale,Strong Ale|-MSYnpKh3BwQ9-bDGWnX| Very Strong Ale,Very Strong Ale|-MSYnqQLd2giZHtwNN6W| Deadly Ale,Deadly Ale|-MSYnrRWYP76p8zAHVox} — Yes, ammunition tracking is turned on and I do have the 5e OGL companion API for tracking — All of the |'s in the resource ID's have been converted to html to preserve syntax, but I don't know if this would even work right by itself because I haven't tested it separately from the query above. I could have them be separate queries, but if there is a more streamline solution, that would be awesome.
1612292495
The Aaron
Roll20 Production Team
API Scripter
For something like this, I might suggest a chat menu of possible buttons that are backed by full abilities on a character, rather than a roll query.
1612292535
The Aaron
Roll20 Production Team
API Scripter
Check the section under Chat Menus here:&nbsp;<a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5899495#post-5899495" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5899495#post-5899495</a>
1612303493
Oosh
Sheet Author
API Scripter
You'll need to nest more inside the Query if you're set on using one. Can you post the full macro? As Aaron suggested, a Chat Menu is generally a cleaner option unless you really need it to be a Query.