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] Automatic Status Markers

This script will automatically toggle status markers based on the value/max ratio in any of the three bars. Comments are included in the&nbsp;script for how to set it up. <a href="https://gist.github.com/edalquist/5488958" rel="nofollow">https://gist.github.com/edalquist/5488958</a>
Awesome script. Just had a fiddle around with it on a dev copy of my campaign and it works brilliantly.&nbsp; Huge thanks for the share!
Thanks :)
Eric, does an empty string, aka "", return as NaN?
Yes it does, would you like "" to resolve to 0 instead?
I was just curious for my own script. I had to put a check in to see if the token was set to (isdrawing, true). Otherwise my drawings were ending up bloodied and dead even though they don't have any hit points in any of their attributes or bars.
1367765481
Alex L.
Pro
Sheet Author
drawings don't have the _subtype "token" do they? edit: apparently so.
Interesting, I'll add that in as well. I'm actually going to give these a try in my real game on Tuesday. Next thing I'm going to try is movement trails.
Just curious, have been using this script fine with bar1, but attempting to get it to work with bar2 (I use spell points in my campaign) seems to crash the api with an unexpected token return.... I haven't managed to figure out the reason behind it. I have tried flat relplacing the barid, adding it in as another line in the existing array and several other variations of the same. Ran it was with all my other scripts in disabled mode so it was def this script (and by that I mean my failed attempt at recoding it) that was returning the unexpected error
ok so got it working&nbsp; also managed to fix it so that the red icon replaces the brown one when its below a 1/4 life, instead of having both up at the same time.&nbsp;
Instead of changing the various status dots, would it be possible to modify this script to pull specific cards from a deck and apply them to a players hand? We are using cards for wound status at the moment.
1373214432
Alex L.
Pro
Sheet Author
GManator said: Instead of changing the various status dots, would it be possible to modify this script to pull specific cards from a deck and apply them to a players hand? We are using cards for wound status at the moment. not at this time no.
Hi, I'm new to Roll20 and am setting up to run Trail of Cthulhu. Would it be possible to use this script to auto change status based on a current number rather than the bar ratio? In the ToC example players become seriously hurt at health -6, however I am unsure how to represent this as a ration due to varying starting Health. Thanks
I am interested in the answer to Isembard's question too, but also is there away to toggle a status marker with a player's macro? That way a macro could do everything from a spedicif D&amp;D power. It would roll the attack and turn on an aura of a certain color and size. It's probably too hard, but it would be great if that can also be on a time limit, like for one round or until initiative is rerolled. Thanks!