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

Prismatic Spray Macro

Hello veterans of Roll20.  I am a novice when it comes to Macros, but I thought I would share.  I play D&D 5E on Roll20 using the default OGL character sheets.  I utilize two macros for Prismatic Spray. I posted their formulas below. The first macro I posted  contains a version of the Smart AOE token mod I customized for Prismatic Spray.  Sharing in case anyone wishes to use or expand upon.  The second posting  fits my needs for Prismatic Spray Damage except that when I save it, the &#13 disappear from the formula.  What can be done to make sure those three characters (&#13) stay put after I save?  It would be a bonus if anyone knew how to automatically apply damage as well.     Thank you for your time.     <------------------------------------Begin Source------------------------------------> !smartaoe {{   --title|Prismatic Spray   --leftsub|Spell Level ?{Cast at what level?|7,7|}   --rightsub|DC @{selected|spell_save_dc} DEX   --titlecardbackground|linear-gradient(violet, indigo, blue, green, yellow, orange, red)   --aoeType|5econe   --forceIntersection|0   --radius|60ft   --origin|nearest, face   --minGridArea|0.25   --minTokArea|0.25   --fx|burn-magic   --dc|@{selected|spell_save_dc}   --saveFormula|5eDEX   --damageType1|Magic   --ignore|SmartAOE_ignore,1    --instant|1   --conditionFail|red   --conditionPass|green   --zeroHPmarker|dead   --desc|Eight multicolored rays of light flash from your hand. Each ray is a different color and has a different power and purpose. Each creature in a 60-foot cone must make a Dexterity saving throw. For each target, roll a d8 to determine which color ray affects it. }}    <------------------------------------Begin Source------------------------------------> **Prismatic Spray Damage [[1d8]]** [1](!
RED [[10d6]]FIRE), [2](!
ORANGE [[10d6]]ACID), [3](!
YELLOW [[10d6]]LIGHTNING), [4](!
GREEN [[10d6]]POISON), [5](!
BLUE [[10d6]]COLD), [6](!
INDIGO - TARGET IS RESTRAINED AND REQUIRES A SUCCESSFUL CON SAVE AT END OF EACH TURN. THREE SUCCESSESS AND THE SPELL FAILS BUT THREE FAILURES AND TARGET BECOMES PETRIFIED AND TURNS TO STONE), [7](!
VIOLET - CAUSES BLINDNESS AND REQUIRES WIS SAVE ON NEXT ROUND OR BLINDNESS ENDS AND TARGET IS SENT TO RANDOM PLANE), [8](!
SPECIAL - TARGET IS STRUCK BY TWO RAYS) 
1672342684

Edited 1672352047
timmaugh
Forum Champion
API Scripter
Macros eat HTML encodings like your line break series (
). If you save in a macro, they persist until you open the macro to edit it again, at which point you have to re-encode them (add the characters back in, get rid of the line breaks they turned into). The preferred option is to save your macros on a character sheet as abilities (then give your players access to the sheet so they can run the commands as necessary). That's what we call a "Mule Character" or a "Macro Mule". The added benefit (aside from not having to re-code HTML every time you open it) is that the mule character can be transmogged between games, saving setup/prep time. As for damage, Token-Mod and ChatSetAttr are the go to methods, typically, however I believe SmartAoE allows for the application of damage, itself, but I'll leave that to David to chime in on.
1672351247
David M.
Pro
API Scripter
What Tim said :) Regarding Tim's last line about SmartAoE capabilities: This is technically true, but unfortunately Prismatic Spray's mechanics make it extremely difficult to implement fully with SmartAoE. The problem is that each target rolls for a random effect (sometimes hitting more than once), while SmartAoE loads all the effects of the AoE at the time the aoe control token is spawned (allowing positioning of the effect). Since the targets aren't yet known at the time the AoE is generated, and since there are different effects for different targets, the script can't handle it properly. I would just use SmartAoE for positioning (not saves), and use a scriptcard to roll the d8, save, and apply damage for each token as you select valid targets in turn. The scriptcard forum/wiki has lots of examples on how to do that.
Excellent advice. Thank you very much, both of you, and happy holidays.