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 Tracker in Roll20 Companion script.

1589073596

Edited 1589073641
GM
Pro
So according to the documentation "You can spend more than one piece of ammunition per shot by adding a number after the name of the ammunition resource and a comma. (ex. Arrows,2 )" I have been trying to get an item to recognize an ammo and remove the appropriate amount. Details on ammo resource:  other resource name: Concertina of Tingo|-M4lt-ymwHuBM6J7oMuv I've tried the following and it will track the 1 ammo option but not the others. ?{Charges|1 Charge,Concertina of Tingo&#124-M4lt-ymwHuBM6J7oMuv|2 Charges,Concertina of Tingo&#124-M4lt-ymwHuBM6J7oMuv,2|3 Charges,Concertina of Tingo&#124-M4lt-ymwHuBM6J7oMuv,3} I've also tried moving the ,2 to directly behind the name like so. ?{Charges|1 Charge,Concertina of Tingo&#124-M4lt-ymwHuBM6J7oMuv|2 Charges,Concertina of Tingo,2&#124-M4lt-ymwHuBM6J7oMuv|3 Charges,Concertina of Tingo,3&#124-M4lt-ymwHuBM6J7oMuv} Nothing seems to work. Does anyone know how to make this work correctly?
Anyone have an answer?
this may help:&nbsp; <a href="https://wiki.roll20.net/D%26D_5E_by_Roll20:_How_to_setup_Ammunition_and_Resource_tracker" rel="nofollow">https://wiki.roll20.net/D%26D_5E_by_Roll20:_How_to_setup_Ammunition_and_Resource_tracker</a>
you may also need to use the replacement for the , as well as the | in the id string.
1589215488

Edited 1589215839
Dumbhuman
Pro
Marketplace Creator
Kilter said: you may also need to use the replacement for the , as well as the | in the id string. May = definitely.&nbsp; You can't include the straight comma needed for the ammo recognition within a drop down menu because commas are part of the command syntax for the drop down menu.&nbsp; You'll need to use &amp;#44; instead. Edit: Also the comma comes right after the ammo resource name as in your second example.&nbsp; I mistakenly used the first one, but have edited it to be the correct one now.&nbsp; I also noticed you were using &amp;124# instead of &amp;124#; and have added the semicolons. So try: ?{Charges|1 Charge,Concertina of Tingo&amp;#124;-M4lt-ymwHuBM6J7oMuv|2 Charges,Concertina of Tingo &amp;#44;2&amp;#124;-M4lt-ymwHuBM6J7oMuv|3 Charges,Concertina of Tingo &amp;#44;3&amp;#124;-M4lt-ymwHuBM6J7oMuv}
You guys rock, thank you VERY VERY much!!