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

Show the NPC/Monster name in a Macro

I am wanting to show the NAME of the monster in macros.  I am trying to use @{selected|npc_name} but that returns the monsters general name.  I have 2 Ettins, named Ettin 1 and Ettin 2,  @{selected|npc_name} always returns "Ettin" not "Ettin 2" (see below)
Here is how the monster is setup
1608238833
David M.
Pro
API Scripter
Sounds like you are looking for the token name, not the character name. @{selected|token_name}
Hmmm, ok. This is the macro I am trying to make work. @{selected|wtype}&{template:npc} @{selected|npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{selected|initiative_bonus}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}} If I replace @{selected|npc_name_flag} with @{selected|token_name} it does not show even the monster name.  @{selected|token_name|npc_name_flag} does not work either.
1608324849

Edited 1608324906
Jordan C.
Pro
API Scripter
Darryn said: Hmmm, ok. This is the macro I am trying to make work. @{selected|wtype}&{template:npc} @{selected|npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{selected|initiative_bonus}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}} If I replace @{selected|npc_name_flag} with @{selected|token_name} it does not show even the monster name.  @{selected|token_name|npc_name_flag} does not work either. You need {{name=@{selected|token_name}}}. A bit unintuitive but you can deconstruct the command by typing "@{selected|npc_name_flag}" into chat and seeing that it results in {{name= npc_name }} so it automatically calls the name  parameter
1608325864

Edited 1608331025
Try this: @{selected|wtype}&amp;{template:npc} {{name=@{selected|token_name}}} {{rname=^{init}}} {{mod=[[[[@{selected|initiative_bonus}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|initiative_bonus}]][DEX] &amp;{tracker}]]}} {{normal=1}} {{type=Initiative}} These two links should help as well: <a href="https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates" rel="nofollow">https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates</a> <a href="https://wiki.roll20.net/D%26D5E_by_Roll20_NPC_Attributes" rel="nofollow">https://wiki.roll20.net/D%26D5E_by_Roll20_NPC_Attributes</a>
1608328333
Jordan C.
Pro
API Scripter
Jarren K. said: Try this: @{selected|wtype}&amp;{template:npc} {{name=@{selected|npc_name}}} {{rname=^{init}}} {{mod=[[[[@{selected|initiative_bonus}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|initiative_bonus}]][DEX] &amp;{tracker}]]}} {{normal=1}} {{type=Initiative}} These two links should help as well: <a href="https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates" rel="nofollow">https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates</a> <a href="https://wiki.roll20.net/D%26D5E_by_Roll20_NPC_Attributes" rel="nofollow">https://wiki.roll20.net/D%26D5E_by_Roll20_NPC_Attributes</a> I believe they need the @{selected|token_name} for the name field since they don't want the sheet that the token represents.
Jordan C. said: I believe they need the @{selected|token_name} for the name field since they don't want the sheet that the token represents. Whoops, yep.&nbsp; I'll edit it above also. @{selected|wtype}&amp;{template:npc} {{name=@{selected|token_name}}} {{rname=^{init}}} {{mod=[[[[@{selected|initiative_bonus}]][DEX]]]}} {{r1=[[@{selected|d20}+[[@{selected|initiative_bonus}]][DEX] &amp;{tracker}]]}} {{normal=1}} {{type=Initiative}}
Thanks everyone!&nbsp; Got it working&nbsp;
Interesting stuff! Might help with NPCs the players already know but might forget OOC.