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

How do I add Repeating Resources to the Attributes & Abilities tab?

I am trying to set up a macro using the ChatSetAttr API, and when I look on the Attributes & Abilities tab the repeating resources aren't on there. How do I add them onto the list to make them trackable? I can add lines I know but how do I link it to the right spot on the sheet? I am using the 5th Edition OGL character sheet.

April 20 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

Repeating attributes never get added to the Attributes listing on that tab. Probably in part because it would be impossible to read their names - an attribute in a repeating section has a full name that looks something like repeating_section_-56hg7rb75bnh9_attribute_name. But mainly because those attributes a special dynamic attributes, that aren't like other attributes.

The Attributes listing on that tab is a holdover to the time before we had the character sheet tab. If you're using a character sheet, you shouldnt be using the Attributes listing - unless you want to add custom attributes that aren't in the character sheet.

What are you trying to do with chatSetAttr?

I'm trying to keep track of charges on a magical item. On the sheet, it is currently in the repeating_resource_right location. I tried 

!modattr --name Herydark --@{repeating_resource_$0_resource_right}|-1

CharSetAttr said: Setting attributes - Setting 10 to -1 for character Herydark. But I have no idea what it changed.

April 20 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

It's a while since I've used chatsetattr but I think you shouldnt be using the @{} syntax there, try this:

!modattr --name Herydark --repeating_resource_$0_resource_right|-1


Well, I feel like a dummy, that did it. Thanks

April 20 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

great :)

I am having an issue like this:

Any ideas?

/emas @{selected|character_name} asks for the creature to respond to her
!setattr --silent --sel --mod --repeating_resource_$0_resource_left|-1
@{selected|wtype}&{template:traits}@{selected|charname_output} {{name=Mind Link Response}} {{source=Class: Druid}} {{description=**Mind Link Response:**
As an action, when you’re speaking telepathically to a creature, you can give that creature the ability to speak telepathically with you for the next hour, or until you end this effect as an action.  }}
&{template:desc} {{desc=Mind Link remaining: [[@{selected|repeating_resource_$0_resource_left}-1]]}}

I tested just the tokenmod part and it worked just fine. I did get that error when there wasn't a $0_resource_left on the character sheet. Make sure that there is a second row of resource boxes and you aren't meaning to reference the class_resource or the other_resource boxes which are the first two boxes that are on the sheet by default.

Is there a way to track multiple instances of "resource_left" like if I want to use multiple ammo types for a weapon? 


Kalvin Koolaid said:

Is there a way to track multiple instances of "resource_left" like if I want to use multiple ammo types for a weapon? 


What I did was just made a second attack and used the other ammo type as the resource