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

Total dmg macro help

I am really new to using macros; so used a macro on i found to try and calculate total damage. there was only one issue it didnt have an attack roll. &amp;{template:default} {{name=[ ](<a href="https://i.ibb.co/PCB7CbT/metallica.png" rel="nofollow">https://i.ibb.co/PCB7CbT/metallica.png</a>)}} [[ [[1d20 + 9]][roll] ]] {{To Hit=$[[1]] }} &amp;{template:default} {{Damage Roll}} [[ [[1d8 + 5[Dex]]][Base] + [[2d8]][thunder] + [[1d6]][Fire] + [[1d10]][poison] + [[2d8]][Radiant] ]] {{Base Damage=$[[0]] slashing}} {{The Boom=$[[1]] Thunder}} {{Flaming fury=$[[2]] fire}}{{Serpent's Fang=$[[3]] poison}} {{Spirit Shroud=$[[4]] Radiant}} {{Total Damage=$[[5]] }} i had to put these macros separate just have an attack roll when i press the macro, and the to hit roll doesnt highlight when rolled. could someone point me in the right direction of how to merg the two without conflict? thank you so much.
1646464086

Edited 1646591777
GiGs
Pro
Sheet Author
API Scripter
When you put an inline roll inside another inline roll (thats 1 set of inline roll brackets [[ ]] inside another set of brackets like so [[ [[ ]] ]]), it makes the roll unreachable. But your macro doesnt need both sets of brackets. That first line could be &amp;{template:default} {{name=[ ]( <a href="https://i.ibb.co/PCB7CbT/metallica.png" rel="nofollow">https://i.ibb.co/PCB7CbT/metallica.png</a> )}} {{To Hit=[[1d20 + 9]] }} You dont need to use $[[0]] syntax for simple rolls like this. You could also, if desired, combine both templates into one. You'd just need to increase the $[[ ]] numbers by 1. Something like: &amp;{template:default} {{name=[ ]( <a href="https://i.ibb.co/PCB7CbT/metallica.png" rel="nofollow">https://i.ibb.co/PCB7CbT/metallica.png</a> )}} {{To Hit=[[1d20 + 9]] }} [[ [[1d8 + 5[Dex]]][Base] + [[2d8]][thunder] + [[1d6]][Fire] + [[1d10]][poison] + [[2d8]][Radiant] ]] {{Damage Roll=}} {{Base Damage=$[[1]] slashing}} {{The Boom=$[[2]] Thunder}} {{Flaming fury=$[[3]] Fire}}{{Serpent's Fang=$[[4]] Poison}} {{Spirit Shroud=$[[5]] Radiant}} {{Total Damage=$[[6]] }}
1646550685

Edited 1646591785
GiGs
Pro
Sheet Author
API Scripter
Or you could avoid incrementing the numbers by moving the hidden roll earlier in the expression. &amp;{template:default} {{name=[ ]( <a href="https://i.ibb.co/PCB7CbT/metallica.png" rel="nofollow">https://i.ibb.co/PCB7CbT/metallica.png</a> )}} [[ [[1d8 + 5[Dex]]][Base] + [[2d8]][thunder] + [[1d6]][Fire] + [[1d10]][poison] + [[2d8]][Radiant] ]] {{To Hit=[[1d20 + 9]] }} {{Damage Roll=}} {{Base Damage=$[[0]] slashing}} {{The Boom=$[[1]] Thunder}} {{Flaming fury=$[[2]] fire}}{{Serpent's Fang=$[[3]] poison}} {{Spirit Shroud=$[[4]] Radiant}} {{Total Damage=$[[5]] }}
oh damn thanks bro!