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

api to ask the player for the roll he got from a physical dice roll he did

I didn't hope the title given you an idea of what i'm looking for so here it goes: Why do i want to do this: A player at my table tried to roll his own physical dice but everyone stopped him (except me) because they wanted to see the roll done in the app. Not because they don't trust him, but because they wanted to see the roll in the chat. I would say that's understandable. So, I want to have both. I want the player to use his physical dice and have the roll to show in the chat. What do I need the api to do? main case of success: 1.-Player presses in his shortsword (could have been any other button in his character sheet) to attempt an attack. 2.-Window pops that says " roll your physical dice and pass it here " [X] ". I will do the rest!". 3.-Player rolls his physical dice (a d20 let's say he got a 15). 4.-Player passes the number on to the window (x = 15). 5.-api calculates the roll. In his character sheet, he tried to attack with a shortsword so d20 [15] + dex_mod [4] + proficiency [2] = 15+4+2 = 21 Some could say this would let players cheat but we don't do that kind of stuff. We are not cheaters so it won't be a problem. The real problem is that I haven't seen anything in the roll20 documentation nor the wiki about being able to set a roll to a specific number. Is there an api that can make this? If not, is it possible to set a roll to a specific number? Cos, if so, I will do it myself.
1637900328
The Aaron
Roll20 Production Team
API Scripter
You shouldn't need the API for this. I would enter 0 for the number of dice in the character sheet, then add a roll query to prompt for the physical dice value, like: +?{Dice Total} Where you put that will vary depending on the character sheet.
1637954503
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Which character sheet are you using?
Scott C. said: Which character sheet are you using? We are using the default dnd 5e character sheet by roll20. The Aaron said: You shouldn't need the API for this. I would enter 0 for the number of dice in the character sheet, then add a roll query to prompt for the physical dice value, like: +?{Dice Total} Where you put that will vary depending on the character sheet. I see. This works fine. If I place it in the "core_die" box in the dnd 5e sheet the page asks for the roll of everything except for the damage rolls (those can be edited to ask for the roll in the same sheet so no problem there). The problem is the attack roll. when using "?{physical die}" in the "core_die" box the page is not applying the other modifiers. I found a work around using "?{physical die}d1" in the "core_die" box. The problem with this is that, by the sheet understanding, that counts as a nat 1 (always) and in the chat the number is colored red so it's confusing. Any work around for this last problem?
1638378896
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, then I have a solution for you that I use in my own games. You can change what is used as the base die roll on the 5e sheet. Simply put this in the "core die roll" field on the settings page: ?{Roll} + [[{?{Roll},10}>20]]d0 + [[{?{Roll},10}<1]]d0cf>0cs>1 + 0d0 This will also mimic the crit/fumble detection, although it can't mimic the effects of things that extend the crit threshold.