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

[SCRIPT] Token Action - Resources?

Is there any way to add a token action that allows use of resources?  For instance, can I link a monk's Ki points to Token Action so he can use his Ki abilities without having to open his character sheet? I know this functionality does not currently exist, but is there a way to add some command lines to the script to implement it?
1603557872

Edited 1603558066
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can set up a ChatSetAttr macro to a resource and put that into a token action. Example: Top left !modattr  --sel --class_resource|-1 Top right !modattr  --sel --other_resource|-1 Second row left !modattr  --sel --repeating_resource_$0_resource_left|-1 second row right !modattr  --sel --repeating_resource_$0_resource_right|-1 Since ki points are not always deducted one at a time, you can substitute the -1 in any of these macros with a query: !modattr  --sel --class_resource|-?{How many points|1} The player will input the number of points to deduct, the macro will know to make the value negative. Just put these into named abilities on the character sheet on the Attributes and Abilities tab and set them to be Token Actions. ChatSetAtt is available in the One Click install. You can also handle recovery. There are currently three recovery scripts for the OGL that handle resources. All of them work, but here is mine .
Wow, you rock, Keith!  Thanks!