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

[Script] Aura/Tint HealthColor

1463775838
The Aaron
Pro
API Scripter
I believe the DeathFX button in the settings will let you do that.
1463780787
Zym
Sheet Author
That's the problem. Even with !aura and adjusting my settings via the scripts ui. I am still at a loss as to why it decides to pack up and leave home half way through an adventure. I have to go into settings and reboot the script by clicking the button 'save script'. It does this for the start of every session I run aswell. 
1463800257
Alicia
Sheet Author
Alexander said: That's the problem. Even with !aura and adjusting my settings via the scripts ui. I am still at a loss as to why it decides to pack up and leave home half way through an adventure. I have to go into settings and reboot the script by clicking the button 'save script'. It does this for the start of every session I run aswell.  Even with just running those three you're  having issues? Have you tried disabling aura/tint to isolate whether it is the problem? 
1467228396

Edited 1467228998
Zym
Sheet Author
I am still getting the same error. Just thought I would repost to see if anyone recognises the error. This is a constant error message and I can confirm this is what it reads every error I have while running the two API scripts I run two API scripts, but it crashes with this error quite often, I have tried to get The Aaron to help but this still persists. I run Aura and an older version of 5e shaped scripts SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "S" found. undefine EDIT: I can also confirm this error happens when I drag a token from the journal to the game table but not when I move a token around the table. It does not seem to happen with all the tokens, just newly created ones. EDIT 2: Okay with a little bit of playing around, I think this error comes up when a token is dragged onto the game table but when I have not properly configured the token. I will keep an eye on what is going wrong and see if I can nail it down to a more precise error.
1467229865
Zym
Sheet Author
I have another question. When I drag a token, using Aura API activated it obviously fills in a Bar for HP.  How would I add script so that the other bars would fill for other stats. I'd like Bar 2 to show AC    and Bar 3 to show speed.
1467312246
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Alexander said: I am still getting the same error. Just thought I would repost to see if anyone recognises the error. This is a constant error message and I can confirm this is what it reads every error I have while running the two API scripts I run two API scripts, but it crashes with this error quite often, I have tried to get The Aaron to help but this still persists. I run Aura and an older version of 5e shaped scripts Cut for length Looks to me like one of your scripts has an improper character some where. Also looks like you've cut some of the error off. Is there anything that shows up after the 'undefine' part of the error? I would expect there to be some references to script line numbers in that error.
1467312329
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Alexander said: I have another question. When I drag a token, using Aura API activated it obviously fills in a Bar for HP.  How would I add script so that the other bars would fill for other stats. I'd like Bar 2 to show AC    and Bar 3 to show speed. I usually just set my default tokens up so that they are the AC and whatever else I want before I set them as the character's default token.
1467407553

Edited 1467407751
Zym
Sheet Author
The error code was (nothing more, nothing less) SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "V" found. undefined I think the error happens if the character sheet is not filled out properly. Usually because I create a monster using shaped script, then drag the token onto the game battle before importing the sheet.  If I make sure the sheet is imported and the token is assigned I am finding the error message does not appear. Makes sense.
Is it possible to set this to read from the sheet, instead of max bar value, so that I don't have to look @ those UGLY bars. :(  (I hate the roll 20 bars)
1471000551
Alicia
Sheet Author
Not understanding your question as you can link the token to the sheet and assign the bars to the desired attributes. Then Aura would be essentially working off the sheet. As for keeping the bars from displaying, not sure that's possible. 
1471016481
The Aaron
Pro
API Scripter
Probably what you are asking for is having AuraTint show up based on an attribute of the character the token represents, rather than one of it's bars.  That would mean the bar would be unbound and wouldn't show up.  Such a thing would be possible with the API and some fairly minor adjustments to the script.
Yeah, i'm looking @ the script. i think I will attempt to modify it to work with the OGL sheet, so bars can be turned off.
1471147405

Edited 1471147461
//var maxValue = parseInt(obj.get(bar + "_max"), 10); var maxValue = parseInt(getAttrByName(obj.get("represents"),"HP","max")); ^ It is that easy. However now have to remove the link from the token an the stat. Because bar max fills out MAX HP. So, to remove the bar, you have to 0 out the max, and of course that removes the max that you just hacked in. Soooooooo, the only work around is to have two attributes. If you want the sheet to update.
1475713866
Tim
Pro
Sheet Author
Compendium Curator
Is there a way to make the DeathFX part of this still work with the new jukebox configuration? I have a fanburst track called Death in my jukebox (same as it used to be when it was on Soundcloud) but it doesn't seem to trigger like it used to. 
1475723298
The Aaron
Pro
API Scripter
Hmm.  It's working for me.  Try changing the name of the track and then setting it on !aura with that new name.
1475744090
Tim
Pro
Sheet Author
Compendium Curator
That did the trick, thanks!
1475756014

