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

Adding Token Reaction Macros to 5e OGL NPC Sheets

April 06 (5 years ago)

Edited April 06 (5 years ago)

I have a Deva that I am modifying to act as a boss fight for my players. I am trying to give it an additional reaction in addition to the RAW. I imported the stat block from the compendium into a custom character, and then manually added the new reaction. However my token macro I use for reactions:


/w gm &{template:npcaction} {{name=@{selected|npc_name}}}

{{rname=@{selected|repeating_npcreaction_$0_name}}}

{{description=@{selected|repeating_npcreaction_$0_desc}}}


gives the error:No attribute was found for @{selected|repeating_npcreaction_-M4GGiXbSdUFRsoSU17J_desc}


This is shown in the chat as:


I assume that it can't find the description of the homebrew ability but I don't know how to remedy that. I have not had this problem for fully homebrewed monsters that I have added in the past, only this modified Deva. I have also had a similar problem for RAW flesh golem traits, but I assume the answer is the same for both issues as the macros are very similar. 

Try changing desc at the end of that to description because of a recent change by roll20.
April 06 (5 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Change "desc" to "description". This was a recent change made to the sheet. It was also changed on npc traits. Older characters carry both attributes, but newer characters or new additions only have the "description" field.

April 10 (5 years ago)

ok so I got the macro above and changed the end 

so its like this 

/w gm &{template:npcaction} {{name=@{selected|npc_name}}}

{{rname=@{selected|repeating_npcreaction_$0_name}}}

{{description=@{selected|repeating_npcreaction_$0_description}}}

I still get an error..

No attribute was found for @{selected|repeating_npcreaction_-M44byDho8wseUQYLLW8_description}


April 12 (5 years ago)

Edited April 12 (5 years ago)

Ey mate. I was having the same problem, but i think i found a macro that works. Which means, i took what you had and added something i found from a different post ;)
(i have no idear how to write scripts.. i just copy and hope for the best)

Anyway try this one out.

/w gm &{template:npcaction} {{name=@{selected|npc_name}}} {{rname=@{selected|repeating_npcreaction_$0_name}}} {{description=@{selected|repeating_npcreaction_$0_description}}}


Hope it helps you, it worked for me atleast

April 12 (5 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Your macro is correctly written, but you have returns between fields. You can have returns within fields (for a multi-line "{{description=}}" field for example, but not between. Try this:

/w gm &{template:npcaction}{{name=@{selected|npc_name}}}{{rname=@{selected|repeating_npcreaction_$0_name}}}{{description=@{selected|repeating_npcreaction_$0_description}}}