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

Aaron's Ammo Tracker Question

I am using Aaron's Ammo Tracker and want to use it to track stat adjustments. My question is how can I write a macro to clear all the stat adjustments for all players with one button ?  I can do it with separate pushes, but want to make it more efficient and do it all with one. Anyone have any ideas?
1455636526
The Aaron
Pro
API Scripter
So, can you give as an example your macro for a single player?  That will help with understanding what you need to do, I think. =D
I haven't written the macro yet, but am thinking something like this for the single... !ammo @{selected|token_id} PumpStr -1 to lower the increased (pumped) strength by one for selected token
1455637413

Edited 1455637566
!ammo @{selected|token_id} PumpStr -@{PumpStr} This would substract the PumpStr from PumpStr and therefore set it to zero (1-1=0, -1-(-1)=0) Currently there is no existing script which lets you call those for a group of tokens (I know because I asked for one as well :D). Actually I guess the easiest way to do that is to write a new script for what you need, as !ammo has some other stuff which would require special case handling (negative numbers, going below 0, etc).
Can I just reset a list of variables to 0 for all tokens?  Or even for a select token?
1455637616

Edited 1455637654
For ONE token you can do that with !ammo as written above. Just chain all the attributes you want to reset in a macro. The problem is handling MULTIPLE tokens which would require a new script.
Would help if I fully read what you posted.. So I can subject the variable from itself to set it to 0. But would have to do each one separately correct?
Wandler - that macro will help a lot. I will need to run the macro once for each token/player but thats better than multiple times for each stat that gets pumped up. Thank you
1455638393
The Aaron
Pro
API Scripter
If you have a set list of characters, you can definitely list them all as individual lines in the macro: !ammo @{Bob The Slayer|character_id} PumpStr -@{PumpStr} !ammo @{Sir Shomo|character_id} PumpStr -@{PumpStr} !ammo @{T'Zarn|character_id} PumpStr -@{PumpStr} This reminds me why I need to finish up the near-mythical CharMod...
Excellent. That will solve it for me. thanks a lot Aaron.
The Aaron said: If you have a set list of characters, you can definitely list them all as individual lines in the macro: !ammo @{Bob The Slayer|character_id} PumpStr -@{PumpStr} !ammo @{Sir Shomo|character_id} PumpStr -@{PumpStr} !ammo @{T'Zarn|character_id} PumpStr -@{PumpStr} This reminds me why I need to finish up the near-mythical CharMod... Where do you get the character_id ? I can't seem to get the macro to work. Keeps giving me "No attribute was found for @{Zeek|Zeek}", yet I set the attribute on his character sheet.
1455649283
The Aaron
Pro
API Scripter
You need to use the name attribute name character_id: @{Zeek|character_id}
The Aaron said: You need to use the name attribute name character_id: @{Zeek|character_id} Ok that resolved part of it, now its saying 'TypeError: c is undefined'
1455650163
The Aaron
Pro
API Scripter
Can you post your full macro?
1455650212
The Aaron
Pro
API Scripter
Also, if you just type @{Zeek|character_id} in the chat, do you get an error or output?  Verify that the character's name is Zeek, and not the token's name.
The Aaron said: Also, if you just type @{Zeek|character_id} in the chat, do you get an error or output?  Verify that the character's name is Zeek, and not the token's name. Macro !ammo @{Zeek|character_id} PumpStr -@{PumpStr} Results -JkKoYve7v7ZKcX_A_kf Character name and token name is the same - Zeek
1455653279
The Aaron
Pro
API Scripter
Try this? !ammo @{Zeek|character_id} PumpStr -@{Zeek|PumpStr}
The Aaron said: Try this? !ammo @{Zeek|character_id} PumpStr -@{Zeek|PumpStr} That worked. Thanks a lot. I really appreciate it.
1455653702
The Aaron
Pro
API Scripter
No problem! If you ever run the command from within a character's ability, you can omit the character name: !ammo @{character_id} PumpStr -@{PumpStr} But running it from outside the character you have to be explicit about all the references: !ammo @{Zeek|character_id} PumpStr -@{Zeek|PumpStr} Happy Rolling!