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

Trying to make a macro for a stat toggle

I am new to using Macros and one of my players is playing an eberron shifter in dnd 5e so he has a feature that can be toggled on and he gets a flat bonus to his ac and a rolled amount of temporary health  is it possible to make a toggle with a macro or ability without the use of API?  it'd need to increase the ac by 1 and roll the hp then remove it after it has been toggled off thanks a lot for any help
1727729441

Edited 1727729453
vÍnce
Pro
Sheet Author
Hi Notmade, this would require the game creator have a Pro subscription with an API mod like tokenmod, chatsetattr, scriptcards, etc.  Non-API macros cannot change attributes. They have "read-only" access.
1727730553

Edited 1727734246
You can't change attributes with macros. The short rule is, nothing that is on the character sheet can be changed or altered with macros - macros can only output to chat and initiative. Best you can do is to link AC to one of the token bars, and change that as needed. EDIT: A really janky way to get a on-token toggle for an AC modifier is to 1. enable global ac modifiers section in the sheet settings 2. create an attribute called "aaa" 3. link a token bar to the "aaa" attribute 4. rename the "aaa" attribute to "repeating_acmod_$0_global_ac_active_flag" (no quotes) 5. input a value between 0 and 1 in the attribute 6. now go back to the sheet and you should find an empty global ac modifier entry. Fill it in as you like. Now you have an ac field that is controlled by changing the token bar value between 0 and 1. EDIT2: On further testing, the ac modifier produced this way appears to be quite bugged. Don't follow the steps above if you don't want to break your character sheet. EDIT3: A method that shouldn't break your sheet though, is to have a token bar linked to global_ac_mod_flag - changing the value of that attribute from 1 to 0 hides all your AC modifiers and deactivates them, and changing it from 0 to 1 reveals them, and activates each that is checked on.