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

Need help with the "Ammo" API

Trying to figure out a way using the "Ammo" API by The Aaron, so that when a player shoots their bow, it then uses "Ammo" automatically, so that it shows their attack, then ammo remaining. How can I do this? Also, how could I go about making a 'special ammo' prompt, then make their attack with said arrow? For example, the prompt would ask "What type of ammo are you using?", then dropdown menu for +1 Arrow, +2 Arrow, Poison Arrow, Explosive Arrow, and apply the correct bonuses, and subtract the arrow from the appropriate attribute.
what problem are you having on the first bit? not sure about the second one 
looks like you can set up each ammo as a separate thing in the character sheet and use a query  ie  @{selected|Transformation} !ammo @{selected|token_id} ?{type of arrow|ice arrow|fire arrow} -1 ammo
Looks like I got the 1st problem sorted out with a little self experimenting...I would love for the ammo to show up in the weapon description, but another line works fine. The macro you made works find for selecting what type of arrow, but is there a way that you can have it set the modifiers when you use them? Like if you select a +1 / +2 arrow, it will apply that to attack/damage rolls?
hmmm yeah you should be able to do simple minuses and pluses  the random three is just a placeholder for the damage stat &{template:default}{{name=bow}}{{attack roll=[[1d20+?{attack bonus|-1|0|+1}]]}}{{damage=[[3+?{attack bonus|-1|0|+1}]]}} !ammo @{selected|token_id} ?{type of arrow|ice arrow|fire arrow} -1 ammo
1683372443

Edited 1683372965
nope cant get it to work sorry edit: for clarity they work independent of eachother
1683373053

Edited 1683373133
Hmmm...I think you've helped enough for me to figure something out, might not look pretty, but it'll get the job done, thanks!
&{template:default}{{name=bow}}{{attack=[[1d20+?{attack bonus|0|1|2}]]}}{{damage=[[1+?{attack bonus|0|1|2}]]}} !ammo @{selected|token_id} ?{bonus|zero|one|two} -1 ammo ok its gonna have to look something like this
1683379726
The Aaron
Roll20 Production Team
API Scripter
Glad you got it figured out. If you need more help, let us know what character sheet you're using, if any.