Jump to content

Is this working properly?

Recommended Posts

Did a rather complicated roll (post is here). Unless I'm missing something it doesn't seem to parse.

First, there are 31 rolls. With 4d6 rolled 4 times it seems like there should be 24 -- 26 because there were two 1s to be re-rolled.

The dice were reported as: 6,5,4,5,5,6,5,5,5,6,4,4,4,6,2,1,3,2,3,3,4,1,6,3,4,6,6,2,3,3,4

Tallied as: 16. 16. 14. 10, 16, 10

The rule was: Heroic Stats:repeat(drop(reroll(4d6,1,below),lowest),6)

Breaking it down, it looks like it should be:

6,5,4,5 = 16

5,6,5,5 = 16

5,6,4,4 = 15

4,6,2,1,3 = 13

2,3,3,4 =10

1,6,3,4,6 = 16

6,2,3,3,4 = left over?

Am I not interpreting the results properly?


I did another experiment to see if maybe leaving out a value for the continue was the culprit:

roll:drop(reroll(4d6,1,below,6),lowest) => 4,1,2,2,4,5 => 11

which again seems like too many dice.

Link to comment
Share on other sites

  • 4 weeks later...

I'll have to dig into the logs to see what's going on. I agree with your assessment that something is not interacting correctly. I'm not sure if that's a display issue (same dice getting reported multiple times in the result) or a calculation issue (too many dice being requested by some step) without a few more reams of forensics 😀

Link to comment
Share on other sites

OK, I've dug at the logs and confirmed the dice result is correct, but the compilation of rolled dice is not. The issue appears to be what happens in the keep/drop function when the dice are sorted. More to follow, but you can trust the result is accurate.

Update: Found the specific cause. When a reroll is involved within a sorting-type function, there are potentially more rolls in the compiled result set than the sort is trying to replace. I removed the attempted in-place sort since it can't always be meaningful.

Link to comment
Share on other sites

  • Create New...