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

Dice engine does not like /r {{?{1. Keep|1}} + 3d6sd}kh3

If i use /r {{?{1. Keep|1}} + 3d6sd}kh3 the dice engine seems to halt completly for many minutes? What I would expect is: 1. Prompt for number 2. Treat number as dice group, e.g. 6' 3. Roll 3d6 dice group for a total result of e.g. 6',5,4,3 4. Keep highest 3: 6',5,4 5. Sum up = 15 Actual result: Chat stuck with "Rolling the dice" label
1677423835
Gauss
Forum Champion
You have an extra pair of "{" "}" brackets around your query, that is what is causing the problem. Remove them, it will work correctly. 
1677424021

Edited 1677425755
Gauss said: You have an extra pair of "{" "}" brackets around your query, that is what is causing the problem. Remove them, it will work correctly.  No, because /r {?{1. Keep|1}} + 3d6sdkh3 or /r { ?{1. Keep|1} + 3d6sd}kh3  both keep the highest 3 of the 3 d6 (pointless) and then adds the prompt input. This is not the same, and exactly how I stumbled into this. However, expanding the 2d6 each into their own group would work: /r { {?{1. Keep|1}} , {?{2. Keep|1}} , {1d6}, {1d6} }kh3 but this has the problem that the const values have no highlighting of what was kept (even if it is calculated correctly). What works with the highlighting is: /r { ?{1. Keep|1} * 1d1 , ?{2. Keep|1} * 1d1 , 1d6 , 1d6 }kh3 but this produces incredibly ugly and hard to read results, and converting the results of the multiplication back to to inline rolls, again converts them to "m"-typed rolls, which the engine does not allow. In any case I have not found out how to do sorting, and if it is even possible (or at least I would not know how to apply "sd" to a grouped roll). Note: The extract curly brackets are required to convert M-rolls to regular results before being mixable, at least I think so. Another to me really mysterious result is: /r [[{ [[?{1. Keep|1} * 1d1cs6cf0]] , [[?{2. Keep|1} * 1d1cs7cf0]], [[1d6cs6cf0]] , [[1d6cs7cf0]] }kh3]] I have absolutely no idea how the result is 17. I would have expected 6+6+4=16. message Id: "-NPDLbrc1DKQnv5Nozj3"
You need extra brackets when using flat numbers in group rolls for use in a single sub-roll group rolls. It seems to complain about the result type of the group roll when you don't nest the flat number or is otherwise not a Roll type. /r {{{?{1. Keep|1}}} + 3d6sd}kh3 There is an open suggestion to rewrite the dice roller in order create more consistent behaviour and not rely on weird roll nesting to get things done. As for your other mysterious result. It shows 17 since it's kh3 so performs 6+6+5 dropping the 4
1677437824
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
RainbowEncoder said: There is an open suggestion to rewrite the dice roller in order create more consistent behaviour and not rely on weird roll nesting to get things done. If RainbowEncoder endorses a fix for the dice roller, I'm on board.
1677521603

Edited 1677521643
RainbowEncoder said: As for your other mysterious result. It shows 17 since it's kh3 so performs 6+6+5 dropping the 4 D'oh. I was tired. Can we all do, like I never posted this :P? okay? Thank you!