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

Dice Roller help

New player to Roll20 and could use some advice on a macro I'm working on for my party. I'm SURE someone has a similar macro already written but my Google-Fu has failed me this time so if you know of one/have one I'd be obliged to be pointed in that direction. I feel like I have the pieces to put it together but every time I try something goes wrong so any advice would be appreciated. Brief:   Enter the number of dice to be rolled, select which dice to be rolled, standard at advantage or disadvantage,  add any modifiers. Adv/DADV (#ADV/DADV) : ?{Attack|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} With mods ( #D20) : /me rolls a [[#ADV/DADV +?{modifier|0}]] Selecting a dice ( #1D?) : /me ?{Dice|D12, [[1d12]]|D10, [[1d10]]|D8, [[1d8]]|D6, [[1d6]]|D4, [[1d4]]|D2, [[1d2]]|D100, [[1d100]]}
1573046095

Edited 1573046217
GiGs
Pro
Sheet Author
API Scripter
I'm not sure what you're asking. It seems like each of the parts above work. How do you want to combine them? Edit:  do you want to ask for die type, then ask for advantage for rolling that die? so if you pick d8 and advantage, you'd roll 2d8, and take the highest? But not sure how asking the number of dice to be rolled fits in.
1573048783

Edited 1573049256
Thanks GiGs I'm aiming for the user of the macro to get an option to ask how many die they want to roll and input it in a text field (will call that n). Then select from a drop-down like the selecting a die macro which die they wanted to roll. Much like the ADV/DAVD macro they'd be asked if they want a straight roll [nd?] or advantage etc [nd?kh1]. Without displaying that result they would then be asked if they want to add a modifier to the roll which could be positive or negative like the with mods macro as a text input field. the result would then be displayed. Does that make sense? I don't think the order in which those things are asked for is overly important that was just the logical order for me. I've not been able to get the inputting the amount of die to be rolled section in there yet but was trying something like the below. /me ?{Dice|D12, [[?{Number of Die|1}d12]]|D10, [[?{Number of Die|1}d10]]|D8, [[?{Number of Die|1}d8]]|D6, [[?{Number of Die|1}d6]]|D4, [[?{Number of Die|1}d4]]|D2, [[?{Number of Die|1}d2]]|D100, [[?{Number of Die|1}d100]]} EDIT : So I found I could simplify that step down to though a drop-down would be a nicer user experience for choosing a die. /me [[?{Number of Die|0}d?{Die to roll|0}]] EDIT : Modifier works that way /me [[?{Number of Die|0}d?{Die to roll|0}+?{modifier|0}]]
1573049802
GiGs
Pro
Sheet Author
API Scripter
How does advantage/disadvantage work when your rolling, say, 3d8?
1573049962

Edited 1573049979
GiGs
Pro
Sheet Author
API Scripter
You can use a drop down easily with both of those  queries /me rolls [[?{Number of Die|1|2|3|4|5|6|6}d?{Die Size?|12|10|8|6|4|3|2|100}+?{modifier|0}]] or /me rolls [[?{Number of Die|1|2|3|4|5|6|6}?{Die Size?|d12|d10|d8|d6|d4|d3|d2|d100}+?{modifier|0}]]
I was just thinking that, the A/D is really only needed on the D20 so it may make more sense to have a macro specifically for a D20 and not on the other die. A touch more clunky having two macros for different die but it should work out.
GiGs said: You can use a drop down easily with both of those  queries /me rolls [[?{Number of Die|1|2|3|4|5|6|6}d?{Die Size?|12|10|8|6|4|3|2|100}+?{modifier|0}]] or /me rolls [[?{Number of Die|1|2|3|4|5|6|6}?{Die Size?|d12|d10|d8|d6|d4|d3|d2|d100}+?{modifier|0}]] Oooh interesting, I'd never tried that before. that looks like it should work out really well.
1573050081

Edited 1573050784
GiGs
Pro
Sheet Author
API Scripter
Much like the ADV/DAVD macro they'd be asked if they want a straight roll [nd?] or advantage etc [nd?kh1].  nd?kh1 here means keep the highest die only. Do you mean roll one extra die, and discard to lowest? If its kh1 or kl1 its very easy. /me rolls [[?{Number of Dice|1|2|3|4|5|6|6}?{Die Size?|d12|d10|d8|d6|d4|d3|d2|d100}?{Adv/Dis?|Standard Roll, |Keep High,kh1|Keep Low,kl1}+?{modifier|0}]]
GiGs said: Much like the ADV/DAVD macro they'd be asked if they want a straight roll [nd?] or advantage etc [nd?kh1].  nd?kh1 here means keep the highest die only. Do you mean roll one extra die, and discard to lowest? If its kh1 or kl1 its very easy. /me rolls [[?{Number of Die|1|2|3|4|5|6|6}?{Die Size?|d12|d10|d8|d6|d4|d3|d2|d100}?{Adv/Dis?|Standard Roll, |Keep High,kh1|Keep Low,kl1}+?{modifier|0}]] That looks ideal. I think you've nailed it.
Tested it out a few ways and yeah wow, that's doing everything the party could need. Completely blown away by how quickly you pulled that all together thank you very much.
1573051061
GiGs
Pro
Sheet Author
API Scripter
You're welcome :)
1573070597
Ziechael
Forum Champion
Sheet Author
API Scripter
Because I can't help but over complicate even the simplest of solutions I did a thing: /me rolls [[ ?{Roll|d20,?{Adv/Dis|Standard Roll,d20|Keep High,{2d20}kh1|Keep Low,{2d20}kl1}|Other,?{Number of Dice|1|2|3|4|5|6}?{Die Size?|d100|d12|d10|d8|d6|d4|d3|d2}} + ?{modifier|0} ]] The above will give you the choice of using a standard d20 (and then give the option of rolling 1 or 2+kh/kl) or 'other' which then gets into the xdx territory. It uses advanced query syntax and WILL break if you put it in a collections tab macro and then open the macro again once saved. Don't ever open it again or put it as an ability on sheets and it'll work forever. Figured the d20 options are the most common so they are first and default values but it seemed a shame to go through the mental exercise and not post it :)
1573072384
GiGs
Pro
Sheet Author
API Scripter
Hehe, I also couldnt help making the same macro in case David wanted it. I think this one is a little prettier, but they both do the same thing: ![[?{Number of Dice|1|2|3|4|5|6}?{Die Size?|d12|d10|d8|d6|d4|d3|d2|d100} [[?{Adv/Dis?| Standard,?{Number of Dice}?{Die Size?}| Advantage,(?{Number of Dice}+1)?{Die Size?}kh?{Number of Dice}| Disadvantage?,(?{Number of Dice}+1)?{Die Size?}kl?{Number of Dice} } +?{Modifier|0}