
I'm really struggling to implement the Helper Functions in the Wiki into my roll template. Hoping someone can advise (or show me something better). As it stands, my template displays the PC's name, the test they are making, the number of successes (6s on d6s) and the number of failures. All good. Button code: <button class="blank-roll-button" type="roll" value="&{template:fear} {{name=@{roller}}} [[ @{log}+?{Bonus dice|0} - [[ [[{@{log}+?{Bonus dice|0},1}kh1]]d6>6]] ]] {{result=$[[1]]}} {{fails=$[[2]]}} {{roll_name=FEAR (?{Fear Level|0})}}" name="roll_fearCheck">...</button> Roll-template code: <rolltemplate class="sheet-rolltemplate-fear"> <table> <tr><th>{{name}}</th></tr> <tr><th>{{#roll_name}} {{roll_name}}{{/roll_name}}</th></tr> <td class="result">{{result}} Successes {{fails}} Failures</td> </table> </rolltemplate> What I want to add is some text and the solution to the sum ?{Fear Level} - {{result}} on the condition that ?{Fear Level} > {{result}} , but nothing if not. Any attempt I make to implement a Helper Function, like {{#rollLess() <rollname>}} just breaks the template completely.