
Hi so I've stumbled upon a funny little bug that i'm able to reproduce consistently. The Problem: Say the turn tracker is empty, and you add 3 tokens to it (doesn't matter how many). When you then click the next turn button, it fires the change:campaign:turnorder event twice or more(?) <- which is a problem. Clicking it again makes it fire just once as it should be. Removing a token and clicking next turn makes it fire once as it should be. but if you add a token again, and click next turn, if fires TWICE or more. To reproduce: Make a new empty campaign. create a couple characters, names and amount of characters are relevant. For this demonstration i make 3 characters. add a ability to roll initiative ( /roll 5d6 &{tracker} ) and make sure you tick the "show as token action" for every character. create the same amount of tokens on the field, and assign them to each character. We need to check exactly how many times the turn tracker changes, so we add this in a api script for the campaign. var amountOfTurnOrderChanges = 0; on("change:campaign:turnorder", function(obj, prev) { amountOfTurnOrderChanges++; log(amountOfTurnOrderChanges); sendChat("", "Amount of turn changes " + amountOfTurnOrderChanges); }); Now we are ready to check. Click a token and then click the initiative roll. it pops up in the turn tracker and the chat should say: Amount of turn changes 1 Do this with the remainder 2, and watch as the change amount increments to 3, with the roll in between. Amount of turn changes 2 Amount of turn changes 3 So far so good, heres when it goes wonky. Now click the next turn button in the tracker and watch as the chat plop out the following two lines: Amount of turn changes 4 Amount of turn changes 5 Why does it do this? I have had times it even runs more than twice. Clicking the next turn button makes it plop out just one line: Amount of turn changes 6 Removing a token from the tracker increments the change ONCE . Clicking the next turn button now increments it once ! Adding a token again, increments the change ONCE . clicking next turn button now again, increments it Twice or more. Should it not run only once, regardless if you have just added characters or not?