Let me explain a simpler case which you can then apply to your more complicated one: [[ 1d4cs1cf4<2 ]] 1d4 -- rolls a number between 1 and 4: 1,2,3,4 cs1 -- sets critical success on a 1, which will result in a green border around the die This could be written as cs<1, as < means less than or equal to in this dice engine, so would match 1 and anything lower cs<2 would result in 1 or 2 having a green border cs2 would result in only 2 having a green border cs1cs2 would be the same as cs<2 cf4 -- sets critical failure on a 4, which will result in a red border around the die Similarly, this could be written as cf>4, as > means greater than or equal to in this dice engine, so would match 4 and anything greater cs>3 would result in 3 or 4 having a red border cf3 would result in only 3 having a red border cf3cf4 would be the same as cf>3 <2 -- sets what values on a die are counted as successes. <2 means any value less than or equal to 2, so a 1 or a 2 is considered success in this case Causes the result to be the number of successes, rather than the result of the dice rolled. For one die, this will be either a 1 (success, a value of 2 or less) or a 0 (failure, a value of 3 or greater). For the 4 possible results, here's what would be seen: 1 -- This is a critical success, so the border will be green, it is also counted as a success so the value will be 1 2 -- This is just a success, so will have the yellow border and a value of 1 3 -- This is a failure, but not a critical failure, so will have a yellow border and a value of 0 4 -- This is a critical failure, so will have a red border. It is also a failure, so will have a value of 0 Hopefully that clears up how this works and will allow you to implement what you are trying to make. Definitely let me know if it doesn't.