I'm working also on a WFRP4 sheet, with other visual approach and I want to share a solution to get the Success Level without the calcualtion from an inline roll.So everyone can use the future community release of Havoc's sheet without the need of API. test : You have to pass a raw d100 to the roll template, of course you can still include custom criticals and fumbles if you want. target : You have to pass the related characteristic, skill or similar value as an inline roll. Hit Location To determine the Hit Location just use your current approach and use a logic pattern over test . You can solve this with 59 helper functions (34 rollTotal, 25 rollBetween). Success Level The formula for the Success Level is: m - n = SL from na vs. mb ( test vs. target ) n and m are the decades of test and target (I don't know the exact English word for this.) Example: 3-2=+1 from 20 vs. 33. To determine the Success Level we need to know the decades from target and test . To get this we need a nested logic pattern, I call it Outer and Inner Pattern. Outer Pattern The pattern is segmented into: rollBetween target 1 9 rollBetween target 10 19 rollBetween target 20 29 rollBetween target 30 39 and so on. We use this to determine the decade of target . Inner Pattern Each Outer Pattern has another pattern inside: rollBetween test 10 19 rollBetween test 20 29 rollBetween test 30 39 and so on We use this to determine the decade of test . How it works Because we know from the outer pattern, that the target must be between x and x+9, we can determine the Sucess Level. Example: target is 33 and we rolled a 20 ( test ). The outer pattern goes to rollBetween target 30 39 , and the inner pattern goes to rollBetween test 20 29 . So we know: SL= +1. To cover the special case for SL+0 and SL-0 you have to adjust the inner pattern a little bit. The inner pattern from the outer pattern rollBetween target 30 39 , needs something like this: rollBetween test 20 target -> SL +0 [roll is equal or lower than target, but higher than the previous threshold 10-19] and rollBetween test target 29 AND ^rollTotal test target -> SL-0 [roll is higher than target, but lower than the next threshold 30-39] That's all. Of course, you can replace "+2 +3" with "Success" and so. But do that like you want. Raw logic pattern Here is the raw logic pattern for targets between 1 and 99. You can extend the pattern for higher targets (characteristics and skills over 100). You still need to add hit location, crits, fumbles, autofailure, autosuccess and so on, but because you pass the raw d100 to the Roll Template everything is possible. {{#rollBetween() target 90 99}}
{{#rollTotal() test 100}}–1{{/rollTotal() test 100}}
{{#rollBetween() test target 99}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 99}}
{{#rollBetween() test 90 target}}+0{{/rollBetween() test 90 target}}
{{#rollBetween() test 80 89}}+1{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}+2{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}+3{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}+4{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}+5{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}+6{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+7{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+8{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+9{{/rollBetween() test 1 9}}
{{/rollBetween() target 90 99}}
{{#rollBetween() target 80 89}}
{{#rollTotal() test 100}}–2{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–1{{/rollBetween() test 90 99}}
{{#rollBetween() test target 89}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 89}}
{{#rollBetween() test 80 target}}+0{{/rollBetween() test 80 target}}
{{#rollBetween() test 70 79}}+1{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}+2{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}+3{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}+4{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}+5{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+6{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+7{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+8{{/rollBetween() test 1 9}}
{{/rollBetween() target 80 89}}
{{#rollBetween() target 70 79}}
{{#rollTotal() test 100}}–3{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–2{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–1{{/rollBetween() test 80 89}}
{{#rollBetween() test target 79}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 79}}
{{#rollBetween() test 70 target}}+0{{/rollBetween() test 70 target}}
{{#rollBetween() test 60 69}}+1{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}+2{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}+3{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}+4{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+5{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+6{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+7{{/rollBetween() test 1 9}}
{{/rollBetween() target 70 79}}
{{#rollBetween() target 60 69}}
{{#rollTotal() test 100}}–4{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–3{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–2{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–1{{/rollBetween() test 70 79}}
{{#rollBetween() test target 69}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 69}}
{{#rollBetween() test 60 target}}+0{{/rollBetween() test 60 target}}
{{#rollBetween() test 50 59}}+1{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}+2{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}+3{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+4{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+5{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+6{{/rollBetween() test 1 9}}
{{/rollBetween() target 60 69}}
{{#rollBetween() target 50 59}}
{{#rollTotal() test 100}}–5{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–4{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–3{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–2{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–1{{/rollBetween() test 60 69}}
{{#rollBetween() test target 59}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 59}}
{{#rollBetween() test 50 target}}+0{{/rollBetween() test 50 target}}
{{#rollBetween() test 40 49}}+1{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}+2{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+3{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+4{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+5{{/rollBetween() test 1 9}}
{{/rollBetween() target 50 59}}
{{#rollBetween() target 40 49}}
{{#rollTotal() test 100}}–6{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–5{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–4{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–3{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–2{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}–1{{/rollBetween() test 50 59}}
{{#rollBetween() test target 49}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 49}}
{{#rollBetween() test 40 target}}+0{{/rollBetween() test 40 target}}
{{#rollBetween() test 30 39}}+1{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}+2{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+3{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+4{{/rollBetween() test 1 9}}
{{/rollBetween() target 40 49}}
{{#rollBetween() target 30 39}}
{{#rollTotal() test 100}}-7{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–6{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–5{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–4{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–3{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}–2{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}–1{{/rollBetween() test 40 49}}
{{#rollBetween() test target 39}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 39}}
{{#rollBetween() test 30 target}}+0{{/rollBetween() test 30 target}}
{{#rollBetween() test 20 29}}+1{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}+2{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+3{{/rollBetween() test 1 9}}
{{/rollBetween() target 30 39}}
{{#rollBetween() target 20 29}}
{{#rollTotal() test 100}}–8{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–7{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–6{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–5{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–4{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}–3{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}–2{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}–1{{/rollBetween() test 30 39}}
{{#rollBetween() test target 29}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 29}}
{{#rollBetween() test 20 target}}+0{{/rollBetween() test 20 target}}
{{#rollBetween() test 10 19}}+1{{/rollBetween() test 10 19}}
{{#rollBetween() test 1 9}}+2{{/rollBetween() test 1 9}}
{{/rollBetween() target 20 29}}
{{#rollBetween() target 10 19}}
{{#rollTotal() test 100}}–9{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–8{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–7{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–6{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–5{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}–4{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}–3{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}–2{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}–1{{/rollBetween() test 20 29}}
{{#rollBetween() test target 19}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 19}}
{{#rollBetween() test 10 target}}+0{{/rollBetween() test 10 target}}
{{#rollBetween() test 1 9}}+1{{/rollBetween() test 1 9}}
{{/rollBetween() target 10 19}}
{{#rollBetween() target 1 9}}
{{#rollTotal() test 100}}–10{{/rollTotal() test 100}}
{{#rollBetween() test 90 99}}–9{{/rollBetween() test 90 99}}
{{#rollBetween() test 80 89}}–8{{/rollBetween() test 80 89}}
{{#rollBetween() test 70 79}}–7{{/rollBetween() test 70 79}}
{{#rollBetween() test 60 69}}–6{{/rollBetween() test 60 69}}
{{#rollBetween() test 50 59}}–5{{/rollBetween() test 50 59}}
{{#rollBetween() test 40 49}}–4{{/rollBetween() test 40 49}}
{{#rollBetween() test 30 39}}–3{{/rollBetween() test 30 39}}
{{#rollBetween() test 20 29}}–2{{/rollBetween() test 20 29}}
{{#rollBetween() test 10 19}}–1{{/rollBetween() test 10 19}}
{{#rollBetween() test target 9}}
{{#^rollTotal() test target}}–0{{/^rollTotal() test target}}
{{/rollBetween() test target 9}}
{{#rollBetween() test 1 target}}+0{{/rollBetween() test 1 target}}
{{/rollBetween() target 1 9}}