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

Help with modifying user inputted numbers

Hello everybody, I am trying to create a macro which calls upon a number from the user and then have that number be affected by a couple of things. The first one, and probably more simple one is to have this question, when answered yes, have the next value inputted be multiplied by -2 CODE {{?{Multi-Attack?|No, The Attack is Single Target | Yes, Penalty For Number of Targets  -2 * ?{Number of Additional Enemies }}}}  The Second one would be to take the code in this and subtract from the value of a input by the result of the number in the code above. Currently I have no call back to the first operation as I don't have that right yet abd would like help with call back to results if you all know. What I have for this CODE {{attack 1= [[?{Number of dice|1}d6!cs>4]]}} Thank you for your time and help!
1598746271
Oosh
Sheet Author
API Scripter
I think you want something like this: {{attack1=[[?{Number of dice|1}d6!cs>4-(?{Multi-Attack?|No,0|Yes,-2}*?{Number of Additional Enemies|0})]] }} But I'm not familiar with the rule, so I don't know if the math is correct. Once you've used a Query, you can re-use the value for the rest of the macro as long as the label is exactly the same. For example: &{template:default} {{name=Queries}} {{Roll=[[?{Number of dice|1}d6!cs>4-(?{Multi-Attack?|No,0|Yes,-2}*?{Number of Additional Enemies|0})]]}} {{Dice rolled=?{Number of dice}}} {{Creatures attacked=[[?{Number of Additional Enemies}+1]]}} {{Multi-Attack penalty=[[?{Number of Additional Enemies}*?{Multi-Attack?}]]}}
That's wonderful thank you very much for the help. That's exactly what I was after.