
Hi everybody, Since there was a request and I ended up writing a script for it, I thought about putting it here since it has become pretty usable. As of now, it rolls for the initiative for all selected tokens (using a die of choice and adding an attribute of choice), sorts the resulting list and put it into the Turn Tracker. The command is !initiative, and the variables used for the die and the attribute are at the beginning of the script, and they are initiativeDie and initiativeAttribute, respectively. The whole thing is persistent through sessions (and sandbox restarts) because it uses the state object. It also allows to add further tokens at a later time with the !addtokens command, and resetting the counter (or resetting AND re-rolling for the tokens already in the Turn Tracker) with the !restart [reroll] command. Since it was one of the requested features, it can also keep the counter on a specific token called "Round 1", if any (can be switched off putting to false the useTokenCounter variable). To remove a token, just use the bin icon in the Turn Tracker. The caveat is that if you manually move the tokens in the Turn Order (to allow for a delayed action, for example), be sure that you cycle away from the header first. It means that your highlighted line in the Turn Order (the topmost one) mustn't be the "ROUND x" one, or as soon as you move one of the tokens it will increase by 1 . Since I don't play any game using a d20 system I'm not using this script, so I didn't test it extensively nor I plan to break my head over this problem, but if you come up with a nice solution (logically), please let me know. Edit: I modified the script to avoid using the event change:campaign:turnorder to count the rounds. It didn't allow to get back in case you cycled the whole Turn Tracker by mistake. Now in order to advance round there is a command: !nextround. Please have a look at the comments at the beginning of the script, now the behaviour is the opposite of what I wrote above. To keep a custom order, once you moved the tokens in the Turn Tracker you have to issue the !nextround command while the "ROUND x" counter is the topmost item. I also added a switch to allow duplicate tokens in the Turn Tracker while adding new tokens, the variable is allowDuplicateTokens. It is false by default. Always dDownload the script from Gist as there you can find the most up-to-date version. Gist