
So, to begin with, I'm a free user with no access to API.
Short version:
What I'm looking to do is have this return a useable attribute reference: @{DMsheet|Bonus@{selected|Bar3}}
Long version:
My group has the ability to pop a party-wide bonus on Attack rolls, and it increases each turn (similar to, but not, an Escalation Die). I use the Turn Tracker to keep track of this and make sure that I'm updating it each round. We have relatively recently learned how to reference the Bonus in the tracker, making it a lot easier to add it into our rolls, but when the party hasn't activated Bonus, it's not on the boards, and the macros complain that there is no @{tracker|Bonus} to reference.
I first though to add it as a query in the rolls as to whether it was active, but the macro still goes looking for @{tracker|Bonus} at the start of the macro implementation, in case I want to use it, and complains when it can't find it and breaks itself out of spite.
I then thought to use a bouillon function and program two separate attributes: Bonus1 (which would contain the @{tracker|Bonus} reference) and Bonus0 (which would just be set to '0'), and turn it off and on from a token giving us @{DMsheet|Bonus@{selected|Bar3}}, but it references attributes from left to right instead of inside out and so it fails. And since it does calculations after attribute references, I can't use that to make it find the status of Bar3 first.
I can make two separate attack macros, one which references Bonus and one that doesn't, but that's inelegant (and eats up room on the dashboard or button menu).
I can plug [[ 0 + @{tracker|Bonus} ]] instead of the vanilla @{tracker|Bonus} and the macro no longer breaks, but it still complains for each instance it is supposed to be referenced.
I can add a Bonus in the turn order, set to '0', and leave it there no matter what the party does, but that feels clunky, especially when they don't activate it during the encounter.
Any suggestions on how to make this work?