Edited 1475756062
The Aaron
Pro
API Scripter
Great!  Is it possible you still had the defunct SoundCloud track hanging about? (If not, I'm wondering if there is some bug with the name not getting cleared out right or some such.)
1475784640
Tim
Pro
Sheet Author
Compendium Curator
Yeah, that is possible actually - I've since tidied up my jukebox so I can't doublecheck, but it may have been before my clean-up of dozens of tracks. There might have been a duplicate. 
1475785299
The Aaron
Pro
API Scripter
Ok, that's cool.  Thanks for looking.
1475831876
Ziechael
Forum Champion
Sheet Author
API Scripter
Tim said: Yeah, that is possible actually - I've since tidied up my jukebox so I can't doublecheck, but it may have been before my clean-up of dozens of tracks. There might have been a duplicate.  I did some testing for you since I was in the same boat and when I added the new 'death' sound to my jukebox and named it the same as the previous soundcloud one it never played, regardless of where I put them in the order etc it would always try to find the soundcloud one first and then 'think' it was playing the sound when it wasn't... deleting the soundcloud track of the same name allowed it to play as normal and screams were had by all :) Horse bolted, stable door closed but at least this might help others who may experience this issue.
Hello, Seems you have a bug in your script. When the options are set to false and the API sandox is restarted all options are reset to true. if(!state.auraColorOn) state.auraColorOn = true; //global on or off if(!state.auraBar) state.auraBar = "bar1"; //bar to use if(!state.PCAura) state.PCAura = true; //show players Health? if(!state.NPCAura) state.NPCAura = true; //show NPC Health? if(!state.auraTint) state.auraTint = false; //use tint instead? if(!state.auraPerc) state.auraPerc = 100; //precent to start showing if(!state.auraDead) state.auraDead = true; //show dead X status if(!state.auraDeadFX) state.auraDeadFX = 'None'; //Sound FX Name if(!state.GM_NPCNames) state.GM_NPCNames = true; //show GM NPC names? if(!state.NPCNames) state.NPCNames = true; //show players NPC Names? if(!state.GM_PCNames) state.GM_PCNames = true; //show GM PC names? if(!state.PCNames) state.PCNames = true; //show players PC Names? if(!state.AuraSize) state.AuraSize = 0.7; //set aura size? should be  if(_.isUndefined(state.auraColorOn)) state.auraColorOn = true; //global on or off if(_.isUndefined(state.auraBar)) state.auraBar = "bar1"; //bar to use if(_.isUndefined(state.PCAura)) state.PCAura = true; //show players Health? if(_.isUndefined(state.NPCAura)) state.NPCAura = true; //show NPC Health? if(_.isUndefined(state.auraTint)) state.auraTint = false; //use tint instead? if(_.isUndefined(state.auraPerc)) state.auraPerc = 100; //precent to start showing if(_.isUndefined(state.auraDead)) state.auraDead = true; //show dead X status if(_.isUndefined(state.auraDeadFX)) state.auraDeadFX = 'None'; //Sound FX Name if(_.isUndefined(state.GM_NPCNames)) state.GM_NPCNames = true; //show GM NPC names? if(_.isUndefined(state.NPCNames)) state.NPCNames = true; //show players NPC Names? if(_.isUndefined(state.GM_PCNames)) state.GM_PCNames = true; //show GM PC names? if(_.isUndefined(state.PCNames)) state.PCNames = true; //show players PC Names? if(_.isUndefined(state.AuraSize)) state.AuraSize = 0.7; //set aura size? Also, I think it would be a good idea to namespace all options to avoid conflicts with others scripts.
DarKDinDoN said: Hello, Seems you have a bug in your script. When the options are set to false and the API sandox is restarted all options are reset to true. Also, I think it would be a good idea to namespace all options to avoid conflicts with others scripts. I too get this error. Every time I come back into my game the settings have reset and need to be manually readjusted. Love the script otherwise! Cant live without it!
1480798470
Kirsty
Pro
Sheet Author
I found a small error on line 59. It should read: pcSet(obj, state.AuraSize, markerColor); Not: npcSet(obj, state.AuraSize, markerColor); This is my favourite script. My players absolutely love it and it speeds up gameplay for classes that have benefits depending on if a creature has taken any damage.