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

D&D5e spell damage dice formula for spells that increase dice at 5, 11, and 17th level

There are several examples in D&D5e of spells that incease the number of damage die at 5th, 11th, and 17th level. Anyone have a good formula using an attribute for character level to calculate the number of dice? I'd like to use it in a macro.
1409690650
The Aaron
Roll20 Production Team
API Scripter
This is perhaps not the most precise way of doing it, but you can use: [[ ((@{selected|level}+6.2)/5.6)d6 ]]
1409692915
Lithl
Pro
Sheet Author
API Scripter
1 die at levels 1-4, 2 dice at 5-10, 3 dice at 11-16, 4 dice at 17-20: /roll 1d?{Damage Die} + ((@{level} / 5 - @{level} / 10) / 2 + 0.25)d?{Damage Die} + (@{level} / 11 - 0.5)d?{Damage Die} + (@{level} / 17 - 0.5)d?{Damage Die} If you get multiple dice per tier (eg, 2/4/6/8 instead of 1/2/3/4), you can use something like: /roll ?{Dice Per Tier}d?{Damage Die} + (?{Dice Per Tier} * ((@{level} / 5 - @{level} / 10) / 2 + 0.25))d?{Damage Die} + (?{Dice Per Tier} * (@{level} / 11 - 0.5)d?{Damage Die} + (@{level} / 17 - 0.5))d?{Damage Die} If you start with some number other than 1 die at level 1 but increment by 1 each tier (eg, 0/1/2/3 or 2/3/4/5), simply change the 1d?{Damage Die} from the first expression. Both of the above expressions can also be used as inline rolls.
1409693086
Lithl
Pro
Sheet Author
API Scripter
Aaron said: This is perhaps not the most precise way of doing it, but you can use: [[ ((@{selected|level}+6.2)/5.6)d6 ]] (level+6.2)/5.6 will rank up at levels 3/8/14/19 not 5/11/17.
1409695367
The Aaron
Roll20 Production Team
API Scripter
Interesting. I had thought that using a float on a die would truncate, looks like it rounds. Correction: Level 1 [[ (((1+6.2)/5.6)-.5)d1 ]] Level 2 [[ (((2+6.2)/5.6)-.5)d1 ]] Level 3 [[ (((3+6.2)/5.6)-.5)d1 ]] Level 4 [[ (((4+6.2)/5.6)-.5)d1 ]] Level 5 [[ (((5+6.2)/5.6)-.5)d1 ]] Level 6 [[ (((6+6.2)/5.6)-.5)d1 ]] Level 7 [[ (((7+6.2)/5.6)-.5)d1 ]] Level 8 [[ (((8+6.2)/5.6)-.5)d1 ]] Level 9 [[ (((9+6.2)/5.6)-.5)d1 ]] Level 10 [[ (((10+6.2)/5.6)-.5)d1 ]] Level 11 [[ (((11+6.2)/5.6)-.5)d1 ]] Level 12 [[ (((12+6.2)/5.6)-.5)d1 ]] Level 13 [[ (((13+6.2)/5.6)-.5)d1 ]] Level 14 [[ (((14+6.2)/5.6)-.5)d1 ]] Level 15 [[ (((15+6.2)/5.6)-.5)d1 ]] Level 16 [[ (((16+6.2)/5.6)-.5)d1 ]] Level 17 [[ (((17+6.2)/5.6)-.5)d1 ]] Level 18 [[ (((18+6.2)/5.6)-.5)d1 ]] Level 19 [[ (((19+6.2)/5.6)-.5)d1 ]] Level 20 [[ (((20+6.2)/5.6)-.5)d1 ]] So, [[ (((@{selected|level}+6.2)/5.6)-.5)d6 ]] Cheers!
Aaron said: This is perhaps not the most precise way of doing it, but you can use: [[ ((@{selected|level}+6.2)/5.6)d6 ]] I arrived at almost the same thing: ((@{cleric_level}+7)/6)d8 , my problem is I needed to floor() it, but it is inline in a character sheet and I was running into syntactical issues calling the sheet button with the floor function inline in the sheet damage field. So, I was trying to mathmatically find the modulus and subtract it, but Brian said: 1 die at levels 1-4, 2 dice at 5-10, 3 dice at 11-16, 4 dice at 17-20: /roll 1d?{Damage Die} + ((@{level} / 5 - @{level} / 10) / 2 + 0.25)d?{Damage Die} + (@{level} / 11 - 0.5)d?{Damage Die} + (@{level} / 17 - 0.5)d?{Damage Die} If you get multiple dice per tier (eg, 2/4/6/8 instead of 1/2/3/4), you can use something like: /roll ?{Dice Per Tier}d?{Damage Die} + (?{Dice Per Tier} * ((@{level} / 5 - @{level} / 10) / 2 + 0.25))d?{Damage Die} + (?{Dice Per Tier} * (@{level} / 11 - 0.5)d?{Damage Die} + (@{level} / 17 - 0.5))d?{Damage Die} If you start with some number other than 1 die at level 1 but increment by 1 each tier (eg, 0/1/2/3 or 2/3/4/5), simply change the 1d?{Damage Die} from the first expression. Both of the above expressions can also be used as inline rolls. Seems an easier solution with a bit more modularity as well. I corrected a few order of operation parenthesis: /roll ?{Dice Per Tier}d?{Damage Die} + (?{Dice Per Tier} * ((@{selected|cleric_level} / 5 - @{selected|cleric_level} / 10) / 2 + 0.25))d?{Damage Die} + (?{Dice Per Tier} * (@{selected|cleric_level} / 11 - 0.5))d?{Damage Die} + (?{Dice Per Tier} * (@{selected|cleric_level} / 17 - 0.5))d?{Damage Die} It all seems to work fine, even in the sheet. Using the DnD_5e sheet and Cleric spell Sacred Flame as an example. The spell is 1d8 damage and increases by 1d8 at 5, 11 and 17th levels. Using: 1d8 + (1 * ((@{cleric_level} / 5 - @{cleric_level} / 10) / 2 + 0.25))d8 + (1 * (@{cleric_level} / 11 - 0.5))d8 + (1 * (@{cleric_level} / 17 - 0.5))d8 In the Damage Dice field of the Damage tab for the spell, auto rolls the proper amount of dice based on the character level. Thanks all!