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&D 5e] Spiritual Weapon Macro in Template and ?'s on Floor / Ceiling

I'm trying to create a Spiritual Weapon Spell Ability for my party's War Cleric to use and I've had some issues with the output.  I could really use some help with fixing it / cleaning it up.  Also, I had wanted to try making use of the Floor, Ceiling, and Rounding Functions, but I'm not sure how to include them insofar as goes proper Syntax / Order of Operations.  Apologies on this but I really am just needing to see a better version so I can copy and extrapolate for future work.  Thanks very much to all those that can offer some help, what I have mucked up is what's below.  :( @{Zotara|wtype}&{template:atkdmg} @{Zotara|rtype} + @{Zotara|pb}[PB] + @{Zotara|wisdom_mod}[WIS]}} {{mod=[[@{Zotara|pb}[PB] + @{Zotara|wisdom_mod}[WIS]}} {{rname=Spiritual Weapon}} {{r1=[[@{Zotara|d20} + @{Zotara|pb}[PB] + @{Zotara|wisdom_mod}[WIS] ]]}} {{attack=1}} {{range=5 ft. Reach}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[?{Cast at what Spell Level? |2nd,1|3rd,1|4th,2|5th,2|6th,3|7th,3|8th,4|9th,4}d8]] + @{Zotara|wisdom_mod}[WIS]}} {{dmg1type=Healing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[?{Cast at what Spell Level? |2nd,1|3rd,1|4th,2|5th,2|6th,3|7th,3|8th,4|9th,4}d8]][CRIT]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Components: V,S}} {{spelllevel=[[?{Cast at what Spell Level? |2nd|3rd|4th|5th|6th|7th|8th|9th}]] Level}} {{innate=}} {{globalattack=@{Zotara|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Zotara|global_damage_mod_type}}}
1599314613

Edited 1599314657
Stop trying to reinvent the wheel. Based on that template it looks like you're using the default 5E by Roll20 sheet. You don't need to make all that for the spell, as it's already native in the game. All you need to do is to adjust the existing spell entry (on the spells page, not the attack/spellcasting section on the Core page). Make sure the output for the spell is set to Attack rather than Spellcard, and remove any numbers from the Higher Lvl Cast entry, and make sure the die size is set to None, that will disable the native spell level query. Next, in the damage field make the entry the following: floor(?{Cast at What Level?|2|3|4|5|6|7|8|9}/2)d8
Thanks Dakota H., appreciate the info!  And yeah, it may be a bit of reinventing the wheel I guess but it also just comes down to trying to learn a bit of this or that. :)
SergeTroy said: it also just comes down to trying to learn a bit of this or that. :) Okay, first lesson, if the information is not relevant to function of the template you're trying to output, then you don't need to include it. For the above example that includes all of the dmg2 fields. Spiritual Weapon does not do additional damage rolls/types, so it's not necessary and just clutters your macro.