It's been a long while since I learned Javascript so excuse any ignorance on my part. I am playing the Star Wars 5E conversion on roll20. The sheet uses a points system similar to soecerer points but for spells. The character sheet can be found here: <a href="https://wiki.roll20.net/StarWars5E-Sheet" rel="nofollow">https://wiki.roll20.net/StarWars5E-Sheet</a> Best I can tell this is the code that needs to be edited. With some extra bits in the !longrest command to restore expended stuff. The sheet already has force_power_points_expended and tech_power_points_expended and I'm just not totally sure what needs to be changed to get it to work with the sheet or if it's a much harder task than just changing the appropriate fields from var resolveslot = function(msg,character,player,spellslot) { var charslot = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_**"}, {caseInsensitive: true})[0]; if(!charslot) { charslot = createObj("attribute", {name: "lvl" + spellslot + "_slots_expended", current: "0", max: "", characterid: character.id}); //var charslot = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_expended"}, {caseInsensitive: true})[0]; } var charslotmax = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_total"}, {caseInsensitive: true})[0]; if(!charslotmax) { charslotmax = createObj("attribute", {name: "lvl" + spellslot + "_slots_total", current: "0", max: "", characterid: character.id}); //var charslotmax = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_total"}, {caseInsensitive: true})[0]; } var spent = parseInt(charslot.get("current"), 10); charslot.set({current: Math.max(spent - 1, 0)}); var wtype = getAttrByName(character.id, "wtype"); var wtoggle = getAttrByName(character.id, "whispertoggle"); if(spent &gt; 0) { if(state.FifthEditionOGLbyRoll20.spelltracking != "quiet") { if(wtype === "" || (wtype === "@{whispertoggle}" &amp;&amp; wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" &amp;&amp; msg.type === "general")) { sendChat(msg.who, "&lt;div class='sheet-rolltemplate-simple' style='margin-top:-7px;'&gt;&lt;div class='sheet-container'&gt;&lt;div class='sheet-label' style='margin-top:5px;'&gt;&lt;span style='display:block;'&gt;SPELL SLOT LEVEL " + spellslot + "&lt;/span&gt;&lt;span style='display:block;'&gt;" + Math.max(spent - 1, 0) + " OF " + charslotmax.get("current") + " REMAINING&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"); } else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" &amp;&amp; wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" &amp;&amp; msg.type === "whisper")) { sendChat(msg.who, "/w gm &lt;div class='sheet-rolltemplate-simple'&gt;&lt;div class='sheet-container'&gt;&lt;div class='sheet-label' style='margin-top:5px;'&gt;&lt;span style='display:block;'&gt;SPELL SLOT LEVEL " + spellslot + "&lt;/span&gt;&lt;span style='display:block;'&gt;" + Math.max(spent - 1, 0) + " OF " + charslotmax.get("current") + " REMAINING&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"); } } } else { if(wtype === "" || (wtype === "@{whispertoggle}" &amp;&amp; wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" &amp;&amp; msg.type === "general")) { sendChat(msg.who, "&lt;div class='sheet-rolltemplate-simple' style='margin-top:-7px;'&gt;&lt;div class='sheet-container'&gt;&lt;div class='sheet-label' style='margin-top:5px;'&gt;&lt;span style='display:block;'&gt;SPELL SLOT LEVEL " + spellslot + "&lt;/span&gt;&lt;span style='display:block; color:red;'&gt;ALL SLOTS EXPENDED&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"); } else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" &amp;&amp; wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" &amp;&amp; msg.type === "whisper")) { sendChat(msg.who, "/w gm &lt;div class='sheet-rolltemplate-simple'&gt;&lt;div class='sheet-container'&gt;&lt;div class='sheet-label' style='margin-top:5px;'&gt;&lt;span style='display:block;'&gt;SPELL SLOT LEVEL " + spellslot + "&lt;/span&gt;&lt;span style='display:block; color:red;'&gt;ALL SLOTS EXPENDED&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"); } } };