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

D100 Criticals, Specials and Fumbles

1467545890
David
Sheet Author
In most D100 games criticals and fumbles are based on a modified skill roll and then a d100 roll compared against various fractions of the modified skill.  In Call of Cthulhu a critical is modified skill/20 and  a special is modified skill/5.  Calculations cannot be done inside roll templates and from what I have found it is not possible to do something with the calling macro e.g. &{template:skillRoll} {{success=[[@{Bargain}+?{Mods|0}]]}} {{crit=[[success/20]]}}.  Anybody found any way around this.
1467548349
Finderski
Pro
Sheet Author
Compendium Curator
Not sure I fully understand the question, but roll templates have a lot of flexibility if the template uses the helper functions (e.g. rollWasCrit, rollTotal, rollGreater, rollBetween, etc). But to be clear, it's the HTML that would have to do the heavy lifting.  As an example, I'm currently working on the Stormbringer character sheet and this is how I'm accomplishing the success/failure stuff: <rolltemplate class="sheet-rolltemplate-sb"> <h2 class="sheet-caption">{{header}}</h2> <div class='sheet-template'> {{#roll}} <div class='sheet-templaterow'> <div class='sheet-left'> Roll: </div> <div class='sheet-right'> {{roll}} </div> </div> {{#target}} <div class='sheet-templaterow'> <div class='sheet-left'> Target: </div> <div class='sheet-right'> {{target}} </div> </div> <div class='sheet-templaterow'> <div class='sheet-left'> Result: </div> <div class='sheet-right' style='font-weight: bold;'> {{#rollLess() roll 2}}Critical Success!{{/rollLess() roll 2}} {{#rollGreater() roll 99}}Critical Failure!{{/rollGreater() roll 99}} {{#rollGreater() roll 1}} {{#rollBetween() roll 2 target}}Sucess!{{/rollBetween() roll 2 target}} {{/rollGreater() roll 1}} {{#rollLess() roll 100}} {{#rollGreater() roll target}}Failure!{{/rollGreater() roll target}} {{/rollLess() roll 100}} </div> </div> {{/target}} {{/roll}} {{#damage}} <div class='sheet-templaterow'> <div class='sheet-left'> Damage{{#dmgdice}} <span style='font-size: .75em;'>({{dmgdice}})</span>{{/dmgdice}}: </div> <div class='sheet-right'> {{damage}} </div> </div> {{/damage}} </div> </rolltemplate> To accomplish some of it, I need to use a bunch of nested helper functions, but...it's one way of checking things. Again, not sure I fully understand the question, so not sure if this helps...
1467548800

Edited 1467548940
David
Sheet Author
See your 2 and 99 they are not flat numbers even in Stormbringer they are calculated on the modified skill.  Goblintrain maybe using house rules of 01 is Critical and 00 is a fumble. It would be nice if we could do  {{#rollLess() roll traget/20}}Critical Success!{{/rollLess() roll target/20}} What defines a critical for rollWasCrit? I could not find a reference for that.
1467549608
Finderski
Pro
Sheet Author
Compendium Curator
Cool. Part of that problem could be me misunderstanding the system. I'll mess around and see how to get it to work (I'm sure we can). I'm not sure about your other question other than I believe it's the highest number on the die...
1467550035

Edited 1467550287
David
Sheet Author
I found the reference for criticals and fumbles but again they use flat numbers  /roll 1d100cs<10  When need something like /roll 1d100cs<@{Ugrepeh Sozopi|Bargain}/10 That would not work either because stormbringer has two levels of Criticals (Criticals and specials) and there is no way of doing two comparisons on the same die roll  .
1467550842
David
Sheet Author
I went back and checked the criticals and fumbles in Stormbringer I forgot they were changed. There is only one critical level (modified skill / 10) and fumble is a flat 00.  Other Basic Roleplay system are different.  Nonetheless the critical is still a variable number.
1467569215

Edited 1467569272
Lithl
Pro
Sheet Author
API Scripter
David said: When need something like /roll 1d100cs<@{Ugrepeh Sozopi|Bargain}/10 /roll 1d100cs<[[@{Ugrepeh Sozopi|Bargain}/10]] The RHS of the comparison has to be a single number, but an inline roll (or nested inline roll) makes the engine treat your roll or calculation as a single number.
1467569551

Edited 1467569590
To add to Brian's solution, note that Critical Success and Fumble Points only accept non-negative integers as arguments, so you'll likely want to add a rounding function to the inline roll. e.g. /roll 1d100cs<[[ floor(@{Ugrepeh Sozopi|Bargain}/10) ]]
1467570803

Edited 1467571321
David
Sheet Author
The result is not very informative I am guessing the colours mean something.   But it resolved something even better any way. I was missing the round up and down and I was obviously passing a decimal when I tried passing {{crit=[[@{Bargain}/20]]}}  to the roll template in the roll button value and it was throwing errors. But {{crit=[[ floor(@{Bargain}/20) ]]}} seems to have worked,  Thanks  Brin and Silvrye. Nope does not resolve it I need to pass an attribute+modifier twice something like  {{success=[[@{Bargain}+?{Mods|0}]]}} {{ crit=[[success/20]]}} {{ special=[[success/5]]}}
How about  {{success=[[@{Bargain}+?{Mods|0}]]}} {{ crit=[[(@{Bargain}+?{Mods|0})/20]]}} {{ special=[[(@{Bargain}+?{Mods|0})/5]]}}
1467574057

Edited 1467574165
David
Sheet Author
Silvyre said: How about  {{success=[[@{Bargain}+?{Mods|0}]]}} {{ crit=[[(@{Bargain}+?{Mods|0})/20]]}} {{ special=[[(@{Bargain}+?{Mods|0})/5]]}} That will mean three modifier dialogs popping up.  I think I have resolved by getting rid of ?{Mods|0} and instead putting an input on the form and than I can do the calculations from there.  {{special=[[ floor((@{Bargain}+@{mods})/5)]]}} {{crit=[[ floor((@{Bargain}+@{mods})/20)]]}} {{success=[[@{Bargain}+@{mods}]]}} That seems work just need to  find a good place for the input on the form. Thanks for the help.
1467574732

Edited 1467574767
David said: That will mean three modifier dialogs popping up. When you Submit a Roll Query (i.e. assign it a value), every following Roll Query that shares the same name is parsed to the value of the first. e.g. If you Submit the default value of ?{Mods|0}, all future Roll Queries named Mods will be parsed to 0. That said, only one Roll Query named 'Mods' will pop up if you try it out.
1467579289
David
Sheet Author
Yes that worked. The only thing was the spaces before crit and special the roll template could not find crit/special because of them.  I will re-post it here with them removed in case someone else needs it. {{success=[[@{Bargain}+?{Mods|0}]]}} {{crit=[[(@{Bargain}+?{Mods|0})/20]]}} {{special=[[(@{Bargain}+?{Mods|0})/5]]}} Thanks