Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Help adding 3rd result option to Roll Template.

I posted before trying to work out a roll template that will display "success" or "failure" after calculating a roll...and thanks to the fine folks that made the KAMB character sheet, I was able to do that. My current conundrum is that I would like to add a third printable option for critical failure/fumble (which would be on a result of 100 on the roll only). I have tried multiple times, and for the life of me I just end up breaking the template. Base die rolling mechanic for the game is to roll a d100 against a target # and roll equal to or lower, with a result of 100 always being a fumble.  Here is my modified KAMB roll template, any help with adding a crit fail/fumble result to the success/failure conditionals would be appreciated. (note there is a nested success/failure conditional that I added, that does function properly, I don't need to change that as it works properly). <!-- roll template attribute--> <rolltemplate class="sheet-rolltemplate-attribute">     <table class="sheet-rolltemplate-attribute">         {{#name}}<tr><th>{{name}}</th></tr>{{/name}}         {{#subheader}}<tr><td class="sheet-subheader">{{subheader}}</td></tr>{{/subheader}}                          {{#roll}}                 <tr><td><span class="sheet-tcat">{{roll}}</span></td></tr>         {{/roll}}                  {{#success}}             {{#rollLess() roll success }}                 <tr><td><span class="sheet-tcat sheet-green">Success!</span></td></tr>                 {{#damage}}                 {{#roll2}}                 <tr><td><span class="sheet-tcat">{{roll2}}</span></td></tr>         {{/roll2}}                  {{#success2}}             {{#rollLess() roll2 success2 }}                 <tr><td><span class="sheet-tcat sheet-green">Crit! Convert Bruises to Wounds</span></td></tr>             {{/rollLess() roll2 success2 }}         {{/success2}}         {{#fail2}}             {{#rollGreater() roll2 fail2 }}                 <tr><td><span class="sheet-tcat sheet-red">No Crit!</span></td></tr>             {{/rollGreater() roll2 fail2 }}         {{/fail2}}                     <tr><td><span class="sheet-tcat">{{damage}}</span></td></tr>                 {{/damage}}             {{/rollLess() roll success }}         {{/success}}         {{#fail}}             {{#rollGreater() roll fail }}                 <tr><td><span class="sheet-tcat sheet-red">Failure!</span></td></tr>             {{/rollGreater() roll fail }}         {{/fail}}         </table> </rolltemplate> examples of what the output looks like: Here is an example of the button macro related to the template: <button name="weapon" type="roll" title="weapon roll" value='&{template:attack} {{name=@{character_name} }} {{subheader=Fires @{weaponname} }} {{success=[[@{agility}+1]] }} {{fail=[[@{agility}]] }} {{roll=Roll:[[[[1d100]] +?{Modifier|0}]] vs [[@{agility}]]}}  {{damage=Damage:[[@{weapondamage}]]  Hit Location=[[1t[Hit-Location]]]}}'></button> Attack There are three separate roll tables in the sheet: attribute, skill, attack (due to subtle differences in what needs to be displayed by each).               
Answering my own question: <!-- roll template attribute--> <rolltemplate class="sheet-rolltemplate-attribute">     <table class="sheet-rolltemplate-attribute">         {{#name}}<tr><th>{{name}}</th></tr>{{/name}}         {{#subheader}}<tr><td class="sheet-subheader">{{subheader}}</td></tr>{{/subheader}}                          {{#roll}}                 <tr><td><span class="sheet-tcat">{{roll}}</span></td></tr>         {{/roll}}                  {{#success}}             {{#rollLess() roll success }}                 <tr><td><span class="sheet-tcat sheet-green">Success!</span></td></tr>                 {{#damage}}                 {{#roll2}}                 <tr><td><span class="sheet-tcat">{{roll2}}</span></td></tr>         {{/roll2}}                  {{#success2}}             {{#rollLess() roll2 success2 }}                 <tr><td><span class="sheet-tcat sheet-green">Crit! Convert Bruises to Wounds</span></td></tr>             {{/rollLess() roll2 success2 }}         {{/success2}}         {{#fail2}}             {{#rollGreater() roll2 fail2 }}                 <tr><td><span class="sheet-tcat sheet-red">No Crit!</span></td></tr>             {{/rollGreater() roll2 fail2 }}         {{/fail2}}                     <tr><td><span class="sheet-tcat">{{damage}}</span></td></tr>                 {{/damage}}             {{/rollLess() roll success }}         {{/success}}         {{#fail}}             {{#rollBetween() roll success 99 }}                 <tr><td><span class="sheet-tcat sheet-red">Failure!</span></td></tr>             {{/rollBetween() roll success 99 }}         {{/fail}}         {{#fumble}}             {{#rollTotal() roll fumble 100 }}                 <tr><td><span class="sheet-tcat sheet-red">Fumble!</span></td></tr>             {{/rollTotal() roll fumble 100 }}         {{/fumble}}                  </table> </rolltemplate> Roll button markup: <button name="attribute" type="roll" title="attribute roll" value='&{template:attribute} {{name=@{character_name} }} {{subheader=Tests their Muscle }} {{success=[[@{muscle}+1]] }} {{fail=[[@{muscle}]] }} {{fumble=[[{100}]] }} {{roll=Roll:[[[[1d100]] +?{Modifier|0}]] vs [[@{muscle}]]}}'></button>                 Muscle: <input type='number' name='attr_Muscle' value='0'> Creates a result of "Success" if under target #, "Failure" if over target and below 100, "Fumble" if exactly 100.