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

How to find Character ID

how to find Character ID, I need this info for a few macro's I am making. but......Every time this is asked on here the answer are work arounds with ever telling how to look that up. There must be a way to look up a Character ID
1583610152

Edited 1583610234
Dumbhuman
Pro
Marketplace Creator
Select a token that represents the character whose ID you'd like to know and enter this into chat: @{selected|character_id} Hope that helps. edit: Note that you need the leading hyphen too.  It should look something like this: -M1WRN8DbLbnNd1PqkvW
I was looking for something similar tonight.  I don't know if it's still true, but in the other post I was reading, the Aaron said that each token has it's own ID.  I understand that to mean that if you attach a macro to the ID you get, it wouldn't work on another page where that token doesn't exist.  So check on that as you experiment with this.
1583736531
GiGs
Pro
Sheet Author
API Scripter
If you describe how you are using the character id, we might be able to suggest other ways to get it that match your needs.
1583738436
Dumbhuman
Pro
Marketplace Creator
Patrick said: I was looking for something similar tonight.  I don't know if it's still true, but in the other post I was reading, the Aaron said that each token has it's own ID.  I understand that to mean that if you attach a macro to the ID you get, it wouldn't work on another page where that token doesn't exist.  So check on that as you experiment with this. Every token does have a unique token_id and every character has a unique character_id.  Selecting a token that's set to represent a character and entering this into chat: @{selected|character_id} @{selected|token_id} Will show you first the character_id and then the token_id which will look something like this: -M1WRN8DbLbnNd1PqkvW -M1WRfP5YaQ_sFq8ZwaR If you have a token representing a character named Bob on three different pages, you'll get the same character_id result every time, but you'll get three different token_id results.  Clearly, if you want the macro to consistently work for a character across multiple maps, you want to reference character_id rather than token_id.
1583752827

Edited 1583752924
Andreas J.
Forum Champion
Sheet Author
Translator
Alright, I figured that streamlining this problem into a clear macro would be a good idea, and the following is already pretty decent. If we can figure out how to make a macro that works with both standalone tokens & tokens connected to a character sheet, I can submit this to the Stupid Tricks -thread Character & Token ID lookup macro When you want to figure out a character's or token's ID, here is a streamlined macro that will show you the character's name, character's ID, and the token's ID in a way that that is clear to read. You need to select a token for this to work. Note: This macro only works if a token is connected to a character sheet, otherwise it will throw an error and show nothing. Use instead the Token ID macro below for only checking ID of tokens that are not connected to character sheets- Normal roll: &{template:default} {{name=**Character & Token ID**}} {{Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token ID**= @{selected|token_id} }} Only GM: /w gm &{template:default} {{name=**Character & Token ID**}} {{Name=@{selected|character_name} }} {{**Character ID**= @{selected|character_id} }} {{**Token ID**= @{selected|token_id} }} Token ID lookup Macro that outputs only the token's ID in the chat: /w gm &{template:default} {{name=**Token ID**}} {{**Token ID**= @{selected|token_id} }}
thanks everyone, got the API working, and working on my next idea.