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

[PF] Any way to link class ability uses to the token bars?

I've spent hours searching for an answer to this, and I suspect that this may only be possible through API scripting, but maybe I'm missing something. If I have a class ability created for Bardic performance, and I put in a working calculation for the maximum rounds per day, is there a way to tie that (and the current uses field) to a token bar? I created a custom attribute (we'll call it PerformanceRoundsLeft) and put the following values in: Current: @{repeating_class-ability_-kxiy27fph1aarp4b4dp_used} Max: @{repeating_class-ability_-kxiy27fph1aarp4b4dp_used|max} This attribute's value then is set to the correct # for both values. Then I'm able to link this attribute to a token bar, and when I adjust the values for the current remaining uses on the token bar it adjusts the PerformanceRoundsLeft attribute value, but does not update the actual repeating class ability attributes. Likewise, if I update the repeating class ability attributes directly on the sheet, the PerformanceRoundsLeft attribute doesn't update. It's like once I set the custom attribute's values, it reads them from the repeating attribute but then just becomes a hard coded value instead of actually being linked to the attributes on the character sheet itself. Is it possible to achieve the desired effect without the API? If not, how would you achieve it with the API? Sorry if this has been answered before or if I'm missing something simple, as I'm just starting out trying to learn the platform.  
1480655594
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'd actually recommend using the spell points attributes on the spells tab. Since those aren't repeating sections, you can link them to a bar.
Scott C. said: I'd actually recommend using the spell points attributes on the spells tab. Since those aren't repeating sections, you can link them to a bar. The only problem I'm seeing with this is then I have to manually adjust the number of performances per day on the sheet anytime it changes (from buffs to CHA, or leveling up, etc). In the class ability section I'm able to put in an equation to calculate the maximum number of rounds per day: 4+3+@{class-0-level}+(2*(@{class-0-level}-1))+@{CHA-mod} And I want to be able to have that number updated without too much hassle. I think I actually found a decent workaround. From what I can tell, the PerformanceRoundsLeft attribute only gets overwritten by a hardcoded value when you change the value on the token bar itself. So the compromise I have working now is to only use the equation for the MAX uses in the MAX section of the attribute, and let the current value just be a regular int value that's adjustable. Doing it this way lets me recalculate the max rounds easily (although I have to drag the Character from the Journal onto the board to refresh the token, but that's no biggie) and also lets the player adjust their current remaining rounds on the fly. I will take a look at using Spell Points for abilities where the count might not change much throughout the course of play. Thanks!
1480695409

Edited 1480695576
Tetsuo
Forum Champion
Usually what my group does is create a custom attribute under the attributes and abilities tab, then set the max value to a formula. Then you can link the token to the custom attribute. It generally auto updates with attribute changes.  Then on the sheet itself, you can set the current and max on the sheet itself to @{charname|custom} and @{charname|custom|max}.  Basically, instead of linking the custom attribute calculation to the repeating section, you have the repeating section pull its number from the attribute, which is updated via the token.