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

ChatSetAttr: (Pathfinder) Is there any way to adjust number under used for abilities?

Howdy doods, I have been working on my knowledge, have made spellbooks that show what spells I have and how many uses left/total uses of spells, and also for spell-like ability section.  I want to do the same thing with the abilities in the additional tab, subsection Features/Traits.  For instance, I have a brawler and he has 4 uses of the Martial Flexibility ability, and it shows 0/4.  Now, I have the the 4 part  [[@{ selected|repeating_abilities_$13_perday_qty}]] But I can't seem to find the 0 part.  When I hover it, it says # used, and I tried plugging in used where qty is, but that didn't work.  I tried some other stuff too, but nothing yet.  For spell-like abilities, it is just 'repeating spell-like $1 perday' and then 'repeating spell-like $1 perday|max' How do I find out, for future reference?  Thanks in advance.

Edited 1625236792
Sheet Author
Which Pathfinder?&nbsp; Pathfinder by Roll20, Pathfinder Commmunity, Pathfinder Simple, Pathfinder 2E (and it feels like I might be missing another yet)... One way to get them is to hover over the input, right click and "Inspect Element".&nbsp; On the Pathfinder by Roll20 sheet, the number of currently available uses of a feat/trait is "perday".&nbsp; The html in the inspect dialogue says: name="attr_perday".&nbsp; You strip off the attr_ part, because that is just telling the Roll20 sheet sandbox that what is being created is an attribute to store info.&nbsp; If you scroll up in the inspect screen, you will see a list of the row id for every row currently present, and right above that will be the repeating section name.&nbsp; It will be labeled as class="repcontainer", and instead of simply "name", it will be using "data-groupname".&nbsp; On the Pathfinder by Roll20 sheet, this would be: data-groupname="repeating_abilities". So, on that particular sheet, it would be something like: repeating_abilities_$0_perday Just set the row number to whatever is needed. Edit:&nbsp; I overlooked it on the first pass down the list, but that repeating section is also given in the wiki article on the sheet.&nbsp; It is just giving the call to print the whole thing to chat, but that also gives the repeating section name, leaving you to just get the specific attribute for the field you wanted to modify.&nbsp; <a href="" rel="nofollow"></a> If that isn't the sheet you are using, there might be a similar list for yours if it has a wiki article.
Andreas J.
Forum Champion
Sheet Author
If/when you figure something out, it can be a good idea to leave an example for future PF/ChatSetAttr users: <a href="" rel="nofollow"></a>

Edited 1625267077
Sheet Author
If this is the PF Community sheet... be sure to use the rowID associated with the repeating ability you want to target.&nbsp; You can adjust the current uses of an ability with chatsetattr using something like;&nbsp; !setattr --sel --repeating_ability_-mm2dso76ircbi5dtea3_used|[[?{How many are left?|0}]] @Andreas: added a couple examples to the wiki
API Scripter
If you grab the InsertArg script, you can use the !xray functiinality to walk the sheet and get all of the info you need. Just run !xray Choose the character Choose the repeating section Set a starting index (0 for the first), then page forward or back to find the names of the various sub-attributes, and the group ID (the repID) of the item in the list. Alternately, there is a way with the Fetch script to get the value of a sub-attributes, the group ID (the repID or, as Fetch refers to it, the rowID) the row number (ie, $0), or the name of the attribute in either rowID or row number form. There are examples in the Fetch thread, or I can post some later when I'm back in front of my computer.
Ok, I figured it out.&nbsp; Using @{ selected|repeating_abilities_$13_perday_qty} For the total amount and&nbsp; @{selected|repeating_abilities_$13_perday} for the amount used.&nbsp; Not very intuitive lol.&nbsp; BTW, this is for the roll20 sheet.&nbsp; This is the code I use to display it /w Eric 0&amp;{template:default} {{name=Martial Flexibility}} {{ Used=[[@{selected|repeating_abilities_$13_perday}]]/[[@{selected|repeating_abilities_$13_perday_qty}]]}} {{Dedicated Adversary= [On](~DedAdvOn) [Off](~DedAdvOff)}} {{Power Attack= [On](~PowAttOn) [Off](~PowAttOff)}} {{Combat Expertise= [On](~ComExpOn) [Off](~ComExpOff)}} /w @{selected|player} %{Bisht|repeating_abilities_-MVjtInbXhbrGbVZOxAL_trait} This creates a menu for potential feats, shows how many you have used out of how many you get, and also displays the entry for Martial Flexibility itself.&nbsp; When you click on one of those, lets say Dedicated Adversary, it goes to this macro !modattr&nbsp; {{ --silent --sel --repeating_buff_-MVn1NxCZWEN5r8QDAaV_toggle|1 !modattr --sel --repeating_abilities_$13_perday|+1}}!!! !token-mod --set statusmarkers|+marked /w @{selected|player} 0&amp;{template:default}{{name=Dedicated Adversary On}} /w @{selected|player} %{Bisht|repeating_abilities_-MVmRHEE2MVIeH5Nwg6d_trait} This will add one to the used section of martial flexibility, turn on the buff for dedicated adversary, apply a marker on the token (to remind me that it is on) and also display the the entry for dedicated adversary.&nbsp; I have one to turn off the buff and remove the marker when you click the off button.