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 .
×

[5e OGL] Spell Slot Count Variable Name

Hi everyone, I may be missing it, but I'm looking for a way to call the current spell slot count from the character sheet and spit it out in chat. Basically I'm making a macro that gives me back some statistical information regarding a selected character (AC, HP, Speed, etc...) and I'd like part of that to be the current available spell slots but I can't seem to find the variable name. Anyone know?  Thanks!
Hi, GM . Which of the three Character Sheets for D&D 5E are you using? OGL by Roll20 <a href="https://app.roll20.net/sheet-previews/ogl5e.png" rel="nofollow">https://app.roll20.net/sheet-previews/ogl5e.png</a> Community Contributed <a href="https://app.roll20.net/sheet-previews/dnd5e.png" rel="nofollow">https://app.roll20.net/sheet-previews/dnd5e.png</a> Shaped <a href="https://app.roll20.net/sheet-previews/dnd5eshaped2.jpg" rel="nofollow">https://app.roll20.net/sheet-previews/dnd5eshaped2.jpg</a>
1478904251

Edited 1478904627
Hi Silvyre, Stupid me for not including that lol. OGL by Roll20 Thanks! Edit: The "Advanced Use" section is almost there, but doesn't provide the variable I'm looking for.
1478907307

Edited 1478907500
Okay. Those Attributes are of the form @{lvl1_slots_total} and @{lvl1_slots_expended}.
Silvyre, Thanks a bunch! Thats exactly what I was looking for.&nbsp;
1478972739

Edited 1478972751
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
As an additional note, you can find just about any attribute name on a sheet by right clicking on the field that contains the variable and clicking "inspect" on the drop down men (at least in chrome). It'll bring up a panel on the right and side that takes a little deciphering, but should highlight the area that you inspected and will show something like this: The name is always (based on my limited understanding of how coding character sheets works) in the format of "attr_" followed by the name of the attribute as it would appear in the attributes and abilities tab (if it shows up there). As an example, the lvl 3 spell slots are "attr_lvl3_slots_total" in the highlighted section on that right hand window above. Scott