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

Token Macros: Whisper to GM both Perception and Passive Perception

1525656871
Steven B.
Pro
Marketplace Creator
Hello, I've followed Taking20's advice and started creating monster manual entries using the SRD5 sheet, which works great. I'm having some trouble, though, getting a macros to work right. I want it to whisper BOTH the rolled Perception for the NPC and the Passive Perception. The calculations seem to work fine, but it will only whisper the rolled Perception. This is what I have: /w gm %{Selected|npc_perception} @{selected|wtype}&{template:npc} {{normal=1}} /w gm {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{mod=}} {{r1=[[@{selected|npc_perception}+10]]}} I don't do programming, but it looked like the spot where I placed the second "/w gm" was the right place for it, but it doesn't work. I'm not sure where I should be putting it.
1525657616
The Aaron
Pro
API Scripter
Very close. You just need a return (shift-enter in chat, just enter in a macro or ability box): /w gm %{Selected|npc_perception}@{selected|wtype}&{template:npc} {{normal=1}} /w gm {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{mod=}} {{r1=[[@{selected|npc_perception}+10]]}}
1525878978
Steven B.
Pro
Marketplace Creator
Thanks, Aaron. The calculation for passive perception works, and it is whispered, but it displays as a string of code, rather than displaying as a box titled "Passive Perception" with the number below it. Like this:
1525879157
The Aaron
Pro
API Scripter
Whoops! =D I should have read that more carefully. =D /w gm %{Selected|npc_perception}@{selected|wtype}&{template:npc} {{normal=1}} {{name=@{selected|npc_name}}} {{rname=Passive Perception}} {{mod=}} {{r1=[[@{selected|npc_perception}+10]]}} You had an errant /w gm in the middle, which I mistook for another roll template.  Try that.
1526059538
Steven B.
Pro
Marketplace Creator
That did the trick!
1526060519
The Aaron
Pro
API Scripter
Great!
Hey Aaron, I modified the script to give the name of who the check is rolling for, and I wished to modify one other thing but didn't see how to do so.  If I wanted the the first word "skill" to instead be "PP" for passive perception followed by the skill +10, and the second "skill" to be instead "PC" for perception check followed by perception skill +1d20 / Perception skill +1d20, how would I change the script? This is what I have so far: /w gm %{Selected|npc_perception}@{selected|wtype}&{template:npc} {{normal=1}} {{name=@{selected|npc_name}}} {{rname=Passive Perception & Perception Check for @{selected|token_name}}} {{mod=}} {{r1=[[@{selected|npc_perception}+10]]}} Thank you! Barry
1526221804
The Aaron
Pro
API Scripter
I think those labels are part of the Roll Template.  I don't know if you can change them without changing the template in the character sheet.
I thought they might be but thought I'd ask. Thanks for the reply Aaron