You have a lot of rollTotals there, you can replace them with rollLess(), and the high end, rollGreater(). It's that you use rllLess and rollGreater in other places but not there. When you ask for 20, are you referring to the full target with the modifier (@{COM}+?{Bonus(+)/Malus(-)|0)|0}) or just @{COM}? You also have this: {{#rollTotal () roll target }} < span class= "success" > Success </ span > {{/rollTotal () roll target }} {{#rollLess () roll target }} < span class= "success" > Success </ span > {{/rollLess () roll target }} I'd recommend swithing this to NOT RollGreater(), which means you only need a single comparison. The NOT operator is ^ sp that would be written like {{^#rollGreater () roll target }} < span class= "success" > Success </ span > {{^/rollGreater () roll target }} I'd also combine the critical test with the success test. I don't know what your extreme failure is called, I've named it fumble here. So I'd rewrite the test of your original rollTemplate like this: {{ #^rollGreater() roll target }} {{#rollLess () roll 10 }} < span class= "special" > Critical ! </ span > {{/rollLess () roll 10 }} {{#rollGreater () roll 9 }} < span class= "success" > Success </ span > {{/rollGreater () roll 9 }} {{ / ^rollGreater() roll target }} {{#rollGreater () roll target }} {{#rollGreater () roll 90 }} < span class= "fumble" > Fumble ! </ span > {{#rollGreater () roll 90 }} {{#rollLess () roll 91 }} < span class= "failure" > Failure </ span > {{/rollLess () roll 91 }} {{/rollGreater () roll target }} This doesn't yet answer your question, but makes your original code a lot simpler. Now to answer your specific question. You just nest your test inside the above construction.In the code eblow I test if a roll is NOT greater than the target (is less than or equal), and if so, I test if if it is below 10 (9-). If that is true, there are two possibilities: it is eitehr a critical or success, so I use logical helpers again to check that. {{ #^rollGreater() roll target }} {{#rollLess () roll 10 }} {{#rollLess () target 20 }} < span class= "success" > Success </ span > {{/rollLess () target 20 }} {{#rollGreater () target 19 }} < span class= "special" > Critical ! </ span > {{/rollGreater () target 19 }} {{/rollLess () roll 10 }} {{#rollGreater () roll 9 }} < span class= "success" > Success </ span > {{/rollGreater () roll 9 }} {{ / ^rollGreater() roll target }} {{#rollGreater () roll target }} {{#rollGreater () roll 90 }} {{#rollGreater () target 80 }} < span class= "failure" > Failure </ span > {{/rollGreater () target 80 }} {{#rollLess () target 81 }} < span class= "fumble" > Fumble ! </ span > {{/rollLess () target 81 }} {{#rollGreater () roll 90 }} {{#rollLess () roll 91 }} < span class= "failure" > Failure </ span > {{/rollLess () roll 91 }} {{/rollGreater () roll target }} Scott's suggestion of using CRP will make the rollTemplate a lot clearer, but you'll need a sheet worker that might be harder to write.