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

Ability Drain API help

1618364621

Edited 1618364715
Hello, I mainly use Powercards,scriptcards,chatsetattr and Token mod. I know its possible, but what would the command be for TokenMod or Script Cards to set or change a attribute? For example, a player is hit with an Dex drain attack. Is there a macro I could create utilizing API to provide a chat prompt of what the attribute would be changed to? (Example: 15 dex, hit with -3 to dex, change it to 13 via a macro).  Any help is greatly appriciated :)
1618371315
Kraynic
Pro
Sheet Author
I think for something like that, you would be looking at ChatSetAttr, which is for creating or changing attributes on a character sheet.  I admit that I don't know the capabilities of the Script Cards though, so it may work without ChatSetAttr.
TokenMod can only change elements on a token, not attributes on the character sheet itself. (Unless you have an attribute linked to a bar, you can use TokenMod to update the bar, which will then update the attribute). You can use ChatSetAttr to change attributes on a character sheet. The macro would be something like: !setattr --sel --silent --mod --dexterity|-3 /w gm Dexterity is now @{selected|dexterity}. You didn't say what game and character sheet you are using, so I'm just guessing that 'dexterity' is the name of the attribute. You can remove --silent if you want the script output of the change.
1618378808

Edited 1618378822
Thank you all for your replies, it was D&D 5e Ogl, but I think Jarren K solved it. I'll check on it tomorrow. Thank you all again!