We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Advertisement Create a free account

Assessing attributes using nested attributes

I was just curious if one could nest attributes inside of a macro for example @{@{character_id}|hp|max} in order to access the character's maximum hp as opposed to hard coding the character's id or name into the @{}. 
Andrew C
Marketplace Creator
Should be able to do that, but it might need quite marks around it in case people put spaces and things in the name.
The Aaron
Forum Champion
API Scripter
Not really.  You can use @{target} or @{selected} to keep things generic. To be clear, the issue is that @{hp} works fine (in an ability), but @{hp|max} tries to reference the attribute named 'max' on the character named 'hp' ?
chris b.
Sheet Author
API Scripter
you can add this:  ~@{character_id} we use it to create link button in chat: where Fort-Save is a rollbutton. [Fort link button](~@{character_id}|Fort-Save) that way there is only one value to update, and it calls back to the sheet when a user wants the Fort-Save macro.