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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Attacks, ability checks, and player input: Am I missing something obvious?

I am a curious person taking a look at roll20, coming from playing on maptool for several years, including adapting frameworks on maptool for my need. I've signed up for mentor here, to make sure I have all tools available I might need to run a simple game of D&D Next. And I am lost. Here are two simple things I can't figure out: - Present a dialogue to the player for ability check. Show them a drop-down list of their abilities, plus a text list of their skills / proficiencies as a reminder. Let them check whether they use proficiency, or have expertise. On OK, roll d20 twice, show them result for normal, advantage, disadvantage, highlight natural 1 failures in red. Apply proficiency bonus, stat bonus and expertise bonus if any as required, as well as misc modifier. - Present a dialogue to the player to execute an attack. Ask for to-hit and to-damage additional bonuses. Again do the roll two d20 and show normal / advantage / disadvantage. This time around, also highlight crits in green, in addition to natural 1s in red. Be aware of whether the crit range for this attack is 20-20, 19-20, 18-20, or even lower. And of course have all the usual modifiers, stat and otherwise, that come with an attack. Most of this seems to be possible with bespoke macros in roll20, though the more "framework" like approach of maptool seems out of reach. I can deal. But I don't see a way to ask for input parameters up front, or to do basic math. There's javascript, but as far as I can tell - and maybe this is what I'm missing!! - there is no way to call a javascript function from a macro, with some inputs to that function. Unless you count acting on chat output - maybe that's the way forward. And I haven't even touched spell books yet. :) So, you see, I'm lost. roll20 was supposed to be easier than maptool, but I find it harder. I can't figure out the two most basic functions, ability check and attack. Because I can't figure out how to do math and how to ask for player input in a macro. Help appreciated. Point me in the right direction, please. "Suck it up, what you want doesn't exist, you need to ask in the mentor's forum for it" also appreciated. Then at least I know I'm not going crazy.
1382217122

