Background Some spells, like Spiritual Weapon and Scorching Ray, can result in multiple attack and damage rolls. However, the basic &amp;{template:atkdmg} (and others) expends a spell slot for each attack. I've been working on a macro that will expend a spell slot only on the first attack roll. !script {{ --#sourcetoken|@(selected.token_id) {&amp; select @{character_name}} --#reentrant|[*S:character_id]SpiritualWeapon --#whisper|self --#hideTitleCard|1 --?@\(@(selected.character_name)'s Spiritual Weapon|bar1[none]) -eq none|&gt;Spawn;"[*S:character_name]'s Spiritual Weapon" --:Attack| --#hideCard|1 --&gt;AttackRoll|[*S:character_id] --X| --:Spawn|TokenName --iSpiritual Weapon is normally a 2nd Level Spell;What level spell slot are you using?|q;Slot;Cast at What Level?|Level 2,2|Level 3,3|Level 4, 4|Level 5,5|Level 6,6|Level 7,7|Level 8,8|Level 9,9 --?[*S:lvl[&amp;Slot]_slots_expended] -lt 1|[--+Out of level [&amp;Slot] slots!| --X| --]| --=Slot|[&amp;Slot] / 2 {FLOOR} --@forselected|{^&amp; select [*S:character_name]}Spawn _name|[%1%] _offset|1,1 _bar1|[&amp;Slot] _order|back --^Attack| --:AttackRoll|char id --Rfind|[%1%];Spiritual Weapon;repeating_attack;atkname --&amp;Template|{^&amp;template:atkdmg} --&gt;AddTemplateParameters|mod=+[*[%1%]:spell_attack_bonus] --&gt;AddTemplateParameters|rname=Spiritual Weapon --&gt;BuildRoll|r1;1d20cs&gt;20 + [*[%1%]:wisdom_mod][WIS] + [*[%1%]:pb][PROF] --&gt;AddTemplateParameters|r1=[&amp;r1] --&gt;AddTemplateParameters|always=1 --&gt;BuildRoll|r2;1d20cs&gt;20 + [*[%1%]:wisdom_mod][WIS] + [*[%1%]:pb][PROF] --&gt;AddTemplateParameters|r2=[&amp;r2] --&gt;AddTemplateParameters|attack=1 --&gt;AddTemplateParameters|range=60 feet --&gt;AddTemplateParameters|damage=1 --&gt;AddTemplateParameters|dmg1flag=1 --&gt;BuildRoll|dmg1;d8 + [*[%1%]:wisdom_mod][WIS] --&gt;AddTemplateParameters|dmg1=[&amp;dmg1] --&gt;AddTemplateParameters|dmg1type=Force --&gt;BuildRoll|crit1;d8[CRIT] --&gt;AddTemplateParameters|crit1=[&amp;crit1] --=HLDice|[&amp;Slot] - 2 --&gt;BuildRoll|hldmg;(.49*[$HLDice])d8 --&gt;AddTemplateParameters|hldmg=[&amp;hldmg] --&gt;BuildRoll|hldmgcrit;(.49*[$HLDice])d8[CRIT] --&gt;AddTemplateParameters|hldmgcrit=[&amp;hldmgcrit] --&gt;AddTemplateParameters|{^&amp; if @\(@(selected.character_name)'s Spiritual Weapon|bar1[none]) = none}spelllevel=[&amp;Slot]{^&amp; end} --/&amp;Template|+ammo=1 --/&gt;AddTemplateParameters|charname=@{character_name} --&gt;AddTemplateParameters|desc=[Show Spell Description](`<a href="https://app.roll20.net/editor/~[%1%]%7C[*R&gt;spelldesc_link]" rel="nofollow">https://app.roll20.net/editor/~[%1%]%7C[*R&gt;spelldesc_link]</a>) --@as|[*[%1%]:character_name] [&amp;Template] {{charname=@{character_name}@(Macros|Braces.max) --X| --:AddTemplateParameters|parameter=value --~Trim|string;trim;@(Macros|Braces.max) --#debug|1 --&amp;Template|+@(Macros|Braces)[%1%] --&amp;Template|+[&amp;Trim] --#debug|0 --&lt;| --:BuildRoll|roll name;roll content --&amp;[%1%]|[ --&amp;[%1%]|+[ --&amp;[%1%]|+[%2%] --&amp;[%1%]|+] --&amp;[%1%]|+] --&lt;| }} APIs Required: ScriptCards ZeroFrame APILogic Fetch SelectManager Emas SpawnDefaultToken 5th Edition OGL by Roll20 Companion Status What this Spiritual Weapon macro does is check to see if there is a token on the VTT for the Spiritual Weapon, Spawn one if there is not, and then make an attack, expending a spell slot only on the first run of the macro (i.e., when the token is Spawned). From the Roll Templates wiki :&nbsp; &amp;{template:atkdmg} {{mod=mod}} {{rname=rname}} {{r1=r1}} {{always=1}} {{r2=r2}} {{attack=1}} {{range=range}} {{damage=1}} {{dmg1flag=1}} {{dmg1=dmg1}} {{dmg1type=dmg1type}} {{dmg2flag=1}} {{dmg2=dmg2}} {{dmg2type=dmg2type}} {{crit1=crit1}} {{crit2=crit2}} {{save=1}} {{saveattr=saveattr}} {{savedesc=savedesc}} {{savedc=savedc}} {{desc=desc}} {{hldmg=hldmg}} {{spelllevel=spelllevel}} ammo=ammo {{charname=charname}} These are the available parameters for the template. I've married them into the above macro. Caveats In order for the level field to properly expend the correct spell slot, the charname must resolve to match the exact name of a character sheet. (See&nbsp; spell slot tracking .) Problem Unfortunately, this part doesn't work. Compare: Using the baked in Roll20 OGL Script Using my above macro <span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20cs>20 + 4[WIS] + 5[PROF] = ( 10 )+4+5" style="box-sizing: content-box; font-size: 1.2em; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help;">19 &nbsp; &nbsp; <span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20cs>20 + 4[WIS] + 5[PROF] = ( 2 )+4+5" style="box-sizing: content-box; font-size: 1.2em; font-weight: bold; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help;">11 60 feet Spiritual Weapon&nbsp; (+9) Thodin Show Spell Description <span class="inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 1d8 + 4[WIS] = ( 1 )+4" style="box-sizing: content-box; font-size: 1.2em; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help;">5 Force SPELL SLOT LEVEL 2 2 OF 3 REMAINING <span class="inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling 1d20cs>20 + 4[WIS] + 5[PROF] = ( 1 )+4+5" style="box-sizing: content-box; font-size: 1.2em; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help; color: rgb(179, 21, 21);">10 &nbsp; &nbsp; <span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20cs>20 + 4[WIS] + 5[PROF] = ( 4 )+4+5" style="box-sizing: content-box; font-size: 1.2em; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help;">13 60 feet Spiritual Weapon&nbsp; (+9 ) Thodin Show Spell Description <span class="inlinerollresult showtip tipsy-n-right fullfail" title=" Rolling d8 + 4[WIS] = ( 1 )+4" style="box-sizing: content-box; font-size: 1.2em; line-height: 12px; background-color: transparent; border: 0px; padding: 0px; cursor: help;">5 Force You can also observe that the "Show Spell Description" link a) doesn't function and b) appears in the wrong place. I've examined the link which is generated by the baked-in 5e OGL API, and I'm confident that I have the correct structure for the link address itself, but clicking the link does nothing and it isn't in the right place. The Question What are the template parameters (i.e., {{parameter name=parameter content}}--like with {{charname=character name}}) that correctly identify the spell slot expenditure and create a functional link in the right place?