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

Rolling more dice without summing up

Hello, I want to roll something like 3*(1d4 + 1) without summing up, e.g. a mage is firing three magic missiles on three different targets and I want to have the damage result for every missile in one roll. I played around but could not find any solution. The background is a roll template for the magic missile spell that gives the result by using the casterlevel-attributes to determine the number of missiles and their damage. My workarround is to have the damage output making x separate dice rolls. This means I have to edit the macro if the player levels up. Thank you for your help, Moriz
1426131000
vÍnce
Pro
Sheet Author
This might be of interest to you Moriz D&D 5e - Universal Cantrip Formula (Works, just not with rolls) basically; Brian said: When calculating the number of dice to roll, round(x) is automatically applied to the formula. Therefore, you can use [[((x + 1) / 6 + 0.5)d4]] for example, to roll the appropriate number of d4s. This is consistent with your supposition for extending the level to 30, too. =)
&{template:default} {{name=Magic Missile: ***[Link]( <a href="http://www.d20pfsrd.com/magic/all-spells/m/magic-missile)***" rel="nofollow">http://www.d20pfsrd.com/magic/all-spells/m/magic-missile)***</a>} } {{Range:=[[130]] *ft*}} {{Area:=*Target*}} {{Duration:=*Instant*}} {{SpellResist:=[[1d20+3[Caster Level]]}} &{template:default} {{name=Effect}}{{Dart1:=[[1d4+1]]}}{{Dart2:=[[1d4+1]]}}{{Dart3:=[[1d4+1]]}} Looks like hell to read, but results in: Note: Forum formatting breaks the [Link] URL, so don't copy that exactly. If you want a much simpler approach, just use a plain macro where you roll it three times. /me shoots bolts of magical energy out of his arse! SpellResist: [[1d20+3]] Bolt1: [[1d4+1]] Bolt2: [[1d4+1]] Bolt3: [[1d4+1]]
I set up the roll template as Mark has posted. Calculating the number of darts by casterlevel (to a max of 5 even if you are level 20) works the same way as the dex-modifier to AC in the character sheet taking in concern the dex-max of the armor. What I want to avoid is repeating the damage roll in a static way. Maybe the API can help ...?
Yeah, if you're willing to use the API, you could do something like: var cmd = "&{template:default} {{name=Magic Missile}}"; for (var i = 0; i &lt; NUM_MISSILES; i++){ cmd += " {{missile" + i + "=[[1d4+1]]}}"; } sendChat("Enchanter Tim", cmd); where NUM_MISSILES is set/computed elsewhere in the script.
Actually, you could probably do better than that: &{template:default} {{name=Magic Missile}} {{missile1=[[{{(@{casterlevel}/2)d1cf0cs2, 0d0}kh1, 1d1cf0cs2}kl1*(1d4+1)]]}} {{missile2=[[{{(@{casterlevel}/2-1)d1cf0cs2, 0d0}kh1, 1d1cf0cs2}kl1*(1d4+1)]]}} {{missile3=[[{{(@{casterlevel}/2-2)d1cf0cs2, 0d0}kh1, 1d1cf0cs2}kl1*(1d4+1)]]}} ... The missiles that are above the current caster level will all give 0, the others will give 1d1*(1d4+1). If you don't care about max/min highlighting, you can do away with the "cf0cs2" on the d1 "rolls," which will highlight all the rolls blue (because 1 is both min and max on 1d1).
thank you manveti. this really helped.