You're amazing :3 Thanks a bunch! I'll definitely be using this! (Tested it and it works wonderfully)DXWarlock said:
@Pakki
Here you go :)
It wont do anything with aura 1.
Only 1 Aura Custom
You're amazing :3 Thanks a bunch! I'll definitely be using this! (Tested it and it works wonderfully)DXWarlock said:
@Pakki
Here you go :)
It wont do anything with aura 1.
Only 1 Aura Custom
DXWarlock said:
Did you move the tokens to get the auras to update after changing the size? It wont dynamically update on changing in the menu, the VTT doesnt know anything has changed to trigger it.
DXWarlock said:
How that would work for the tokens? It needs token(s) to trigger on, unless I loop through all the tokens on all the pages anytime someone uses the menu.
Mike said:
Thanks! Just got through my game tonight and saw you updated it! Worked like a charm.
A friend was asking why I paid for pro the other day and I showed them this script. I'm pretty sure they went and signed up for pro afterwards ;-)
ForceUpdate = function(){ var i = 0; var start = new Date().getTime(); var barUsed = state.HealthColors.auraBar; var results = filterObjs(function(obj) { if( obj.get("type") == "graphic" && obj.get("subtype") == "token" && obj.get("layer") == "objects" && obj.get(barUsed + "_max") !== "" && obj.get(barUsed + "_value") !== "") return true; else return false; }); _.each(results, function(obj) { var prev = JSON.parse(JSON.stringify(obj)); handleToken(obj, prev); i++ }); var end = new Date().getTime(); GMW("Tokens Updated: " + i + "<br>ms to run: "+ (end - start)) },
DXWarlock said:
Same here just tested it, seems a bit faster.
And that's a good point, no one will see the slight delay unless in the menu changing things, and the 1 second delay is still faster that 'wiggling' all the tokens on all the pages to get them to update.
I don't remember now. I may have just been working in it to figure out why AlterBar wasn't triggering HealthAura changes and such. Will just update to the latest once you post it.DXWarlock said:
What was they? I can just add them if you want.
log('-=> ' + ScriptName + ' v' + version + ' <=- [Updated: ' + Updated + ']');
DXWarlock said:
Same here just tested it, seems a bit faster.
And that's a good point, no one will see the slight delay unless in the menu changing things, and the 1 second delay is still faster that 'wiggling' all the tokens on all the pages to get them to update.
_.chain(findObjs({ type: 'graphic', subtype: 'token', layer: 'objects' })) .filter((o)=>o.get(barUsed + "_max") !== "" && o.get(barUsed + "_value") !== "") .each(function(obj) { var prev = JSON.parse(JSON.stringify(obj)); handleToken(obj, prev); i++; });
DXWarlock said:
If anyone has any unusually long process times reported when updating tokens let me know I will see if I can get it down, or add a toggle for if it should update (should be OK unless you have a HUGE amount of tokens on pages).
1.4.0 :
- Auto update tokens: Tokens now update on all pages when changing menu options. Menu tells you total tokens processed and time it took.
- Code logic changes and cleanup to follow a more logical order on PC vs NPC.
"Error: No attribute or sheet field found for character_id -KOpz4LIicdmg0TDsiUl named BLOODCOLOR"
Tom said:
Ever since updating to V1.4 I'm getting the following message after changing any setting in !aura. The moment i go back to v1.3.3 it works fine."Error: No attribute or sheet field found for character_id -KOpz4LIicdmg0TDsiUl named BLOODCOLOR"
SkyCaptainXIII said:
Tom said:
Ever since updating to V1.4 I'm getting the following message after changing any setting in !aura. The moment i go back to v1.3.3 it works fine."Error: No attribute or sheet field found for character_id -KOpz4LIicdmg0TDsiUl named BLOODCOLOR"
That just means the API is looking for a character sheet representing a token and using getAttrByName on it and can't find that attribute. One of your character sheets is missing the BLOODCOLOR attribute. That's all.
Possible infinite loop detected, shutting down.
if(OPTION !== "MENU") Update = ForceUpdate();to
//if(OPTION !== "MENU") Update = ForceUpdate();And see if that works.