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

Hide player dice roll from the player.

1383076964
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I must confess I don't understand API all that much... but here is what I am asking. A rouge character should get to roll their attempt to "hide in shadows" however they should not know they were successful. Also they might pick a pocket but the victim (for whatever reason) doesn't let the rouge know that they know the rouge picked their pocket. I think players should not always know their dice roll (but get to roll it).. could a macro trigger an API that makes a GM roll in secret to even to the play triggering the macro?
&lt;humor&gt; <a href="http://dictionary.reference.com/browse/rogue" rel="nofollow">http://dictionary.reference.com/browse/rogue</a> &lt;/humor&gt; I get the idea. Which System?
1383080855
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
AD&D 2E.... But I could likely adapt the code from a basic example... (Thanks for the interst and the spelling help :P )
I would like to know this as well. More because my players want me to hide my rolls from them and rolling dice on my end while running the game at my computer can be slightly awkward.
/gm rolls would work for the GM, I'm not sure if they work for players.
Actually you can whisper to yourself /w user as part of a macro
Michael B. said: &lt;humor&gt; <a href="http://dictionary.reference.com/browse/rogue" rel="nofollow">http://dictionary.reference.com/browse/rogue</a> &lt;/humor&gt; I get the idea. Which System? I don't get it... :
1383082200
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Or a GM roll as GM (for Sharon) I guess I am looking for an API to allow players to trigger a GM roll as if they were the GM... it would be "their" roll but seen only by the GM. Another example is critical hit tables... I know if I roll "X" the NPC dies... but what if its the first round and the GM wants to fudge it a bit.... by having my own roll being hidden from me (player) ... the GM can fudge... and its still "my" roll. All this allows the players to feel more involved while keeping the rolls from them to aid RP or actual game mechanics reasons to hide success (thief example) also saves dice rolling for the GM. Heck back to Sharon point it would save her work at least.
1383085229
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Something like..... // This is a forced GM roll on("chat:message", function(msg) { var cmdName = "!hideroll "; var msgTxt = msg.content; var gmName = "Stephen S. (GM)" // Check for our heal command in the chat message. if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { var diceroll = msgTxt.slice(cmdName.length); sendChat(msg.who, "/em good command"); sendChat(msg.gmName, "/gmroll " + diceroll);}; });
I like where you're going! I might suggest having a multiple chat output like !hideroll which does a sendchat of "What skill are you using?" followed by "What is your modifier" once a var is entered via the ! API command. Essentially prompting a player, culminating their strings and dropping it out in such a way that you could see exactly what they're doing. "!hideroll" "Pickpocket" "+3" would output a diceroll sent via GM with the subtext of "Player X rolls a Pickpocket check" followed by the dice roll
1383091653
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
on("chat:message", function(msg) { var cmdName = "!hr"; var msgTxt = msg.content; var msgWho = msg.who; if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) { sendChat(msgWho, "/gmroll 1d100"); }; }); This works in the most basic form.... rolls 1d100 by any player and not seen the player.
1383125311
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="https://gist.github.com/anonymous/7229593" rel="nofollow">https://gist.github.com/anonymous/7229593</a>
1383126352
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I think that works and does all that is needed. I went with "!broll" for blind roll and it works just like a "/gmroll" only the player can't see their dice roll. So... "!broll 1d100+10 to pick pocket Jimmy" Would result in the player seeing: "Secret roll sent to GM (1d100+10 to picket pocket Jimmy)" with no dice roll result and the GM would see and normal GM Roll result: "PlayerName: [(To GM) rolling] [rolling 1d100+10 to picket pocket Jimmy] [(38)+10] = [48]" (Thanks to Stephen L., I just pulled from his Heal API what I needed for this.)