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

Need a macro for Shadow Blade

1578932187

Edited 1578932203
The Xanathar's 2nd level spell "Shadow Blade" has an odd damage progression: "When you cast this spell using a 3rd- or 4th—level spell slot, the damage increases to 3d8. When you cast it using a 5th— or 6th-level spell slot, the damage increases to 4d8. When you cast it using a spell slot of 7th level or higher, the damage increases to 5d8." I'm simply not that savvy with macros to even attempt writing a damage field macro for that, and the auto-generated progression for spell damage in the 5E OGL sheet only wants to add an extra die for every additional spell level. Any ideas?
1578937549

Edited 1578939981
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For my character, I just added the weapon as a weapon on my attacks list and put this into the damage field: ?{Level|2nd,2d8|3rd,3d8|4th,3d8|5th,4d8|6th,4d8|7th plus,5d8} Since you only cast the spell once, but use the weapon every round, a custom weapon made more sense. There's just one extra step when you use it, reminding the sheet what level you cast it at.
Thank ya kindly!
1578940004
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I saw an error in my code and edited the macro. It should be correct now.
1578941326

Edited 1578941376
GiGs
Pro
Sheet Author
API Scripter
You could try using this formula (not sure what the level attribute that you'd use is called, replace the name in @{level} with that). [[{ceil(@{level}/2)+1,5}kl1]]d8 This takes (level /2) +1, but never more than 5, and rolls that many dice. I'm not sure if formulas like this work in the damage field of your character sheet, but its worth a try. If you can cast it at different levels each time, Keith's approach is better. But if level is fixed, this will save a click or two when you use it.
1578946198
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I don't believe the slot level attribute is fixed. It is chosen at casting time by the roll template, and then thrown away. I did consider a ChatSetAttr solution to write the last casting level to a custom attribute, but that would require the API