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

[HELP] Add "Initiative" to turn tracker only if token selected

So the documentation for the Turn Tracker states that any roll with an option of &{Tracker} adds the corresponding result into the Turn Tracker. The Roll20 OGL 5e Sheet has this behaviour, and I tried to replicate it in my own sheet. For this sheet, the "initiative" is rolled using a xd6!p.

I'm noticing however that when a token is not selected, the roll displays (in addition to the proper roll-template) an ugly orange error text that states a token is not selected. The OGL sheet however, does not have this behaviour. Any clues how to resolve this?

Thanks!
April 08 (7 years ago)

Edited April 08 (7 years ago)
As I understand it, the Turn Tracker tracks tokens, so a token must be selected to add it to the tracker.
EDIT: Or some API script is running that informs the tracker of token info. At any rate, Turn Tracker entries are tied to tokens so something must be telling it which token to use.
Yeah, that was my point. With the default Roll20 OGL sheet, players have the capability of hitting the initiative button without a token. Nothing will be added to the Turn Tracker, but it will still appear in the char as a roll, without the ugly error message.

This ability to both:
1. Select token, roll, and show in Turn Tracker and chat OR
2. Not select token, roll, show in chat  without warning message

is what I'm looking for.
April 08 (7 years ago)

Edited April 08 (7 years ago)
Ah. Then just make another macro, same as the first, but leave out the &{tracker} command. That command is what is looking for a token and generates the error when no token is selected.
This is supposed to be firing off of a button on my custom sheet, so I don't know of writing a second macro is the way to go. You can try it out yourself, using the 5e sheet. If you hit the initiative button on the sheet itself, it should display the initiative in chat without any error message, bit be able to add it to the tracker with that same button if a token is selected.