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 tracking....

1609018607

Edited 1609018743
I install the  5th Edition OGL by Roll20 Companion . How can i mody that macro to automatically modify the character sheet ammo.... and i activate the ammo tracking on in the sheet I want that when I click on the token action (macro) 1 bolt is automatically discounted form the sheet... /em @{selected|token_name} attacks with its hand crossbow! &{template:simple} {{rname=Ranged attack}} {{r1=[[1d20 + @{selected|pb} + @{selected|dexterity_mod}]]}} {{normal=1}} {{charname=Ammunition (range 80/320), loading, two-handed}} the bolts are in the @{other_resource}
1609273595

Edited 1609273701
I download the ammo API form AAron, but it shows in the chat that can't find the Attr [Bolts] First i try with this /em @{selected|token_name} attacks with its hand crossbow! &{template:simple} {{rname=Ranged attack}} {{r1=[[1d20 + @{selected|pb} + @{selected|dexterity_mod}]]}} {{normal=1}} {{charname=Ammunition (range 80/320), loading, two-handed}} &{template:desc} [[{{desc=**Arrows left** [[((@{repeating_resource_$0_resource_right}) - 1)]]/40 }} !ammo @{selected|token_id} Bolts -1 Bolts      (note that Bolts is the name of the repeating source "in the @{repeating_resource_$0_resource_right}" shows in the chat that can't find the Attr [Bolts] Second with the same macro, i add manually a new value in the Attribute sheet, where the macro and token actions. I don't see anywhere the resources "class" other" repeating" in this part.... so create one manually. When i add manually a new attr called Bolts (the Scipt works, but..... not linked to the @{repeating_resource_$0_resource_right} box. I`m so confused :S I am sure it must be some stupid thing I have overlooked
OMG hahaha, i got it myself..... I know it is a very simple thing, but as I am not used to it even with APIs, it has been difficult for me to solve what the problem was Final CODE... /em @{selected|token_name} attacks with its light crossbow! &{template:simple} {{rname=Ranged attack}} {{r1=[[1d20 + @{selected|pb} + @{selected|dexterity_mod}]]}} {{normal=1}} {{charname=Ammunition (range 80/320), loading, two-handed}} !ammo @{selected|character_id} repeating_resource_$0_resource_right -1 Bolts