I have a Macro that changes a bubble value when run it using TokenMod; there's a dropdown to select whether it damages or heals, then a pop-up to enter a value. This worked great for me until I realized that, for characters, it didn't carry across pages because Macros don't change attributes. I'm trying to write an API script to give me that functionality. I currently have the following, based on code from the wiki and from this post; //HP Attribute Modification //type "!modHP" to decrease HP on("chat:message", function(msg) { if(msg.type == "api" && msg.content.indexOf("!modHP ") !== -1) { var numdice = msg.content.replace("!modHP ", ""); var attribObj = findObjs({ type: 'attribute', characterid: character.id, name: "Hit Points" })[0]; if (attribObj) { var hp = attribObj.get('current') -1; attribObj.set('current', hp); } } }); Currently, if I'm doing this correctly, this would reduce the selected character's Hit Points attribute by 1 every time it ran. What I would like for this to do is to be able to reference a few variables from a macro to determine if it increases or reduces the HP attribute, and if so by how much; if I can do that, I could work this into the macro and continue using it for both character and non-character tokens. Is there a way to reference macro variables in API scripts, and if so how can I do it? For reference, this is the macro I'd be working this into; !token-mod --set bar2_value|[[@{selected|bar2}?{Action|Damage, - |Heal, + |, - }?{HP±|0}]]