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 .
×

Referencing Token Name while using an Attack Action Macro.

Looking up macros on youtube.  I see this macro used a lot and it's really helpful. %{selected|repeating_npcaction_$1_npc_action}  However, if there is a named NPC that's using an existing creature stat block is there a way I can reference the token's name as opposed to the name used in the sheet? I tried inserting  {{name=@{selected|token_name} %{selected|repeatingnpcaction$0_npc_action} It almost works but not quite  I don't want to make duplicate NPC sheets just for every variant of named tokens : /
1607040039
The Aaron
Roll20 Production Team
API Scripter
This might work: %{@{selected|character_name}|repeating_npcaction_$1_npc_action} 
%{@{selected|character_name}|repeating_npcaction_$1_npc_action}  It appears as though nothing has changed. I tried showing the NPC name in roll to check to see if it worked but it refers to the NPC sheet I use When I replace character_name with token_name it shows up like this 
1607042968

Edited 1607042992
Oosh
Sheet Author
API Scripter
The easiest way is to overwrite the {{name}} property from the original template: %{selected|repeating_npcaction_$1_npc_action}{{name=@{selected|token_name}}} Just make sure there's no line break between them.
That worked! Thank you so much!