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

Ammo Slots Not Assigned to Attributes

1697449222
Essen
Pro
Marketplace Creator
Hi there. When I add more ammo slots to a sheet, there aren't corresponding attributes made for it. Is there any way to create those attributes after, so I can use API to tick down ammo that get used?
Hey Essen, What sheet are you using?
1697477877
Essen
Pro
Marketplace Creator
Shoot, I meant to say that. The usual "D&D 5e by Roll20" sheet. I went to double check... Didn't there used to be two ammo slots that were in attributes? The sheet I'm checking now, ammotracking is on, and there are no ammo attributes.  Turning ammotracking off didn't change anything.
So I don't use the ammo tracking automation but I don't remember that being an attribute. Ammo in the inventory gets set with the Use as a resource checked and gets put into that repeating resource section with the kinda weird class_resource, other_resource, repeating_resource_left, repeating_resource_right section. Then those repeating resource values get decremented when the ammo name matches. It's listed on  D&D 5e character sheet page  documentation in the section at the bottom about the companion script with some more step-by-step things to check.
1697489109
Essen
Pro
Marketplace Creator
I have some ~9 month old setattr macros that tick some down, but the others don't have those attributes now, so something changed at some point. The automatic ammo tracking won't work, because I have different ammo types. Oh well. I'm sure I'll work out something.