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

5th Edition OGL by Roll20 - Toggle Global Damage Modifier Checkbox using ChatSetAttr

Hi All, Edition: 5E Sheet:  5th Edition OGL by Roll20 Issue: Toggling the checkbox to turn on (or off) the Global Damage Modifier One of my players wants to setup a macro that toggles the Rage damage modifier and deducts 1 use off the number of current uses of Rage. I have everything working except for the toggle of the Rage damage modifier. I have looked through the Attributes and even the sheet HTML and I cannot find the Attribute I need to change to toggle the checkbox next to "Rage Damage". The closest I found in the sheet html was global_damage_active_flag but setting that to 0 or 1 doesn't seem to do anything. I have the API and the ChatSetAttr script, but I can't for the life of me find the attribute I need to use. Any hints?
1553827149
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I've fiddled with it for a while with no luck. You might be able to find some guidance here .
1553828547

Edited 1553828675
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I AM MIGHTY! I had to download the sheet code to find the dang repeating attribute. !setattr --sel --repeating_damagemod_$0_global_damage_active_flag|1 the $0 is the first line of the repeating damage modifiers, of course. Change to $1 if you need the second, and so on. This is set to affect the selected token, which is probably fine if it is meant to be a token macro. Otherwise, you'll need to specify.
Thanks so much! That is exactly what I needed.
1553829264
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There should be a collected place for all of these common applications for ChatSetAttr.
1553857111
Kai
Plus
Sheet Author
Hey AManImmortal, I am interested in your complete macro. Would you mind to share it?
Of course! Obviously you need the ChatSetAttr script installed and active on your games API page RageON /em unleashes his inner RAGE !setattr --silent --name <CharacterName> --repeating_damagemod_$0_global_damage_active_flag|1 !setattr --silent --name <CharacterName> --mod --class_resource|-1 RageOFF /em calms himself !setattr --silent --name <CharacterName> --repeating_damagemod_$0_global_damage_active_flag|0 Obviously, I have used a character name here, but you could also set it up with the option to roll it by selecting the token. However this is a macro for the character himself, so he'll never be 'casting' it on someone else. On the 'Class Resource' with the --mod tag, it reduces it by one every time RAGE ON is used. It doesn't test to see if it is 0 or anything, so the player (or DM) still needs to monitor the uses. And --silent just makes sure it doesn't spam chat with pointless messages. It's not fancy, but it gets the job done!
1553895740
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If I could make a suggestion? I have a similar macro for the Shaped sheet in my own game, but add the following token mod command: !token-mod --set statusmarkers|strong This puts a status marker on the token so that everyone is aware that he is really, really angry. And of course, this turns it off: !token-mod --set statusmarkers|-strong
An excellent suggestion! We play an 'in person' game but it will remind him to turn it off again. And 0.5 seconds looking at TokenMod, I have also realized it will solve the issue I've had with turning Torches on and off, haha. Thanks again!
If anyone wants to know how to do that without having to select them then it is the following: !token-mod --set statusmarkers|strong --ids @{AManImmortal|character_id} And just replace AManImmortal with your character name. Makes it a bit easier for the barb than having to make sure he hasn't clicked on anything else. So the whole thing is now: RageON /em unleashes his inner RAGE !setattr --silent --name AManImmortal --repeating_damagemod_$0_global_damage_active_flag|1 !setattr --silent --name AManImmortal --mod --class_resource|-1 !token-mod --set statusmarkers|strong --ids @{AManImmortal|character_id} RageOFF /em calms himself !setattr --silent --name AManImmortal --repeating_damagemod_$0_global_damage_active_flag|0 !token-mod --set statusmarkers|-strong --ids @{AManImmortal|character_id} Thanks again!
Hey - I had some serious problems using this a few months ago, it kept ruining the other attacks, removing damage bonuses etc. - I made a few gifs about it but it was 'apparently' never fixed. - AManImmortal - Is this still working correctly for you now you've had more time to test it?
Apologies for the late reply. We have not gamed in over a month now. So unfortunately I haven't had the opportunity to test it much. It seems a little random. I have had some others reach out to see if it works, and 90% of the time it does for me. Then the last session we had, it applied but did not add the extra 2 damage at the bottom of attacks. No other issues with it messing up other attacks etc though. But again, not a lot of chance to test. Once we get another session in, I will update to let you know how it's gone. Regards, AMI