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

API: Token-Mod inline roll setting attribute.

Hello there. I've been trying to get a handle on Aaron's Token Mod API in a Macro. I'm running a homebrew in 5e which has the existing AC rolled with a D20 and subtracted by 10. Using the API I'm wanting to have a roll with attribute reference the sheet's @{ac} then set a new Attribute called Armor_Class.  Below is the code after I tweaked it some, but it isn't setting the Armor_Class value. !token-mod --set Armor_Class|[[1d20+@{ac}-10]] I have tried the inline roll with quotes, with the @{ac} as @{Selected|ac} I want it to set a new attribute so the players can put their AC in as normal and I can call the Armor_Class as a whisper to lessen their confusion and prevent me from asking "What's your AC this round". I feel like I'm missing something rather simple here. Thank you for reading and responding.
1567619034
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Token mod is only designed to interact with token attributes (e.g. the bar values, position, layer, rotation, etc). You need the chatSetAttr script by Jakob which is designed to interact with character's attributes (and even create them if needed).
Ah. Thank you very much. Hehe, I was digging in the wrong spot!