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

Reference a rollable fumble table

1432074388

Edited 1432075885
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I am trying to wrap my brain around putting in the "rollwasafumble" command so that it references my fumble table "Fumble-REFLEX-(Combat)" <div style="width:75%"><button type='roll' style="width:30px" value='&{template:ranged} {{skill= @{WeaponSkill} }} {{character= @{Handle} }} {{weapon= @{WeaponName} }} {{target-token_name= at @{target|token_name} }} {{attack= [[1d10!+@{Weaponskill}+@{WA}+@{Ref}+@{Modifier-total}+?{Modifier|0}]] }} {{damage= [[@{WeaponDamage}]] }}{{hit-location= [[1t[Hit-Location]]] }}} {{notes= @{WeaponNotes} }} {{short-range= [[@{WeaponRange}/4]] }} {{medium-range= [[@{WeaponRange}/2]] }} {{long-range= [[@{WeaponRange}]] }} {{extreme-range= [[@{WeaponRange}*2]] }} } '></button> <span>Super sexy, ultra-chrome button that requires a rollable table lablled 'Hit-Location'</span></div> Just not figuring thus out? The template is below <rolltemplate> <table> <tr> <th colspan="2">{{weapon}}</th> </tr> <tr> <td colspan="2"><i><b>{{character}}</b> attacks with {{weapon}} {{target-token_name}}</i></td> </tr> <tr> <td colspan="2"><b>Range</b></td> </tr> <tr> <td style="padding-left:10px"><i>Close (15)</i></td> <td>{{short-range}}meters</td> </tr> <tr> <td style="padding-left:10px"class="sheet-noborder"><i>Medium (20)</i></td> <td>{{medium-range}}meters</td> </tr> <tr> <td style="padding-left:10px"class="sheet-noborder"><i>Long (25)</i></td> <td>{{long-range}}meters</td> </tr> <tr> <td style="padding-left:10px"class="sheet-noborder"><i>Extreme (30)</i></td> <td>{{extreme-range}}meters</td> </tr> <tr> <td colspan="2"><span><b>Attack:</b> </span>{{attack}} </td> </tr> {{#damage}} <tr> <td colspan="2"><span><b>Damage:</b> </span>{{damage}} </td> </tr> {{/damage}} <tr> <td colspan="2"><span><b>Hit Location:</b> </span>{{hit-location}}</td> </tr> <tr> <td colspan="2"><span><b>Notes:</b> </span>{{notes}}</td> </tr> </table> </rolltemplate>
1432075857
The Aaron
Roll20 Production Team
API Scripter
It would be something of the form: &{template:rollwasafumble} {{weapon="something"}} {{character=@{character_name} }} ... For each of the {{ }} quantities in the rolltemplate.
1432076224
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I sorta follow So in my table I have: 1-4 No fumble. You just screw up. 5 You drop your weapon. and so on but I am not following does it go in a template or the button?
1432076415
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
My code FU is not so fu.
1432076771
The Aaron
Roll20 Production Team
API Scripter
Where are you wanting that table to go? If you have a Rollable Table with those values, you can put them in the rolltemplate with something like: &{template:rollwasafumble} {fumble=[[1t[Fumble-REFLEX-(Combat)] ]] }} ... You'd need a {{fumble}} somewhere in the rolltemplate to receive them.
1432076870

Edited 1432076964
Diana P
Pro
Sheet Author
It goes in the template. ie: <rolltemplate class="sheet-rolltemplate-SampleRoll"> <table> {{#checkroll}} <tr class="sheet-tr-repeating"><td colspan="2">{{check}} {{checkroll}} </td></tr> <tr class="sheet-tr-repeating"><td colspan="2"> {{#rollWasCrit() checkroll}} {{critroll}} {{/rollWasCrit() checkroll}} {{#rollWasFumble() checkroll}} {{fumbleroll}} {{/rollWasFumble() checkroll}} </td></tr>{{/checkroll}} {{#notes}}<tr><td colspan="2"><span class="tcat">{{notes}}</span></td></tr>{{/notes}} </table> </rolltemplate> This checks the checkroll for whether it was a fumble or a crit and displays the fumbleroll or critroll depending. I can call that with something like: &{template:SampleRoll} {{check= This is an attack:}} {{checkroll=[[d20cs>18cf<3 +5]]}} {{fumbleroll=Fumble:[[d20]]}} {{critroll= You got a Crit!}} {{notes=Your results may vary; crits and fumbles not guaranteed.}} So the call goes in the button.
1432078181
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
So now the template shows the fumble table roll everytime the ranged attack button is used is there a way to only show a fumble table roll only when a critical faillure "1" is rolled?
1432081180
Diana P
Pro
Sheet Author
That's what this line: {{#rollWasFumble() checkroll}} {{fumbleroll}} {{/rollWasFumble() checkroll}} does. If the checkroll has a fumble in it (whether it's a 1 or you adjust that with the cf<x , it will display whatever fumbleroll is set to.
1432123956
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
1432124482
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
In case your wondering this is for my cyberpunk game Edge of the Night @Diana - where in my button and template would this go? <button type='roll' style="width:30px" value='&{template:ranged} &{template:rollwasafumble} {{skill= @{WeaponSkill} }} {{character= @{Handle} }} {{weapon= @{WeaponName} }} {{target-token_name= at @{target|token_name} }} {{attack= [[1d10!+[[@{Weaponskill}]] + [[ @{Ref} ]] + @{WA} + [[@{Modifier-total} ]]+?{Modifier|0}]] }} {{damage= [[@{WeaponDamage}]] }}{{hit-location= [[1t[Hit-Location]]] }} {{fumble=[[1t[Fumble-REF-Combat]]]}} {{notes= @{WeaponNotes} }} {{short-range= [[@{WeaponRange}/4]] }} {{medium-range= [[@{WeaponRange}/2]] }} {{long-range= [[@{WeaponRange}]] }} {{extreme-range= [[@{WeaponRange}*2]] }} } '></button The weapon ranges are for Player reference, for now. I have plans to have target roll automatically calculated based on the token to target measured distance. <rolltemplate> <table> <tr> <th colspan="2">{{weapon}}</th> </tr> <tr> <td colspan="2"><i><b>{{character}}</b> attacks with {{weapon}} {{target-token_name}}</i></td> </tr> <tr> <td colspan="2"><b>Range</b></td> </tr> <tr> <td style="padding-left:10px" ><i>Close (15)</i></td> <td>{{short-range}}meters</td> </tr> <tr> <td style="padding-left:10px"><i>Medium (20)</i></td> <td>{{medium-range}}meters</td> </tr> <tr> <td style="padding-left:10px"><i>Long (25)</i></td> <td>{{long-range}}meters</td> </tr> <tr> <td style="padding-left:10px"class="sheet-no_border"><i>Extreme (30)</i></td> <td>{{extreme-range}}meters</td> </tr> <tr> <td><span><b>Attack:</b> </span> </td> <td>{{attack}} </td> </tr> {{#damage}} <tr> <td><span><b>Damage:</b> </span> <td>{{damage}} </td> </tr> {{/damage}} <tr> <td><span><b>Hit Location:</b> </span> <td>{{hit-location}}</td> </tr> <tr> <td colspan="2"><span><b>Notes:</b> </span><i>{{notes}}</i></td> </tr> <tr> <td colspan="2"><span><b>Fumble:</b> </span><i> {{fumble}}</i></td> </tr> </table> </rolltemplate>
1432136415
Diana P
Pro
Sheet Author
Your roll template should look like: <rolltemplate class="sheet-rolltemplate-ranged"> <table> <tr> <th colspan="2">{{weapon}}</th> </tr> <tr> <td colspan="2"><i><b>{{character}}</b> attacks with {{weapon}} {{target-token_name}}</i></td> </tr> <tr> <td colspan="2"><b>Range</b></td> </tr> <tr> <td style="padding-left:10px" ><i>Close (15)</i></td> <td>{{short-range}}meters</td> </tr> <tr> <td style="padding-left:10px"><i>Medium (20)</i></td> <td>{{medium-range}}meters</td> </tr> <tr> <td style="padding-left:10px"><i>Long (25)</i></td> <td>{{long-range}}meters</td> </tr> <tr> <td style="padding-left:10px"class="sheet-no_border"><i>Extreme (30)</i></td> <td>{{extreme-range}}meters</td> </tr> <tr> <td><span><b>Attack:</b> </span> </td> <td>{{attack}} </td> </tr> {{#damage}} <tr> <td><span><b>Damage:</b> </span> <td>{{damage}} </td> </tr> {{/damage}} <tr> <td><span><b>Hit Location:</b> </span> <td>{{hit-location}}</td> </tr> <tr> <td><span></span></td> </tr> <tr> <td colspan="2"><span><b>Notes:</b> </span><i>{{notes}}</i></td> </tr> {{#rollWasFumble() attack}}<tr> <td colspan="2"><span><b>Fumble:</b> </span><i> {{fumble}}</i></td> </tr>{{/rollWasFumble() attack}} </table> </rolltemplate> I gave it the name ranged so you can call it by name (and have more than one if you wish) and added the rollWasFumble() helper around the fumble line. If 'attack' is not a fumble, that line will not even show up. your button is then: <button type='roll' style="width:30px" value='&{template:ranged} {{skill= @{WeaponSkill} }} {{character= @{Handle} }} {{weapon= @{WeaponName} }} {{target-token_name= at @{target|token_name} }} {{attack= [[1d10!+[[@{Weaponskill}]] + [[ @{Ref} ]] + @{WA} + [[@{Modifier-total} ]]+?{Modifier|0}]] }} {{damage= [[@{WeaponDamage}]] }}{{hit-location= [[1t[Hit-Location]]] }} {{fumble=[[1t[Fumble-REF-Combat]]]}} {{notes= @{WeaponNotes} }} {{short-range= [[@{WeaponRange}/4]] }} {{medium-range= [[@{WeaponRange}/2]] }} {{long-range= [[@{WeaponRange}]] }} {{extreme-range= [[@{WeaponRange}*2]] }} } '></button> basically just remove the &{template:rollwasafumble} call; you don't need it and I don't know what it would do for your lay out, having multiple templates references (esp one that doesn't exist).
1432140382
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I cannot thank you enough!!! thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you
1432141693
Diana P
Pro
Sheet Author
:) You are welcome.