We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Accept
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 @{}. 
1483992732
Andrew C
Pro
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.
1483992908
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' ?
1483994758
chris b.
Pro
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.