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

Macro to roll multiple sets of dice

I have a macro that will throw multiple missiles that does 1D6+1 Damage each.  /roll ?{Number of Missiles}d6+?{Number of Missiles} Eventually I will get to the point of doing 2D6+1 Damage on each missile. For the life of me I cannot figure out how to code that in the D20 macro system. Here are some of the things I have tried: /roll ?{Number of Missiles}2d6+?{Number of Missiles} /roll ?{[[Number of Missiles]]}2d6+?{Number of Missiles} /roll ?[[{Number of Missiles}2]]d6+?{Number of Missiles} /roll ?{Number of Missiles}*[[2d6]]+?{Number of Missiles} None of them seem to work... any suggestions?
1618531406
David M.
Pro
API Scripter
You were getting close! /roll (2*?{Number of Missiles|1})d6+?{Number of Missiles}
1618542258

Edited 1618542310
Thank you David... Now I just need to incorporate my damage into the text... /em hits the first monster with {Number of missiles} doing {[[/roll (2*?{Number of Missiles|1})d6+?{Number of Missiles}]]} worth of damage. /em hits the second monster with {Number of missiles} doing {[[/roll (2*?{Number of Missiles|1})d6+?{Number of Missiles}]]} worth of damage. I like the macroing system in the game but still a whole lot to learn...  Ideally I would like to see something come out like: Character hits the first monster with 5 missile(s) doing 36 damage {(10+9+3+4+5)+5}=36 Character hits the second monster with 1 missile(s) doing 4 damage {(3)+1}=4 Not sure if that is even possible.
1618544106

Edited 1618544131
Lucha said: Thank you David... Now I just need to incorporate my damage into the text... /em hits the first monster with {Number of missiles} doing {[[/roll (2*?{Number of Missiles|1})d6+?{Number of Missiles}]]} worth of damage. /em hits the second monster with {Number of missiles} doing {[[/roll (2*?{Number of Missiles|1})d6+?{Number of Missiles}]]} worth of damage. I like the macroing system in the game but still a whole lot to learn...  Ideally I would like to see something come out like: Character hits the first monster with 5 missile(s) doing 36 damage {(10+9+3+4+5)+5}=36 Character hits the second monster with 1 missile(s) doing 4 damage {(3)+1}=4 Not sure if that is even possible. Make sure you include the ? on each query. It's missing on the first one you have there after '/em hits the first monster with '. You also have to make sure each repeated query is typed exactly the same -- capitalization is important.  The first 'missiles' you have is lowercase but the other two are uppercase. You also can't use '/roll' inside an inline roll. The double brackets [[ ]] on the outside tell Roll20 to make a roll. /em hits the ?{Which Monster?|1st,first|2nd,second|3rd,third} monster with ? {Number of M issiles} missiles doing [[(2*?{Number of Missiles|1})d6+?{Number of Missiles}]] points worth of damage. Depending on what character sheet you are using, you could possibly use a 'selected' or 'target' call to insert the name of the caster and target into the output.  For the D&D 5E by Roll20 sheet, one attribute name is 'token_name'. A 'target' call would look like this: /em hits @{target|token_name} with ?{Number of Missiles} missiles doing [[(2*?{Number of Missiles|1})d6+?{Number of Missiles}]] points worth of damage.
Thank you... that worked out wonderfully.