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

Macro to select a token

Is there a command that would allow you to select a token? Reason being is that I would like each of my players to have a macro that would roll initiative and update the tracker. The command here does that ... /em rolls a [[1d20+@{selected|initiative}&{tracker}]] for initiative! However you need to select your token first so that it knows which initiative to pull and which character in the Roll Tracker to update. If I could have each one of them include a command equivalent to "/select {character_name}" prior to the statement above it would eliminate the step requiring you to select your token before rolling initiative each time. Forgive me if I am just missing something, I just started using this program the other day but after a lot of poking around, I have not found a solution that doesn't require the user to first select their token.
Not really; the whole point of the new Tracker ability is that it's linked intimately to the token involved. Roll20 is designed such that the token links to the journal entry; oddly, this isn't the case in the inverse... the journal entry is only vaguely aware there are such things as tokens! It's possible to make a universal macro, such that it works on any token selected (like you have there), but unfortunately you still have to select a token. I personally just set up a Token Action for each journal entry; two clicks and you're done... click token, click Initiative. Boom, headshot! It's possible someone's developed an easier way to do this, but if so they haven't told me about it! PS: Both the Tracker command and Token Actions are new (last couple months) additions to Roll20's capabilities; previously, you had to enter each token into the turn tracker manually, AND enter your roll result for initiative manually, AND it was kinda buggy (you had to hit enter after each entry, more than one person could enter at the same time, etc!) Be thankful for what you have, it's the best way we've figured out so far!
1388962174

Edited 1388962367
Gauss
Forum Champion
Phnord is correct, you need to select a token to use the &{tracker} function. The turn tracker is based on the token and not the character sheet because if it were based on the character sheet you would not be able to have multiple tokens for one character sheet.
1389108840

Edited 1389109045
I think the intent of my question/message was dodged, or maybe you rolled a 1 on Sense Motive. Regardless of how we got to this point, I understand the need to select the token to perform these actions in order to make the system work. The first question of my initial post is what was paramount here. Is there a command that would allow you to select a token? It is a simple request (in layman thinking) that does not affect any of the other phenomenal programming that has been performed to date. A command that could be added to any macro. "/select JoeBlowFighter" which would automatically select the token referenced, thus enabling you to then perform other "selected token" specific functionality. Based on Gauss' comment... the command would select the token and my reference to the character sheet might have been the tid bit that caused the confusion. So am I allowed to get a second attempt on my Diplomacy skill check or am I doomed to manually mouse click my character tokens from here on out? I am looking for a little divine intervention here.
No, there is not.
1389131884
Gauss
Forum Champion
Scott A. , Phnord answered the question with "Not really......" in his first sentence. As for it being a simple request, it would not be. Token names are not unique identifiers. Tokens can have the same name.
1389255787
GiGs
Pro
Sheet Author
API Scripter
Would the Target option be useful for this? Have a macro that prompts you to select a token (make sure you select your own) Then when you run any other macros, you know that token is already selected.
Gauss said: Scott A. , Phnord answered the question with "Not really......" in his first sentence. As for it being a simple request, it would not be. Token names are not unique identifiers. Tokens can have the same name Thanks Gauss, even though I meant no disrespect to Phnord for his response, I was looking for a black/white answer to the question in the form of Yes/No, instead of a quasi answer filled with ambiquity. HoneyBadger provided me with that and you pseudo supported him with confirmation that the development of a solution would not be trivial. Forgive me for continuing to provide potential solutions but maybe... you could provide us with the token's unique identifier in the token settings menu so that we could reference the token by that instead of the "Name" thereby circumventing the need to select it. G G said: Would the Target option be useful for this? Have a macro that prompts you to select a token (make sure you select your own) Then when you run any other macros, you know that token is already selected. That does eliminate the potential for error messages but still requires user intervention to make it work. I was hoping for something a little more along the lines of a fire and forget approach.
1390255943
Gauss
Forum Champion
Scott, I am not a Dev so it is not me who would be making changes to Roll20. However, an example of a token's unique ident is: -J5KFLP7vrw3k1UaX0Jp That would be more difficult to use than selecting the token.
First of all welcome Scott A. to Roll20! I suggest that you make a suggestion in the Suggestions & Ideas forum about this. But before doing that make sure you first think through what you actually want to suggest. For example you could suggest that every token on a page would have a unique id that could be seen and an additional command would be added which would enable you to target a token id. This might or might not be that useful since you would have to rewrite any macros about selecting a specific token any time you would change a page since EVERY token would have a unique id even if it would be from your perspective the same token just on a different page. So basically what I'm trying to say is if you come up with a great way of getting the functionality you need then make a suggestion about it.
1390294009
Alex L.
Pro
Sheet Author
Gauss said: Scott, I am not a Dev so it is not me who would be making changes to Roll20. However, an example of a token's unique ident is: -J5KFLP7vrw3k1UaX0Jp That would be more difficult to use than selecting the token. Also it should be pointed out that every time you copy a token, the copy gets a new id (i think this also happens if you do a cut as well).