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

Ceiling formula to determine amount of dice?(DnD 3.5 Magic Missile)

Hello. First off, I realize there is other ways to do this easier(literally just having a variable with amount of missiles/using a query are both much easier methods) but now I am curious because I can't figure this out and want to know if its possible. I am trying to create a "Focus fire Magic Missile" macro that hits a single target with all my missiles, without using a query(originally because I didn't know about querys but now because I just want to know). The simple problem I came up with was Ceiling(Level/2-1) to detirmine amount of bonus missiles(1 bonus missile at level 3, 2 at 5, 3 at 7, etc) which I THOUGHT would translate into: /roll (ceil(@{battlesmit|level}/2-1)+1)d4 But what ends up happening is it does the ceiling calculation correct, but doesn't roll the D4's. What's the reason for this?
I figured it out. I needed to use "[[" and "]]". /roll [[(ceil(@{battle|level} /2-1)+1)]]d4 ^For anyone who comes across a similar problem.
Technically, you don't even need the /roll. The [[ ]] serves as an in-line roll. [[ceil(@{battle|level}/(2-1)]]d4]] should also do the trick ;)
1516092122
GiGs
Pro
Sheet Author
API Scripter
Though that will hide the dice roll, whereas using roll lets you easily the individual dice.
Will said: Technically, you don't even need the /roll. The [[ ]] serves as an in-line roll. [[ceil(@{battle|level}/(2-1)]]d4]] should also do the trick ;) I was unaware of this, Thank you for the information!