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

Toggle Global AC Mod using ChatSetAttr

Using ChatsetAttr I can currently toggle Bless On/Off from a single macro using: !setattr --sel --silent !setattr --sel --silent --repeating_savemod_$0_global_save_active_flag|[[1-@{selected|repeating_savemod_$0_global_save_active_flag}]] !setattr --sel --silent !setattr --sel --silent --repeating_tohitmod_$0_global_attack_active_flag|[[1-@{selected|repeating_tohitmod_$0_global_attack_active_flag}]] However trying the same thing with the Global AC Mod is giving and error. Macro: !setattr --sel --silent !setattr --sel --silent --repeating_acmod_$0_global_ac_active_flag|[[1-@{selected|repeating_acmod_$0_global_ac_mod_flag}]] Error: No attribute was found for @{selected|repeating_acmod_-NyCFmM-u4kxsx0yTXee_global_ac_mod_flag} I inspected the element to get the name of the repeating section for ACMOD since I couldn't find it listed on the Wiki.  Any help would be appreciated. Thanks, Shane
1716135803

Edited 1716136588
Gauss
Forum Champion
The show AC field is turned off by default. Even when you enable all the other fields (such as show damage) in the campaign settings the AC field is not shown because it is not available in the campaign settings.  Make sure it is turned on for that character sheet.  Edit, I checked and what you have is the correct attribute. I am able to use it correctly on characters with the AC field enabled.  On characters with the AC field not enabled I get the result you got. 
1716138186

Edited 1716138655
Thanks so much for taking a look at this! So I have tried this on multiple characters and I am getting the same error (with slight differences for the character ID's).  I for sure have the Global AC Mod field enabled and I've entered a value for that field. When I try it for a character who does not have the Global AC Mod enabled I get a different error: You tried to use the repeating section row at index 0 for repeating_acmod, but there doesn't seem to be a row at that index. No attribute was found for @{selected|repeating_acmod_$0_global_ac_mod_flag} Any ideas?
1716139027
Gauss
Forum Champion
Your attribute appears to be incorrect, I tested this and it works to turn the flag on and off:  !setattr --sel --repeating_acmod_$0_global_ac_active_flag|[[1-@{selected|repeating_acmod_$0_global_ac_active_flag}]]
Thank you! I came back and compared the two... damn I had worked myself into a bunch of errors. I really appreciate the help. S