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

Simple Macro

Hi all - hoping someone can help me.  I need a very basic macro, but I'm having trouble figuring out the coding.  I have a game where the players assemble a dice pool with several different dice ranging from d4 - d12, but the number of each type they may need to roll depends on the situation.  For example. one time they might roll 2d8, 1d6 and 1d4 all at once, but on the next roll it might be 2d6, 1d8, 1d12, etc.  I also need them to be able to keep the 2 highest results.  I can't seem to crack the coding, even though I've looked at the help wikis.  Could someone help me out and show me how this line would be coded for a simple macro?
1673742909
GiGs
Pro
Sheet Author
API Scripter
It looks like you can enter this in a single string, but would have to rely on players entering it correctly. /roll { ?{Enter at least two dice} }kh2 People could enter things like 3d6 d6+d4 2d8+d6+1d10
Thanks for the reply.  I've kind of got that much figured out from the wiki and looking at the forums - what I was hoping for is a way that it would just ask them "how many d4, how many d6?" etc, so they only have to put in a few numbers rather than type everything out.  It might be a little more complicated that way, but since the dice aren't tied to a specific skill I don't want to get into having to set up all of these pre-programmed combinations like the wiki talks about.  Maybe like a drop down table, or something?  I don't know if that would make sense or make it ultra complicated.
it would just be a variant of GiGs' answer, but { ?{Enter at least two dice} }kh2 can  be changed to [[ {?{Number of D4|0}d4+?{Number of D6|0}d6+?{Number of D8|0}d8+?{Number of D10|0}d10+?{Number of D12|0}d12 }kh2]] i tested it and it works as a macro. hope it helps 
Thank you both so much!  This is exactly what I was looking for!  Dice rolling in my game just got SO much easier and less time consuming, since dice rolling wasn't supposed to be a huge part of the time.  It was more for role-playing than roll-playing.  :)