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

Discard dice above X and below Y

1531484833

Edited 1531499688
Hi!I need to roll some dice and discard the results above one target number, and below another. So something like: /roll (3d6<5)>2, to discard both 6's and 1's. But however I try to wrangle it with brackets, it doesn't seem to give the right result. I couldn't find a solution in the docs/forum - any thoughts? Thanks! Ed:  Answer is: /roll 3d6<Xf<Y
1531487321
The Aaron
Pro
API Scripter
Hmm.  I don't know that you can do that with the dice syntax.  Are you just looking for the sum, so something like: 1 2 5 4 6 3 = 14 You could do that by switching to a rollable table. Assuming you named it p6  and gave it these 6 rows: 0 [1] 2 3 4 5 0 [6] all with weight 1, you could roll like one of these: /r 3t[p6] [[ 3t[p6] ]] and get the sum along with each 0 result being labeled with what it's face was.
Thanks for the answer! I should have said, it's the number of successes ('hits') I'm looking for. So, 3d6>2<5 rolling 1,4,6 would be '1 success'. Unfortunately I don't think I can use tables because I was wanting to use other macro functions (querying values, etc) in the process. But it sounds like maybe it can't be done!
To be more specific, in my situation the dice are always d6, one stat determines the number of dice (1-3), another determines the high cut-off (dice >= it are discarded) and the roll difficulty is the low cut-off (dice <= it are discarded). 
1531488388
The Aaron
Pro
API Scripter
You could use a table with these 6 rows: 0 [1] 1 [2] 1 [3] 1 [4] 1 [5] 0 [6] But other than that, I don't think it can be done in the current dice syntax.
1531488473
The Aaron
Pro
API Scripter
Ah, that does complicate things.  You could certainly do it with an API script.  or you could have ~36 Roll Tables...
Hmm, I might try dealing cards and having the players discard manually.... anyway, thanks!
... but actually, it's easier to combine the two cut-offs to just come form one 'side', so I'll do that. :)
1531489676

Edited 1531489766
Aha! I found it in the docs, what I was looking for is: 3d6>2f>6 The 1's are 'discarded', while the 6's are 'counted as failures' - both are subtracted from the number of 'successes'! And this way I can use queries etc to get values to replace the '3', the '2' and the '6'.
1531490035
The Aaron
Pro
API Scripter
WOW! That's clever.