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] Initiative Standby

1561851887

Edited 1562112620
GM Michael
API Scripter
In a recent encounter in which my players were controlling lots of minions, I found several tokens entering and leaving "active" initiative order for extended periods, spending several straight turns sitting there in "standby" doing nothing.  Unfortunately, I wasn't aware of a good way to temporarily remove a token from initiative order, so I had to just click past them, zipping the Group Initiative icon around 40 tokens, when I really only needed 10 at a time.  I could have just deleted them en-masse from the initiative order, but that would have taken time, and then I'd have to re-add them later and deal with grumpy players who had sub-par initiative rolls the second time around.  I needed a bulk operation that could clean up the initiative tracker, so I created a simple script that can yank and restore tokens from the turn order, sticking them back where they once were, even if several turns have passed since then. While a token is yanked, the interdiction  icon (see my post below to easily change this icon) will appear on the token and display its previous initiative value.  When it is restored, that value is consumed to reinsert it back where it was in initiative.  As Roll20 does not support non-digits in the status fields, it multiplies by 100 to shift the decimal place so no data is lost if you have tiebreakers configured.  Below, you can see an example of a unit that had an initiative of 22(.00). Note : multi-digit statusing is only possible through the API, so don't manually edit it because that is the only place it stores what the old initiative roll was. Commands There's really only one command, which I recommend putting into a macro as follows.  It affects all selected tokens that are yankable/restorable. !standby ?{Yank or Restore|yank|restore} Version History - 1.0: Initial Release Github  or available for one-click installation
This seems really useful, but the Github link is broken! Also wondering if there could be a feature to change which icon is used? Or is this easily adjusted within the .js?
1561874010

Edited 1561874469
GM Michael
API Scripter
lol whoops!  fixed the link. And it's easily adjusted within the js.  The functions are generic and were originally built for Mass Combat , which does this sort of thing a lot.  I'd actually originally planned to just build it into that script, but decided it could have wider use so I released it as a standalone. Anyways, which status is used by Initiative Standby is set on line 12: const StandbyIcon = ' interdiction ' ; You could easily set that to be any other of the token statuses.  The full list (copied from wiki ) is... "red", "blue", "green", "brown", "purple", "pink", "yellow", "dead", "skull", "sleepy", "half-heart", "half-haze", "interdiction", "snail", "lightning-helix", "spanner", "chained-heart", "chemical-bolt", "death-zone", "drink-me", "edge-crack", "ninja-mask", "stopwatch", "fishing-net", "overdrive", "strong", "fist", "padlock", "three-leaves", "fluffy-wing", "pummeled", "tread", "arrowed", "aura", "back-pain", "black-flag", "bleeding-eye", "bolt-shield", "broken-heart", "cobweb", "broken-shield", "flying-flag", "radioactive", "trophy", "broken-skull", "frozen-orb", "rolling-bomb", "white-tower", "grab", "screaming", "grenade", "sentry-gun", "all-for-one", "angel-outfit", "archery-target"
Perfect! It seems to be working no issues on my end. I was worried it would conflict with the CombatTracker script, but since they both operate no problem it's an appreciated feature :) fantastic work!
Very practical! Great work.
1561982179
The Aaron
Roll20 Production Team
API Scripter
Nice idea!
This is now available on the one-click repo.