Variable Amount of Dice Rolled

1492755133
Hello World! I am trying to make Sneak Attack with rogue scale up automatically within a macro. The actual math behind it is ceil([rogue_level/2])d6 but I can't seem to translate that into a macro properly. Any help or suggestions? Thanks! ~Michael
1492772999
The Aaron
Pro
API Scripter
So, assuming rogue_level is an attribute, you'd do something like: [[ (ceil(@{selected|rogue_level}/2))d6 ]] If this is going in an attribute (or character sheet) where the character whose rogue_level you are referring to is explicit, you could leave off the selected| part: [[ (ceil(@{rogue_level}/2))d6 ]] You could also wrap it in an inline roll if you don't care about seeing the math: [[ [[ceil(@{rogue_level}/2)]]d6 ]]
1492779795
This is essentially what I had before, however I get the error "TypeError: Cannot read property 'substring' of undefined".
1492780323
Fixed the problem! For some reason it was not seeing which character sheet it was referring to. Thanks so much for the help :D
1492780389
The Aaron
Pro
API Scripter
Great!  No problem!
1492792728
Brian
Pro
Sheet Author
API Scripter
The dice engine doesn't like having functions (such as ceil) being used to calculate the number of dice. The inline roll option Aaron posted solves the problem.