I am trying to write a formula that rolls a certain number of dice, then takes the high or low based on the value input. So, say you are prompted for a number of Shifts . The absolute value of this number of shifts should be added to three. Then roll that number of d6 and keep the highest values if the shift is above 0, or the lowest values if the shift is below 0. Thus, if a player inputs a -2, the roll should resolve to: 5d6kl3 if the player inputs a 4, the roll should ultimately resolve to: 7d6kh3 It seems like there should be a fairly straight-forward way to do this, but it has eluded me thus far. Getting the total number of dice is simple: ([[abs(?{Dice}) + 3]])d6 Getting the kl and kh parts to work has been very challenging. Thus far I managed to put somethings together so that by using tables named [0] and [1] that contain only the values kl and kh respectively, this horrible formula will return that text: [[1t[[[{1d1, 0d1 + [[{0d1, 0d1+?{Dice}}kh1]]}kl1]]]]] I've tried compositing those parts together, but it doesn't resolve correctly: ([[abs(?{Dice}) + 3]])d6([[1t[[[{1d1, 0d1 + [[{0d1, 0d1+?{Dice}}kh1]]}kl1]]]]])(3) It doesn't seem to parse this correctly, and it just takes the number of dice and returns that result. With the number of things the Dice Roller can do, this seems like one where I am just missing something obvious.