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

Macro error

Hi! Im making my own Monster Manual as you probably saw it on youtube from Take20. Really awesome stuff. But i have a problem when i make my own monster without dragging it in. Everything works fine but when i click perception it shows me this -  SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found. My macro for it (and it rolls for perception and shows passive one) is /w gm %{Selected|npc_perception} /w gm @{selected|wtype}&{template:npc} {{normal=1}} {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{mod=}} {{r1=[[@{selected|npc_passiveperceptionbase}]]}} Any ideas?
1492000798

Edited 1492001641
So the reason for the error is because you are trying to access the attribute npc_passiveperceptionbonus, but that attribute does not exist for an NPC unless it is dragged from the compendium. You can get around this, however, by using the attribute npc_perception and adding 10 to the result. Keep in mind that the current version of the 5e OGL character sheet expects there to be a value in this attribute even if the character does not have proficiency in the skill. Again we can get around this. The macro that follows will be able to account for if it is a custom NPC vs a Compendium PC as well as be smart enough to revert back to the wisdom modifier if the NPC does not have the perception attribute filled in. @{selected|wtype}&{template:npc} {{normal=1}} {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{mod=}} {{r1=[[[[@{npcd_wis_mod}*{1@{npc_perception}0,0}=10+0@{npc_perception}]]+10]]}} EDIT: noticed an error in the macro that resulted in an error if the monster does have the npc_perception attribute filled.
 Kyle thank you so much! It's so rare to get an answer of that level as yours.