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

[Help/Request] Ammo - Possible tweak the output messages

I just started checking this out and was hoping for a slight tweak so that the chat messages posted say what type of ammo is being used/recovered instead of just a generic "ammo" Currently the chat message outputs as: Ed's Horse uses 1 ammo and has 0 remaining. This of course doesn't say what type of ammo Ed's Horse is using. In this case it was "Horse Apples" (lol, okay so I was getting cheeky while testing the script, sue me!) What I was hoping for is that  the output would look like: Ed's Horse uses 1 Horse Apple and has 0 remaining. I'm guessing the command syntax would need to look something like this and have the script replace the stock "ammo" in the chat string with the value of <attrAmmoName>: !ammo <id> <attrAmmo-Name> <attrAmmo-Qty> -1 Perhaps for error handling purposes if the attribute call returns a null value have it just say ammo as it does now.
1485321338
The Aaron
Pro
API Scripter
I just pushed Ammo v0.3.4. &nbsp;I added support for repeating attributes (Thanks to that code in Aura-Range!) and also specifying a custom resource name. Syntax for a resource name: !ammo &lt;character id&gt; &lt;attribute name&gt; &lt;adjustment&gt; [the rest of the line is the resource name, or "ammo" default] Example: !ammo @{character_id} ammo_attribute -1 Horse Apple or for a name in an attribute: !ammo @{character_id} ammo_attribute -1 @{ammo_name_attribute} Github: <a href="https://github.com/shdwjk/Roll20API/blob/master/Am" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Am</a>... I'll make a full post in a minute...
1485322289

Edited 1485322306
Elena S.
Sheet Author
How long does it usually take for updates to work their way into the one-click?
1485322557
The Aaron
Pro
API Scripter
1-2 weeks. &nbsp;Usually they do the merge on Tuesdays.
1485326005

Edited 1485326172
Elena S.
Sheet Author
Cool, I've got it manually installed for the time being. But nice to know Thanks for sharing all your AwesomeSauce with the rest of us! I now have just about all of the functionality that I wanted for events during game play. Still got some backside stuff to work on, but that's always an ongoing project.... It would help if my players didn't decide to go in unexpected directions quite so often. Alas they have minds of their own...
1485329301
The Aaron
Pro
API Scripter
No worries. =D &nbsp;Peeps have been wanting named resources for a long time.. and repeating field semantics. &nbsp;Win-win!
1485441142
Ziechael
Forum Champion
Sheet Author
API Scripter
The Aaron said: No worries. =D &nbsp;Peeps have been wanting named resources for a long time.. and repeating field semantics. &nbsp;Win-win! Woohoo... dreams do come true!