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

5e OGL API Ammo Tracking Not Tracking

I have a game that I've been running for about 3 years. This used to work. I recently discovered that it was no longer working. I think a change was made at some time that broke the script. If you read the instructions for setting up ammo tracking at:&nbsp;<a href="https://help.roll20.net/hc/en-us/articles/360037773573-D-D-5E-by-Roll20#id-5thEditionOGLbyRoll20-AutomaticAmmunitionTracking" rel="nofollow">https://help.roll20.net/hc/en-us/articles/360037773573-D-D-5E-by-Roll20#id-5thEditionOGLbyRoll20-AutomaticAmmunitionTracking</a> It says:&nbsp; In the AMMUNITION section put the exact name of the ammunition resource (Arrows). If you want to spend more than one piece of ammunition per shot you want to add the number of pieces after the name of the ammunition resource and a comma. (ex.&nbsp; Arrows,2 &nbsp;) but I've checked a number of longbows, shortbows, crossbows and none of them have an "AMMUNITION" section. This is what it looks like now: I will also be sending this as a bug report to Roll20 but I'm hoping someone here has an answer/work-around beside the obvious "do it manually". :D
1683341863

Edited 1683342328
Gauss
Forum Champion
For me this has always been part of the attack, I haven't ever tried the equipment route.&nbsp; You may want to try editing the&nbsp;attack and adding it to the ammunition line.&nbsp; Could you edit the Hand Crossbow attack and provide a screenshot of that?&nbsp; Also, could you screenshot the resources section? You may also want to try the following: Cast a spell, if the spell decrements the spell slots then the Script is functioning. If it is not then the sandbox may need to be restarted or the script may need to be removed and re-installed. As a final note, this was working in my game as of 2 hours ago. So I don't think there is a problem with the script wholesale. Perhaps a local issue such as the sandbox mentioned above. Edit: I looked at the instructions linked above, they only mentioned the ammunition as part of the equipment. I was unable to find a step for adjusting the weapon in the equipment. Could you list the steps you are trying to perform?
The spell tracking and ammo tracking are separate parts of the script. It is possible that one will function while the other will not. Specifically, if the script is looking for an "AMMUNITION" section in the equipment's properties, and it doesn't exist (which it currently doesn't) then that part of the script won't do anything. The step that I am trying to perform was quoted in my first message. There is no "AMMUNITION" section in the equipment's property list any more. It used to be there. But, I think I see the problem: the AMMUNITION section was moved to the "Attack". It's been about two years since I set it up for my player that has a crossbow so I don't remember if it was automatically getting set or not when equipment was dropped from the compendium into the inventory - I seem to recall that it was automatically set. But, changing the "AMMUNITION" field in the "Attack" section appears to work.&nbsp; Problem solved. Sort of. :-) Gauss said: For me this has always been part of the attack, I haven't ever tried the equipment route.&nbsp; You may want to try editing the&nbsp;attack and adding it to the ammunition line.&nbsp; Could you edit the Hand Crossbow attack and provide a screenshot of that?&nbsp; Also, could you screenshot the resources section? You may also want to try the following: Cast a spell, if the spell decrements the spell slots then the Script is functioning. If it is not then the sandbox may need to be restarted or the script may need to be removed and re-installed. As a final note, this was working in my game as of 2 hours ago. So I don't think there is a problem with the script wholesale. Perhaps a local issue such as the sandbox mentioned above. Edit: I looked at the instructions linked above, they only mentioned the ammunition as part of the equipment. I was unable to find a step for adjusting the weapon in the equipment. Could you list the steps you are trying to perform?
1683384903

Edited 1683385025
Gauss
Forum Champion
Saul J. said: The spell tracking and ammo tracking are separate parts of the script. It is possible that one will function while the other will not. Specifically, if the script is looking for an "AMMUNITION" section in the equipment's properties, and it doesn't exist (which it currently doesn't) then that part of the script won't do anything. The step that I am trying to perform was quoted in my first message. There is no "AMMUNITION" section in the equipment's property list any more. It used to be there. But, I think I see the problem: the AMMUNITION section was moved to the "Attack". It's been about two years since I set it up for my player that has a crossbow so I don't remember if it was automatically getting set or not when equipment was dropped from the compendium into the inventory - I seem to recall that it was automatically set. But, changing the "AMMUNITION" field in the "Attack" section appears to work.&nbsp; Problem solved. Sort of. :-) Yes, the Ammunition field in the Attack section is the correct location as stated in the help guide you linked above.&nbsp; "7.&nbsp; On the CORE tab, expand the missile weapon (Long Bow) in the ATTACKS &amp; SPELLCASTING section by clicking on the gear icon that appears when hovering over the attack. 8. In the AMMUNITION section put the exact name of the ammunition resource (Arrows). If you want to spend more than one piece of ammunition per shot you want to add the number of pieces after the name of the ammunition resource and a comma. (ex.&nbsp; Arrows,2 &nbsp;)" As #7 states, it is in the attacks section not the equipment section where AMMUNITION was referenced.&nbsp;
I'm not sure if that was a change or not - but, I know it used to be automatically set when a weapon was dropped onto the sheet. Now, it's not. And, somewhere along the line, it got unset because the character with the crossbow used to have it set correctly and he doesn't know enough to go monkeying around with the settings - I have a hard time getting him to remember where his inventory is...
Sorry for digging this up. I think i have everything set up right....but its not working. The Ammo API is installed. Sandbox restarted. Can someone help please? I opened an older campaign where it was working to look it up...stopped working there as well...
1686876682
Gauss
Forum Champion
Hi OldZean, Please double check that the name is identical (no hidden spaces etc). I would also suggest checking the sandbox to make sure it is still working. Restart it if necessary, or even delete the script and re-install it.&nbsp;
thanks for answering. Unchecked "ammo tracking" in the sheet uninstalled the script reinstalled the script rechecked the "ammo tracking" option checked the spelling (copy paste + looking for empty spaces) still no luck
weeeeeeell. im stupid. let this be know to others: i used the old custom "ammo" script. not the roll20 5e companion script. welp. its working now. thank you for your help