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

Linking Turn Tracker Entry to Token (just like Add Turn)

I'm certain if I spent a couple of hours sorting through searching about Initiative and the Turn Tracker, I would find the needle in the haystack. However, I'll "skip to the end" and see who's got the bookmark.  The Add Turn context action from a selected token is straight forward. It puts the token on the Turn Tracker, nothing more. It doesn't roll system initiative (as near as I can tell). Solid. Simple. But it does  one little bit of magic , it links the Turn Tracker entry back to the token. I cannot seem to find that little bit of magic in writing my macro, i.e., `&{tracker}` doesn't do it. Pointers? And "can't be done" is a legit answer. Thanks!
1591324325

Edited 1591324468
I am not clear what you want to do. You don't have to roll initiative to add to the tracker, but you have to have some dice roll in front of it. You can do /r 1d0 &amp;{tracker} and it will add a turn for the selected token with a value of zero. There is also The Aaron's Add Custom Turn (ACT) API script: <a href="https://app.roll20.net/forum/post/3346285/script-turn-tracker-automatically-add-custom-item-w-slash-round-calculations/?pageforid=3353667" rel="nofollow">https://app.roll20.net/forum/post/3346285/script-turn-tracker-automatically-add-custom-item-w-slash-round-calculations/?pageforid=3353667</a> Edit: You can even do [[2 &amp;{tracker}]] so it does not have to be a roll, but it has to look like a roll.
In the below capture, I use Add Turn from the context menu on the token. It is added to the Turn Tracker. Hovering over the token/character literally, not figuratively, highlights the token on the map. See below mark up. Try it yourself. This is the "little bit of magic" I was talking about.
1591366960
GiGs
Pro
Sheet Author
API Scripter
You've highlighted that little bit of magic, but havent explained what you actually want to do. If you want to add a token to the turn counter, with the link that makes that happen, you need to add manually as you illustrated, or follow Rabulias suggestion: create a roll with &amp;{tracker} in it for that character.
Timothy, I'm going to echo the comment from GiGs, but add some additional fodder. Here is a macro that will add the number you enter as the selected token's Initiative. It gets added to the Turn Tracker and will halite when you hover over the entry in the Turn Tracker. @{selected|token_name} rolled a [[?{Initiative rolled}&amp;{tracker}]] for initiative. And this one will automatically roll for the selected token and also add to tracker etc /em @{selected|token_name} rolls a [[1d20+@{selected|initiative_bonus}&amp;{tracker}]] for initiative! Do either of those do what you're attempting? What is your actual goal? M
1591555681

Edited 1591555786
Timothy S.
Sheet Author
I tried both of those Mark and indeed, they work. I had to turn to the API script that was being used to understand the problem a little more and will address there. Seems that it is not utilizing some newer capabilities, particularly `selected`, and probably needs some updating across the board. It hasn't been looked at for at least two years. It's not specifically `&amp;{tracker}` as far as I can tell, but `selected` that creates the "hover" on the token from the tracker.
Timothy, See if this helps. This is part of a script I wrote to summon a token to the board and add it to the turn order. It functions with the highlight feature which you mention above, but does not need to be selected, as its controlling player's token is what is selected at the time. If you want to, say do individual adds of a multiple selection, you'll probably need to cycle the selected array passed to the API by the message. If you don't want the countdown formula feature of the tracker, simple omit the optional formula property that I used for it. I did find some documentation for it on Roll20: Roll:20 API:Objects:Campaign if (Campaign().get("turnorder") == "") { turnorder = []; } else { turnorder = JSON.parse(Campaign().get("turnorder")); } turnorder.push({ id: newTok.id, pr: rounds, formula: "-1" }); Campaign().set("turnorder", JSON.stringify(turnorder)); } Cheers, Kevin