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

How do I reroll just one dice from a pool, only re-roll once, only if it's below X & keep the result regardless?

So, say I've a dice pool of 6d10.  I want to take only the lowest rolling dice, only if it's 5 or less, and re-roll it once.  6d10ro<5 will re-roll every dice low enough once.  6d10dl1+1d10 will effectively always re-roll _a_ dice, even if they're all 10's.  Anyone have any ideas?

(I might not have got some of the finer syntax correct here, I know.  It's just good enough to get the point across). 

July 14 (3 years ago)

Edited July 14 (3 years ago)
GiGs
Pro
Sheet Author
API Scripter

I don't believe a roll this complex is possible with the API, and a Pro subscription. Ziechael or RainbowEncoder might have ways to achieve it, but I'm doubtful.

However if youre rolling 6d10, and looking only at the lowest die, and rerolling if its 5-, you have an incredibly high chance of getting a reroll (over 98%), you might as well just assume you always get it and add 1 die.

The chance of getting an extra die (reroll) based on your lowest die rolling 5- is:

#dice
2
3
4
5
6
7
8
9
%
75%
87.5%
93.8%
96.9%
98.4%
99.2%
99.6%
99.8%

Since you'll nearly always get a reroll (which gives an extra die), you might as well just forget rerolls and add 1 die to the number dice rolled.

July 14 (3 years ago)

Edited July 14 (3 years ago)
Styx
Pro

EDIT: Actually, I re-read what you were after and the below will not meet the requirement of only re-rolling the lowest die if it's equal to or less than 5


Try:

/r ((6d10kh5)+(1d10ro<5))


Here have some jank

{({ {5} }*[[d10]]/5) + 6d10}k6

The trick here is that it treats the static 5 as a dice roll to be kept or dropped, but the value that represents is 1d10

That took a bit of testing to get my head around it.  But it works very nicely indeed.  Thank you! :-)

RainbowEncoder said:

Here have some jank

{({ {5} }*[[d10]]/5) + 6d10}k6

The trick here is that it treats the static 5 as a dice roll to be kept or dropped, but the value that represents is 1d10




July 14 (3 years ago)
GiGs
Pro
Sheet Author
API Scripter

Are those methods actually looking at the lowest die in the pool?


GiGs said:

Are those methods actually looking at the lowest die in the pool?


The method I posted uses a single sub-roll group expression. In which keep/drop mechanics do so on a per die/roll basis rather than per expression. In terms of which dice rolls are kept can be understood as

{5+0d0,1d10,1d10,1d10,1d10,1d10,1d10}k6

The difference being in the expression proper that the static 5 is manipulated into a d10 if it's kept or zero if dropped.


If there's a rolled 5, how does the keep know to drop the rolled 5 over the static one?  Is there an order to it?  :-)


Kaganis said:

If there's a rolled 5, how does the keep know to drop the rolled 5 over the static one?  Is there an order to it?  :-)

Yes. When keeping dice it prefers to keep the leftmost one in the case of ties.

In the case of dropping dice it prefers to drop the leftmost one when tied.
As a result keep high and drop low aren't truly symmetric.

Huh.  I did not know that.  Thank you!  :-)