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

Higher of two dice, N times?

Due to an interaction of two rules, I ended up in a situation where I could use a macro to calculate the value of... "The highest of (dice roll A, dice roll B, fixed value), rolled N times". I was wondering if there's a way to make this in a way that doesn't spam up the entire chatbox, but I am... not well experienced with rolls. The ideal version would be a popup that asks the values of A, B and N, and then calculates the fixed value based on A and B, but it's not vital.
1613769283
GiGs
Pro
Sheet Author
API Scripter
Unfortunately roll20's macro system doesnt support the "rolled N times" part - you need to be a Pro Susbcriber and use a custom script to do that kind of thing. For the "highest of" part you can use a group roll and the kh1 (keep highest one) operator, like {1d6, 1d10, 7+0d0}kh1 When using this you cant group rolls with non-rolls, so that last is a fixed number - 7, with +0d0, to trick roll20 into thinking that is a dice roll. Alternativelly you could do {[[1d6]], [[1d10]], 7}kh1 inline roll brackets [[ ]] convert a dice roll into a number, so here there are three fixed rolls.
Hm! Not perfect but can always be used without TOO much spam, if even with a simple /r. Or something fancier to hide all the rolling if I can figure it out.
1613850076
GiGs
Pro
Sheet Author
API Scripter
If you wrap it in inline roll brackets [[ ]], it will just show the result, no need to use /roll at the start, like /me rolls a total of [[ {1d6, 1d10, 7+0d0}kh1]] (That demonstrates how you can embed inline rolls in other lines, and dont need the /roll command.)