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

Turnorder change / token removal / formula

May 23 (4 years ago)

Edited May 23 (4 years ago)

Confirmed by "TheAaron" 4 years ago.

Still no fix.

I have a simple turnorder with 2 tokens and a custom entry with formula "+1". 

You can reproduce it easily. If you loop through the tokens the "round counter" increases by one.


Now delete the last token before the round counter (because it's slain for example) with the trash-can icon.

Now it's the round counter's turn again - The round counter DOES NOT increase by one though.

It seems that deleting a token does not call the "change" event on the turnorder.


Same for removing the token via API with a splice. You splice the item and set a new turnorder - it jumps to the round counter but it again does not increase by one. 


This makes big parts of the whole "formula" feature useless because you still have to keep track and manually add rounds because it doesn't work automatically.

The only solution would be to check whether the following index of the array is an item with a formula - and manually add the formula to the entry.



I wouldn't mind if you could API-wise "skip" turns for "dead" tokens. But since you can't do this as well it would be really great to have a simple fix by just calling the "change" event on "deletion" of the turnorder entry.


push

May 28 (4 years ago)
Oosh
Sheet Author
API Scripter

I guess as a workaround you can have an ===End of Round=== marker with no math attached, that way the item immediately before the turn counter never gets deleted, and you don't get the problem.

That is actually a great idea... ! Thanks a lot for the hint!

May 29 (4 years ago)
Oosh
Sheet Author
API Scripter

Thanks for pointing out the bug - I was totally unaware of this and have probably lost a few turns to the ether on the odd occasion that a mook gets itself killed on its own turn.