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

Macro for Spell vs Spell Save DC

Good afternoon, I am still new to using API for scripts and macros. I was wondering if someone might be able to help me out with building a script for when I am trying to get the selected tokens spell save dc to go against the targets saving throw. For example, if I were trying to use Moonbeam, and I wanted the macro to use the selected tokens spell save dc against the targets constitution saving throw. So far this is what I have been using for basic melee and ranged attacks: !power {{ --name|Greataxe --leftsub|Melee Attack --rightsub|5 ft Range --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|AC} --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 1d12+5 ]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d12+5 ]] --vfx_opt|@{selected|token_id} @{target|token_id} bomb-blood --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }} I am trying to figure out how to change this script into using the spell save dc and the saving throws instead.  I apologize if this is not clear or I am not making sense, as I said I am still new to this and trying to figure it out. Any help would be much appreciated. Thanks.
If possible, I would also like to macro to place AOE markers of some kind (spheres,cubes) onto the map based on the spell to show the area of the AOE. Thanks.