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

Using the token name

February 19 (10 years ago)
Hey guys.

I'm sorry if this is a bad question, but I can't find the answer and I'm getting very frustrated. I play 3.5 and I am pre-making the NPC's, creatures, and all that. What I'm trying to do is use a generic townsfolk character sheet for NPC's that all have different names. In my journals, the character name is "Townsfolk" but I change the token name. The problem starts when I try to make macros because they all appear as "Townsfolk attacks with their dagger" or "Townsfolk senses motive" or anything. The same problem arises with guards because I use a universal guard sheet. I want my macros to use the name that shows on the screen when I check the box "show nameplate" but the only thing that has done that for me so far is the target command which I would prefer not to use.

Again, sorry if I'm just missing something simple.
Thanks!
February 19 (10 years ago)

Edited February 19 (10 years ago)
Diana P
Pro
Sheet Author
You can use @{selected|token_name} instead of @{selected|character_name}

Token name gives you the name on the token; character name gives you the name on the character sheet.

edit: It would be the 3rd example (if I counted right) on this link: https://wiki.roll20.net/Macros#Using_a_Selected_Token_with_a_Macro
February 20 (10 years ago)
I tried it, and to no avail :/


It appears as...
"Lv2 Guard|token_name attacks with a Long Sword, hitting AC Rolling"... and so on
February 20 (10 years ago)
Gen Kitty
Forum Champion
Show us your macro exactly as you have it?
February 20 (10 years ago)
I apologize ^^ here it is

@{selected|token_name} attacks with a @{weapon1name}, hitting AC[[1d20+@{bab}[BAB] +@{weapon1stat}[Ability] +@{size}[size] +@{weapon1enh}[Weapon1 Enh] +@{weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2[Flank] +?{Power Attack? (put in penalty with negative sign ie -3)|0}[Pwr Attk] ]] (check for crit on [[1d1*@{weapon1critmin}+@{bab}[BAB] +@{weapon1stat}[Ability] +@{size}[size] +@{weapon1enh}[Weapon1 Enh] +@{weapon1focus}[Weapon1 Focus] + ?{Flank (1=yes)|0}*2 [Flank] +?{Power Attack? (put in penalty with negative sign ie -3)|0}[Pwr Attk] ]] or better)}
February 20 (10 years ago)
Gen Kitty
Forum Champion
Hm. I have no idea why that would fail in such a way. I've not seen that kind of error before. I'm sorry :/ Hopefully one of the other macro gurus will be by to explain this.
February 20 (10 years ago)
Hopefully :/ an error pops up saying "No attribute was found for @{Lv2 Guard|token_name}" but that makes no sense to me because the token name isn't aprt of a character sheet.
February 20 (10 years ago)
Diana P
Pro
Sheet Author
Is the token associated with a filled out character sheet? To get that attack macro to work, you need to have BAB, strength/dex, and size filled out on the character sheet itself.
February 20 (10 years ago)
Everything is filled out, the only thing not working is the name defaulting to the character name instead of the token name :/
February 20 (10 years ago)
Gen Kitty
Forum Champion
"No attribute was found for @{Lv2 Guard|token_name}" should not pop up if your macro was @{selected|token_name}. This is quite baffling.
February 20 (10 years ago)
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator

Brett H. said:

Everything is filled out, the only thing not working is the name defaulting to the character name instead of the token name :/

So, just to make sure I'm understanding, you're using this command, "@{selected|token_name}" and it returns the name of the Represents Character and not the token name?
February 20 (10 years ago)
Diana P
Pro
Sheet Author
Hmm. When I copy that macro into one of my campaigns to test it, it works. :\ Gives me the token name also; I changed it to verify.

So... I have no idea right now. :(

February 20 (10 years ago)
I agree. Although, the macro will read as ""Solas, captain of the guard attacks with a Long Sword, hitting AC Rolling...' or any other token name, if I use the @{target|token_name} macro.

It's just an annoying extra step I feel shouldn't need to be here. It sounds like a bug.
February 20 (10 years ago)
It returns as this "[insert name on character sheet]|token_name attacks with a Long Sword, hitting AC13 (check for crit on Rolling..." in my chat box
February 20 (10 years ago)
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Brett, if you PM me a join link to your campaign I'll take a look.