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

macro to enable aura/tint healthcolors only during combat fails to update multiple selected icons

Using the Aura/Tint HealthColors,  ChatSetAttr and CombatTracker APIs, I have created a macro as below: !setattr --sel --USECOLOR|YES !aura update !ct start However, if multiple tokens are selected only a single token is outlined.  If I select the others and manually refresh (!aura update) it works, but again only one at a time. Is there a more efficient way to chain these effects in order to achieve healthcolors during combat only? Thank you in advance, I appreciate the assist! ~t
1599742353

Edited 1599750463
TCM
Pro
UPDATE (or; how to force one?): I've created a new game with the 5e roll20 sheet, Aura/Tint HealthColors and ChatSetAttr. I then created three new characters and an NPC.  All were set to use bar 1 as HP. I then attempted (both in chat and as a macro):      !setattr --sel --USECOLOR|YES      !aura update I see the same results; only one aura updates.  However, the chat tells me that ALL tokens have been updated.  If i manually enter:      !aura update It updates the other tokens to their actual "aura" status. So, the auras have been changed, just not updated.  it seems the question just became, how can I force the aura update?   simply listing it twice in a macro does not seem to work.  color my aura frustrated... any input is greatly appreciated... tnx!
1599781684

Edited 1599781774
It's not the answer you want, but one fix is that you move the token(s) to force an update... maybe others have something more scalable?
1599841433

Edited 1599841713
TCM
Pro
tnx anyway...  for now, I've created a second macro to force the update. i'm a little surprised nobody else has had this issue. its unfortunate, i liked the API, but manually updating is a deal-breaker.  seems like it kinda defeats the purpose... at least for me anyway. peace!
1600700205

Edited 1600700440
DXWarlock
Sheet Author
API Scripter
Hey sorry for the late reply. Hectic home life lately and other stuff going on all at once. I made the Aura script. I could add an option to update all. Well it has one now, but its not end user command accessible as it updates all tokens, and can cause some serious lag on bigger games (as it accesses every token on every page, singularly in order). I never anticipated anyone turning them on and off on demand for all the tokens, Or only wanting it on particular tokens on a given page. It might be this weekend or a bit after before I can look at it, but I will see what I can do and give it a shot!
1600701745
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Heya DXWarlock, If you do decide to revisit this script I'd like to make a suggestion/request. The documentation on the One Click page is virtually nil. A person curious to try it out might not realize that it will automatically and without warning change the aura settings on every token upon first run, for example. Or that it controls many visibility settings unrelated to health. A clearer indication of what the script does and how to control it before it is installed would be a helpful addition.
1600701910
DXWarlock
Sheet Author
API Scripter
I meant to do that Keith, and even started on it a few times. But the syntax it needs for formatting frustrates me :P I'll take a look at it while I'm in there and try to tackle it again :)
1600702510

Edited 1600702941
TCM
Pro
@keithcurtis i was a half-a-click away from that myself.  ;) @dxwarlock thanks for the reply, late or not.  I appreciate your time.  you've obviously came across my other post this morning, trying to solve this using the API calls in Combat Master.  I appreciate your input there, as well.  Obviously I will try to standardize around the newer Combat Master solution moving forward. Essentially, I want to default to auras being off for everyone.  When I start combat, I select all of the combatants and as part of initiating combat (more recently with the linked Combat Master post) enable their auras.  But only their auras.  Then, as part of closing out combat, I disable the auras again. is that weird?  I honestly thought that was the way it was done.  look at me, being old.  ;) EDIT: This would also suit me just fine and might make more sense as a switch for you and others: Would it be possible to have the option to " only show auras that are at less than 100% "?  Then, the entire thing I'm attempting becomes redundant and it seems it would be a lot simpler for others in the future. again... thanks for the feedback. looking forward to your solution!
1600703620

Edited 1600703801
DXWarlock
Sheet Author
API Scripter
It has that, just not well (or at all..) documented on what that part 'does'. You could set the "On" percentage to 99% and it wont kick on until that time. Like this is set so PC's are always shown. NPC's don't show until at 60% health.
1600704139

Edited 1600704669
TCM
Pro
EDIT: @dxwarlock Thanks for that info, thats exactly what Im trying to do and certainly a more elegant way to do it.  unfortunately, it doesnt seem to fix the update issue.  i set the PC and NPC percentages both to 90% but the auras themselves still do not appear to change. tnx anyway!  sooo close!  ;)
1600704195

Edited 1600704235
DXWarlock
Sheet Author
API Scripter
It should, as it will check each time a token gets hit on if it hit the threshold and if it should turn on. You could just leave them on, and it will only show when below whatever percentage you put.
@dxwarlock appreciated.  didn't work, seems as though !aura update still doesnt want to refresh all the page/selected tokens.  is that a "just me" thing?  is there a better way to refresh all the icons on the page's auras at once?  ... this is, i assume, what you mentioned getting to earlier. i'll just wait for your update. tnx again!
1600705258

Edited 1600705791
DXWarlock
Sheet Author
API Scripter
You dont need to do the update or anything. Just set the percentage, and your done. If anything gets hurt it will get an aura on it. Only thing is it would not start when combat starts, it starts when they get hit the first time. Edit like this with NPC set to 99: You can force an update with !aura [anything thats not a real command] Like !aura foo or !aura ferrets . Any command sent that's not 'menu' will do an update of all tokens. (As it assumes a command sent other than menu is changing an option, and updates all tokens to show it).
@dxwarlock thank you again, i have followed your advice to the letter (i just triple-checked). i set the PC/NPC to 90% each and began dropping health on an npc and two pc's that were in combat (turn order). when I dropped their HP, I could see the splatter effect.  what i dont see is the aura.  it never appears. i then attempt !aura update (or !aura foo, what the heck) but they arent updating. ive created a brand-new game specifically for this.  The API list is limited to Combat Master, Aura/Tint and a few other basics like AM or TokenMod.  Ive also checked on multiple systems, just in case I had some sort of weird video issue. does this make any sense?  i dont have any screencap apps installed, but could if you suggested.  I'll be glad to send you a PM invite, give you GM status if you want to take a look at any time... just say the word.   im glad its supposed to do exactly what I need... now Im confused why it isnt.  thats... progress! ;)
1600706423
DXWarlock
Sheet Author
API Scripter
Are you using the One Click install? or the old copy paste one? Shoot me an invite, I can join to get GM access but it would be after work before I can dig into it, but I can get in and ready.
done and done!
ok, final update: @dxwarlock was kind enough to jump in and troubleshoot my instance.  Turned out, Aura/Tint was trying to do its job, but the aura feature was disabled in the 5e character sheet.  Once that was set correctly, everything started working like a charm. totally my bad.  tnx again to everyone!