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

[Script Request] GM Roll Announcer

When you play with a DM screen and physical dice, everyone knows when the GM is actually rolling dice because they can hear it, and it can incite anticipation, or increase a player's trust that a DM isn't fudging (ha, like actually rolling dice makes a difference, but you know.)  It's all about the theatrics. In Roll20, when we make GM rolls they're silent. Is there any way to create a script that would listen for GM rolls and cryptically announce to the chat that the GM is rolling? ("The GM mysteriously rolls some dice.")  
1503523646
Lithl
Pro
Sheet Author
API Scripter
on('chat:message', function(msg) { let gmrollSent = false; if (msg.type === 'gmrollresult') { // user used "/gmroll" or "/gr" command gmrollSent = true; } else if (msg.type === 'whisper') { // user use "/whisper" or "/w" command if (msg.target === 'gm' || playerIsGm(msg.target)) { // user whispered to "gm" or to a player with GM privilidges if (msg.inlinerolls && msg.inlinerolls.length) { // whisper contained at least one inline roll gmrollSent = true; } } } if (gmrollSent) { if (playerIsGm(msg.playerid)) { // user who sent the command has GM priviledges sendChat(`player|${msg.playerid}`, '/em mysteriously rolls some dice'); } else { // user who sent the command does not have GM priviledges sendChat(`player|${msg.playerid}`, '/em rolls some dice so only the GM can see'); } } });
1503523760
The Aaron
Pro
API Scripter
Sure!  But you don't need one to get started, you could have a macro you use for gm rolls: #gmr 1d20+8 Which does: /desc The GM mysteriously rolls some dice. /gmroll
1503523888
The Aaron
Pro
API Scripter
Nice Brian!
1503527648

Edited 1503527670
Ziechael
Forum Champion
Sheet Author
API Scripter
For a low-tech but flexible 'mysterious' roll announcer I use this (sometimes I send it just to make them squirm...): /desc The DM makes a roll behind his screen. /gmroll ?{how many?|0}d?{what die|6}
Thanks Brian I'll give it a try! As for the macro idea, I've tried it before, but most of my GM rolls are connected to the shaped sheet NPC macros so I don't roll them manually.