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

Private Chat Menu with GM roll button

So, I'm working on a passive stats chat menu macro, that includes a button to roll the stat, but I want that roll to be a gmroll/whispered. However, it seems I can only either: make a private menu that makes public rolls, or make a public menu that makes private rolls. The moment I attempt to combine the two, it breaks. Examples are simplified (only one stat shown for each just as a PoC) Example A (Private menu, public rolls): /w gm &{template:desc} {{desc=[Player Senses](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:25px;) [Perception](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:20px;) [Player1](~Player1|perception" style=background-color:white;color:darkred;font-weight:bold;font-size:15px;)}} Example B (Public menu, private rolls): &{template:desc} {{desc=[Player Senses](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:25px;) [Perception](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:20px;) [Player1](`/gmroll 1d20+@{Player1|perception_bonus}" style=background-color:white;color:darkred;font-weight:bold;font-size:15px;)}} However, when I attempt to do it this way, combining the two... " There was an error with your formula. Please try again. " Example C (private menu, private rolls): /w gm &{template:desc} {{desc=[Player Senses](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:25px;) [Perception](" style=background-color:white;color:black;font-weight:bold;text-decoration:underline;font-size:20px;) [Player1](`/gmroll 1d20+@{Player1|perception_bonus}" style=background-color:white;color:darkred;font-weight:bold;font-size:15px;)}} I've even tried escaping the backtick (`), but it still errors the same, nonspecific error. Also, have tried without any of the style information. Still happens. When you attempt to just perform a raw /w gm [Player1](`/gmroll 1d20+@{Player1|perception_bonus}) it fails. This shows that the issue is ultimately  having a button that prints text in chat within a whisper. Does anyone know how this might actually be performed? Is there a way to convert [Player1](~Player1|perception) into a gmroll/whispered roll without having to modify the character sheet (like @{wtype} would need)? Or is there a way to make [Player1](`/gmroll 1d20) work inside of a whisper? I'm aware I could make the button call a macro that performs a gmroll, but that would ultimately require several additional macros to be created, which is just rather ugly and troublesome, so I would really rather not need that route. I also understand the possibility of performing the roll inside the menu itself, but again, not quite what I'm looking for.
1661149977
Oosh
Sheet Author
API Scripter
This should do it: /w gm &{template:default} {{ [player1](`/w gm %{player1|perception}) }} Obviously you should play however you want to at your own table, but just making sure you're aware that rolling players' dice for them isn't how passive perception is supposed to be done RAW :)
Thank you! That's exactly what I was looking for! So that's what was causing the issue. I hadn't even thought of that. And yes, I understand passive senses. It was probably a poor example considering I was halfway through making a menu for my GM when I thought "I would like to be able to whisper output from my own menu (as a player) to my GM. So the example was butchered from working on too many things at once. But I'm glad it was enough to understand. Thanks again!
1661183727
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It can also sometimes be handy to organize complex  Chat Menu s by making the calls be sub-macros on the same  Macro Character Sheet . The syntax can be much easier to see, more modular (you can reuse the macro in other menus), and you can code in whisper settings individually.