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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Pre-answer and suppress prompt in roll query as indirect variable

With roll queries, only the first one pops up a window, and subsequent uses of the same prompt text use the value from the first use. With a little augmentation, this mechanism can act as a form of short-lived variable.I propose adding a means to associate a value with a prompt without displaying the window at all, but acting as though there was a window and the user answered the prompt. Roll queries already carry over from macro to macro, so to implement, it appears that all that is necessary is a means to skip the prompt and take the default value (which would not be optional in this case). Here is a use case, by simplified example: Macro "attack": /roll 1d20 + 3 + ?{Power attack?|0}*-1 vs AC /roll 1d8 + 3 + ?{Power attack?}*2 damage Macro "power-attack": ?{Power attack?|=1} #attack Macro "normal-attack": ?{Power attack?|=0} #attack So calling #power-attack essentially associates "1" with the "Power attack?" query without showing the prompt, and this value applies to the references to that query in #attack as well. With more complex macros, the usefulness increases. I'm not very familiar with how the parser works, so perhaps the syntax needs to be different, but that is the general idea.
1550175444
Roll20 Dev Team
Pro
Marketplace Creator
Thanks for the suggestion! After 30 days, Suggestions and Ideas with fewer than 10 votes are closed and the votes are refunded to promote freshness. Your suggestion didn't build the right momentum this time, but feel free to submit it again! We find that the best suggestions describe the problem you are having, and the solution you want. You can learn more about the process of making suggestions on the Roll20 Wiki! More details can be found here .