Edited 1382217736
Lithl
Pro
Sheet Author
API Scripter
Thorsten B. said: I am a curious person taking a look at roll20, coming from playing on maptool for several years, including adapting frameworks on maptool for my need. I've signed up for mentor here, to make sure I have all tools available I might need to run a simple game of D&D Next. And I am lost. Here are two simple things I can't figure out: - Present a dialogue to the player for ability check. Show them a drop-down list of their abilities, plus a text list of their skills / proficiencies as a reminder. Let them check whether they use proficiency, or have expertise. On OK, roll d20 twice, show them result for normal, advantage, disadvantage, highlight natural 1 failures in red. Apply proficiency bonus, stat bonus and expertise bonus if any as required, as well as misc modifier. Create a macro (or ability on the character sheet) for each of the character's abilities. The player can create buttons in the macro bar for their macros and abilities, or they can type them (macros start with #, abilities start with %). While typing macros/abilities, a popup menu is displayed, showing the possibilities which get narrowed down as more characters are typed. The player can select one from the list with up/down arrows (and hit tab or enter once selected) or the mouse. Put relevant information into the macro. For example, my D&D 4e lv10 Wizard has a macro containing: "Arcana: [[d20+@{William Ezo|INT}+floor(@{William Ezo|LVL}/2)+5+1]]". That's a d20, plus my INT modifier (an attribute on my character sheet), plus half my level rounded down (LVL is another attribute on my character sheet), plus 5 (I'm trained in Arcana), plus 1 (I'm wearing a Heroic-level Philosopher's Crown). When I hit the macro, I post "Arcana: [#]" to the chat, where [#] is the result of my roll. For D&D Next, you can use a roll along these lines: [[{d20+d20*?{Advantage|0}}kh1]]. When you make that roll, a popup will ask you whether you have advantage, and it will be filled with a 0 by default. Hit enter if you don't have advantage, or type 1 if you do have advantage. Add bonuses to the roll after the "kh1". (I admit I'm not certain how to incorporate both advantage -- kh1 -- and disadvantage -- kl1 -- into the same roll. Maybe Gauss does.) Edit: You could potentially get the full Advantage/Disadvantage/None effect from this: [[d20*?{Normal|1}+2d20kh1*?{Advantage|0}+2d20kl1*?{Disadvantage|0}]]. You'd get three popups; hit Enter-Enter-Enter for a normal roll (no advantage or disadvantage), 0-Enter-1-Enter-Enter for a roll with advantage, and 0-Enter-Enter-1-Enter for a roll with disadvantage. (Note: If you use this as an inline roll, the green/red/blue outlining will also be looking at the dice that are being multiplied by 0, so will rarely be accurate.) - Present a dialogue to the player to execute an attack. Ask for to-hit and to-damage additional bonuses. Again do the roll two d20 and show normal / advantage / disadvantage. This time around, also highlight crits in green, in addition to natural 1s in red. Be aware of whether the crit range for this attack is 20-20, 19-20, 18-20, or even lower. And of course have all the usual modifiers, stat and otherwise, that come with an attack. 1s are always going to highlight in red, and the max value of a die (eg, 20) is always going to highlight in green. If you use the inline roll notation (with the [[square brackets]]), you'll also get a blue highlight if you get both a 1 and a max(die). Roll20 does not currently have native support for crit ranges, although you could accomplish it via the API. There's javascript, but as far as I can tell - and maybe this is what I'm missing!! - there is no way to call a javascript function from a macro, with some inputs to that function. Unless you count acting on chat output - maybe that's the way forward. A message to the chat beginning with "!" will be consumed by the API and processed as a command. This is generally how functions get called by players from the game.
Brian, thank you. It's good to see floor is available. So, in a nutshell, what I got from that is: What I want doesn't exist. I'd have to create multiple macros, one for each ability check. There's a way to get numeric player input - the ?{} notation - one variable at a time, but no way to get input through an input form. You got very clever with advantage there. It's a way to work with the limitations of roll20. In maptool, players actually don't have to choose whether they have advantage - they get shown all three results. It's come in handy. Sometimes we debate whether there should have been advantage, and it's nice to have the right result right there. And some stuff can be done via !, though I might still not have input forms. I don't know. I love some of the stuff that's coming, like the FX. And it's easier to work with artwork in roll20. But the macro limitations are harsh. It's a big lift to move a campaign over. I'd want things to get better across the board, but it looks like I'd be burdening my players more on basic things like checks, not less. Time to see what the devs are thinking, over in the mentor's forum, I guess. Thanks again!
1382231730
Gauss
Forum Champion
Thorsten , you can probably do a lot of what you are talking about with the API. I would check with the API forum. - Gauss
1382234889
Lithl
Pro
Sheet Author
API Scripter
Thorsten B. said: In maptool, players actually don't have to choose whether they have advantage - they get shown all three results. It's come in handy. Sometimes we debate whether there should have been advantage, and it's nice to have the right result right there. Well that makes things super easy. A macro like this would accomplish that: Advantage: [[2d20kh1+...]] Normal: [[d20+...]] Disadvantage: [[2d20kl1+...]]
@Gauss, I think you are right @Brian Haha, well, that would lead to some contention if handled that way. You just roll five d20, and assign them. The way it's supposed to work though is that you roll two d20, and then the result is interpreted depending on whether you do or do not have (dis)advantage. I think I'll need the API for that. To be able to do something like that, you need variables, and some "if then else" logic, all of which exists in Javascript. I'll take a look at the API and see how far I get with it.
Thorsten B. said: The way it's supposed to work though is that you roll two d20, and then the result is interpreted depending on whether you do or do not have (dis)advantage. Wait, why do you need pre-set macros and commands for rolling dice? In real life, you pick up one die, and you roll it. If you have advantage, you roll it again. Why can you not just type "/r 1d20+X", and if you have advantage, just do it again? You don't even have to type it, you can macro it, or just hit the Up Arrow key while in the chatbox.