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

Way to collect multiple questions into a single dialog window

I'm currently converting a set of skirmish rules to roll20, when taking a shot there are various questions that are asked, currently doing it in scriptcards like this --=AttackRoll|1d10 + ?{Aiming|No, 0|Yes, 1} + ?{Lily-Livered|No, 0|Yes, -1} + ?{Target in partial cover|No, 0|Yes, -1} + ?{Target in hard cover|No, 0|Yes, -2} + ?{Firer mounted|No, 0|Yes, -2} + ?{Target Stealthy|No, 0|Yes, -1} which is fine as far as it goes, but, it presents each question individually (and there are a few more to add), is there a way to have a single dialog  type popup which allows a user to tick the options which apply to the attack and then submit and return a single figure representing the sum of each modifier?
1709716067
Andrew R.
Pro
Sheet Author
Using the Roll Query syntax like that is nothing to do with ScriptCards, that's the Roll20 parser doing the work before ScriptCards sees anything.  Have a look at the --I command in ScriptCards, which has its own limitations, but at least follows the control flow of your ScriptCards program.  There are probably other ways in ScriptCards, but I use only the --I command. Ask in the ScriptCards thread for more expert advice. 
1709716824

Edited 1709716902
Thanks Andrew, I'll take a look at --I, using the basic roll parsing seemed to work so I left it in, but, has not turned out to be ideal. :)
1709723451
GiGs
Pro
Sheet Author
API Scripter
I don't know what ScriptCards does, but I can confirm that there is no way to collect multiple queries in one window. Queries have to appear one after the other. Hopefully that'll change in the future, but it's unavoidable right now.
1709747655
Kurt J.
Pro
API Scripter
Norman said: Thanks Andrew, I'll take a look at --I, using the basic roll parsing seemed to work so I left it in, but, has not turned out to be ideal. :) Norman - I posted a reply in the ScriptCards thread with an example of creating a menu with toggle buttons in SC that is whispered to the player while they interact with it. When they finally roll the attack, the result is sent to the normal chat.
A different possible option to limit the amount of questions asked is to use character attributes and token statusmarkers for things. Like in your above list maybe Lily-Livered could be an attribute added to a character and then you would check in your ScriptCard to see if the sending character has that attribute set to 1. You could have statusmarkers for if a character is Aiming and Mounted so you could have your ScriptCard detect if those are in the sourceToken's statusmarkers. You could have a statusmarker for Stealthy on token's that are being stealthy. Having macros to set and unset these conditions could allow your players to mark if they are aiming or if they are mounted or dismounted and your attack macro could detect all of those states and not have to use the roll queries ?{} for those. You may not be able to eliminated the need for all questions but you might be able to use attributes and statusmarkers as a way to detect some states without needing to prompt.
Thanks Joshua, that's definitely food for thought, I'll have a play with that approach. I've also just realised that I can condense the no cover/partial/full cover into one question which will also help.