I am not sure the best way to describe what I mean when I say this, do bear with me My goal is, blatantly speaking, to have an ability from the Devil May Cry franchise and my character is able to enter/exit a state of Devil Trigger, and at the end of each round, 1 Gauge is taken away (which is what is expended while DT is active, I dub the gauge "DTG"), and once DTG runs to 0, my DT is deactivated. I do have this set up by way of having the attribute "DT|max" be 0 or 1 (1 for active), and to help track DT use, made another macro called "Turn End", which applies attribute changes whenever I end my turn (using the ChatSetAttr API). This is where I would like some help Within that Turn End macro, the way that I determine if DT is disabled is pre-emptive - I calculate what DTG will be after my turn ends, and toggle another attribute called DTD|max (short for Devil-Trigger Disable) to 0 or 1, and then by using comparison, determine if the next turn-end will de-activate my DT, rather than doing it on the fly when DTG actually reaches 0. My goal here is to see if it's possible to call for the full De-activation macro specifically when DTG reaches 0, rather than having to tell roll20 to prepare to deactivate DT next turn as that causes some complications. By now, it'd probably help if I posted the data between attribute and macros. Bear in mind that this may be a little jank, as it's a WIP even now Attributes Min_Val Max_Val (Some MAX values may be shown differently for spacial reasons. Said attr shows as attr: @defer @{<character_name>|defer @{<character_name>| @DT <0 or 1> DTTe @{defer|max}DTTe@{DT|max}} @{defer|max}DTTe@{DT|max}|max} DTTe0 DTTe1: !setattr --charid @{character_id} --silent --class_resource|[[@{class_resource}-[[{{@{class_resource},0}>1}]]]] --DTD||[[{{@{DT|max},0}>1}*{{@{class_resource},0}=2}]] @{DTD} <DTTe1|max> %NEWLINE%DT Gauge = [[@{class_resource}-[[{{@{class_resource},0}>1}]]]].@{defer|max}DTD@{DTD|max}|max} @DTD @{defer|max}DTD@{DTD|max}} <0 or 1> @DTD0 @DTD1 %{<Character_Name>|DTD} %NEWLINE%DT Deactivated Class_resource is what I use as my general DTG tracker. In DTTe1, --class resource is subtracted by 1, should I have 1 or more, and --DTD checks if DT is on or off, and multiplies the result with whether or not class resource is = 2. If it is = 2 and DT is on, the result of DTD|max becomes 1. When this is finished, I will have 1 class resource left, and once I run "@Turn End" again, the DTD1 is set up to run the %DTD ability macro which deactivates my DT and its effects. You may be able to see the flaws this has if I manage to re-gain class_resource in this state where DTD is 1, as at that point, ending my turn again will still deactivate DT even after regaining resource. <%Abilities> <Ability Content> %Turn-End @{DTTe} /w <Character_Name> Turn Over. @{DTTe|max} %DTD !token-mod --set currentside#1 --ids @{<Character_Name>|character_id} !setattr --charid @{character_id} --silent --dt||0 --speed|[[(@{SpB})*(@{SpH}+1)*(@{SpT}+1)]] --SpD|0 --repeating_inventory_-GhTKhg9mwTLhK4O6RHr_equipped|0 --DTD||0 /w <Character_Name> DT Deactivated The newline after %DTD is intentional as to avoid confliction when being ran alongside @{DTTe}. Is there a way to initiate my deactivation simply by calculation alone? I know that you can't call attributes using inline math (ie @{[[5+10]]} will not call @{15)), so how else can I do this I will preface as well, the API's that are in the campaign presently are TokenMod, SetChatAttr, and !ammo. No other API's are planned to be installed due to concerns of campaign corruption when adding API's mid-way through