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

Spell slot counter

I am currently playing a druid and I want to use macros to cast spells. I already have several set up for the healing, what I want is to click the button for my spells and cast them and they will auto subtract the spell slots from what I have available. We have 5eOGL Sheet companion api installed. In an old post i found this string !setattr --charid @{character_id} --modb --lvl?{Spelllevel}_slots_expended|-1 Is that correct? How can I implement my macro in order to have the automatic decrease of the slot? I.e this is one of my macro &{template:default} {{name=Cure Wounds (Level ?{Cast at what level?|1})}} {{@{target|Character_Name} Heal= [[?{Cast at what level?|1}d8[spell dice]+1d4[sickle]+2[disciple of life]+@{selected|wisdom_mod}[wisdom mod]+?{Cast at what level?|1}[spell level]]] hp}} Thanks in advance  
The !setattr command is for the ChatSetAttr script. Do you have that installed?  For the 5e Companion Script, the command to enable automatic spell slot tracking is: !spelltracking on Your macro won't actually cast the spell from your character sheet. It'll just 'recreate' the roll in the default template.  Instead you want a macro that just does the same thing as clicking on the spell on the character sheet: You'll need to look at the list of level 1 spells on the sheet, and see where Cure Wounds is in the order of all that character's spells. Then you can use %{selected|repeating_spell-1_$0_spell} to make the roll, and the 5e Companion Script should automatically track the spell slot usage.   You'll need to change the '$0' number to whichever number Cure Wounds is on the sheet. The first spell listed is $0, the second is $1, the third is $2, and so on.  If you want to use the default template with the ChatSetAttr macro, then you just need to add the API command inline. Take a look at the script info in the wiki for an example.
You need to install API ChatSetAttr from the 1-click menu. Then you can use the !setattr line. Your Macro will look like this: !setattr --name "character name as it appear on the character sheet" --modb --lvl?{Cast at what level?|1}_slots_expended|-1 &{template:default} {{name=Cure Wounds (Level ?{Cast at what level?|1})}} {{@{target|Character_Name} Heal= [[?{Cast at what level?|1}d8[spell dice]+1d4[sickle]+2[disciple of life]+@{selected|wisdom_mod}[wisdom mod]+?{Cast at what level?|1}[spell level]]] hp}} Notice that the !setattr line is in a separate line. I also change the --charid to --name since you have a target id on the macro template, is a little complecated when you have a selected|character_id and target|charcter_id. this you'll work
Thanks both!