Perception macro using OGL

I have been following instructions on how to build a perception macro for all my npc's from Take20 on youtube. The macro that it used for all their npc's was :  %{Selected|npc_perception} @{selected|wtype}&{template:npc} {{name=@{selected|npc_name}}} {{rname=Perception}} {{mod=@{selected|npc_perception}}} {{r1=[[1d20+@{selected|npc_perception}]]}} @{selected|rtype}+@{selected|npc_perception}]]}} I used this same macro on all my guys and it was working fine, but then there was an update to the sheet and I noticed that the macro didn't work anymore. What seems to be my issue is that when wisdom modifier is 0 and that no modifiers are added to perception, the perception value is non-existent. Can someone help me figure out this one?
1506872422
I can't reproduce the issue. Have you tried opening and closing the sheet? You'll need to provide what exactly the error is and a reproduction path
Ok so with the above command, I am no longer getting the passive perception. We then started using the following macro : /w gm @{selected|wtype}&{template:npc} {{name=@{selected|npc_name}}} {{rname=Perception}} {{r1=[[1d20+([[@{selected|npcd_wis_mod}*{1@{selected|npc_perception}0,0}=10+0@{selected|npc_perception}]])]]}} @{selected|rtype}+([[@{selected|npcd_wis_mod}*{1@{selected|npc_perception}0,0}=10+0@{selected|npc_perception}]])]]}} /w gm @{selected|wtype}&{template:npc} {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{r1=[[10+([[@{selected|npcd_wis_mod}*{1@{selected|npc_perception}0,0}=10+0@{selected|npc_perception}]])]]}} {{normal=1}} With this new macro I get these messages :  No attribute was found for @{selected|npcd_wis_mod} No attribute was found for @{selected|npcd_wis_mod} No attribute was found for @{selected|npcd_wis_mod}
An issue could be that most attributes aren't created until a value is input into the sheet, so maybe you've been using the default value of 10 for wisdom provided by the sheet but no attribute is actually made until you enter 10 yourself.
I did put a value into the npc's sheet. I am using the commoner or cultist tags and both have a wisdom of 10 so the modifier isn't added to the sheet. 
From what I can see from the sheet, you should be using @{wisdom_mod} not @{npcd_wis_mod}. Is there any particular reason you're using npcd_wis_mod that I'm missing?
1506906344
([[@{selected|npcd_wis_mod}*{1@{selected|npc_perception}0,0}=10+0@{selected|npc_perception}]]) Is no longer necessary to revert the bonus back to the stat modifier as the character sheet should be able to do that for you now. Here is my macro that works for v2.0 @{selected|wtype}&{template:npc}{{always=1}} {{name=@{selected|npc_name}}} {{rname=Perception}} {{mod=}} {{r1=[[@{selected|d20}+[[@{selected|npc_perception}]][PERCEPTION]]]}} {{r2=[[@{selected|d20}+[[@{selected|npc_perception}]][PERCEPTION]]]}}  @{selected|wtype}&{template:npc}{{normal=1}}{{name=@{selected|npc_name}}}{{rname=Passive Perception}} {{mod=}} {{r1=[[10+[[@{selected|npc_perception}]][PERCEPTION]]]}}
Thanks a lot to both of you. That was very helpful.