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 Script to change attributes

July 26 (5 years ago)

Hi, i'm pretty new on API scripts and don't even know how to add the API on my game (i still need to check that, but my question is different ^^)

I need to be able to change attributes of selected characters while using abilities.
Simple example :

- I use my ability Strike, i select the enemy token, it automatically reduces the enemy's attribute "HP" by the dice roll value.
- I use my ability Intellect, i select my ally token, it automatically raises his "intelligence" by a certain value
- I use my macro ResetBuffs, it automatically change "Buff" value on all characters to zero

etc...

It would greatly help me smooth my games, as i am designing my own rpg and some of my players are still not really good at remembering which of them has buffs etc.

Ability macros made me able to make automatisation of lots of things, but changing an attribute value isn't possible.
Btw, wouldn't it be easy to make it possible in the macro system ? Would help looots of GMs.
Like "@{target|HP}.modify(+5)" or something ^^

Thank you all for your answers ! If an API script capable of modifying attributes in my macros already exists, i didn't find it, could you please give me a link with a little help on how to import it ? Thank you all ! :)

July 26 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

ChatSetAttr is an API script that is able to make various changes to attributes on characters.

I just want to note that your bag shows Plus, which isn't sufficient to access the API (Pro subscriber Perk), unless you are using a game created by an active Pro subscriber.  API access is determined by the subscription state of the game's creator, and is only accessible (for adding scripts) by a GM.

July 26 (5 years ago)

Ohhh ok, so i need to pro version of the subscription, thank you ! I'm gonna do that