This is a small snippet of a script, similar to my  5e HD Helper Script .  Once the script is installed it will look for a trait output to chat, looks for a resource with the same name, and if it exists reduces the number of uses by 1. For example, I had a Paladin/Sorcerer multi-class with Sorcery Points and Divine Sense named the same in both the traits section and the resources section: Upon clicking on the trait (hover over and click the small chat bubble icon), the script will pick up the roll and deduct a resource of the same name by 1. Currently the script only support reduction by 1... so it doesn't work well for things like Lay on Hands.  Hopefully someone will find it useful :). on('chat:message', function(msg) { // ROLL LISTENER if(msg.playerid.toLowerCase() != "api" && msg.rolltemplate) { var cname = ((msg.content.split("{{charname=")[1]||'').split("}}")[0]||''); var character = cname ? findObjs({name: cname, type: 'character'})[0] : undefined; if(["traits"].indexOf(msg.rolltemplate) > -1) { handleresource(msg,character); } } }); // check for matching resource/trait names and decrement resource value with a match var handleresource = function (msg,character) { var traitName = ((msg.content.split("{{name=")[1]||'').split("}}")[0]||''), resources = filterObjs(function(o) { return o.get('type') === 'attribute' && o.get('characterid') === character.id && o.get('name').match(/resourc\S+_name/); }); var rmatch = _.filter(resources, function(r) {return r.get('current') === traitName}); if(_.isEmpty(rmatch)) { return; } var rtype = rmatch[0].get('name').replace('_name', ''); var rname = findObjs({type: 'attribute', characterid: character.id, name: rtype}, {caseInsensitive: true})[0]; if (!rname) { return; } decrementresource(msg, rname, character); }; var decrementresource = function (msg, rname, character) { if(rname.get("current") ==="" || rname.get("max")===""){ log("Resource " + rname.get("name") + " current or max value is null!"); } var curUses = parseInt(rname.get("current")); var newUses = curUses - 1; if(curUses === 0) { sendChat(msg.who, " " + character.get("name") + " has no uses of this trait remaining." + " "); } else { rname.set({current: newUses}); } };