Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Set attribute within macro

1452579569

Edited 1452579707
I would like to have an ability called Beacon which I add to my healing macro. I want my initiative macro to set Beacon to 0 and my Beacon macro to set it to 5. When I use my healing macro before my Beacon macro, the healing is done with +0...after I do my Beacon macro, any healing macro is +5 IF API is needed, then my GM could insert code if someone knows how to write this Example /em Zed rubs some dirt on you. You can use a healing surge and add [[3d6+@{Beacon}]] INITATIVE /em A Initiative roll has been made. [[1d20 +@{selected|Initiative} &{tracker}]] somehow set @{Beacon} to 0 BEACON /em Zed shines a Beacon of Hope on the Battlefield... somehow set @{Beacon} to 5
You can't without using the API or a character sheet sheetworker script. Which requires a pro subscription.
1452592845
Ziechael
Forum Champion
Sheet Author
API Scripter
For a free account you could have a token on each page that has the bars set to your desired values (which you could then update as needed during play). It isn't the most elegant but for global modifiers it is often quicker to hardcode macros and manually update a single value in this way than to set up a roll query to query the value each time. In this example you would have bar1 for your beacon of hope token: Example /em Zed rubs some dirt on you. You can use a healing surge and add [[3d6+@{beacon of hope|bar1}]]  INITATIVE /em A Initiative roll has been made. [[1d20 +@{selected|Initiative} &{tracker}]] Manually set beacon of hope token bar1 value to 0 BEACON /em Zed shines a Beacon of Hope on the Battlefield... Manually set beacon of hope token bar1 value to 5