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

Making a CS count 2 successes

Ok API Guru's I've banged my head against the desk trying to figure this out all afternoon - and need some guidance please... Is there any way (API, Character Sheet, Macro, Rum for Jobu) to get a Critical Success to show 2 Successes instead of 1. I've seen a few posts that say "only using API" but not sure how to accomplish it. For example: /roll 3d20cf>20cs<1<10 or [[3d20cf>20cs<1<10]] will show green correctly for a 1, red for a 20, anything 10 and under gives a success - my end game is to have everything 1 and under show as 2 success. So a 1 + 9 + 15 should = 3 success (currently shows 2 successes) If this can be done with something already out there, please point me in the right direction, if this would need a brand new API maybe help point me to the some code magic that can make this happen?
1510620914
The Aaron
Pro
API Scripter
 Is what was rolled important or just the number of successes? You could do this with several tables. 
1510622426

Edited 1510622466
GrumpyOldDM
Sheet Author
Yeah I was trying to avoid the multi-table method as I was trying to get this to be set once and done via API or Character Sheet... macros (unless it can be done in 1) and tables are a bit more difficult to move from game to game  (for others that is, I could always copy a master game) but the idea is to make this super easy and friendly for anyone who uses the STA sheet 
1510623819
Silvyre
Forum Champion
I have a macro that may meet your needs.
1510694064

Edited 1510694800
Silvyre
Forum Champion
David said: As I understand the ceil rounds a number up - in it's simplistic form here is your roll as I see it: [[ {{ceil((?{Skill Check|15} - d20cs<?{Skill Check}cf<?{Focus|5}cf>20 + 1e-2) / (?{Skill Check} - ?{Focus})), {2}}kl1, {0}}kh1 ]] The only thing I still don't understand is that +1e-2 - what is this? 1e-2 is shorthand for 1 * 10^-2, which equals 0.01. Basically, it's just a small number I added in to ensure ensure that the macro outputs 1 when the d20 roll equals ?{Skill Check}, i.e. ceil((0 + 0.01) / (...)) = 1. Does that make sense?
1510695793

Edited 1510695952
GrumpyOldDM
Sheet Author
Thank you for fixing my post - not sure what happened there. The good news is I'm in business - the code seems to be working quite well now - and it didn't even require API so that will make all the Plus/Free users happy :P thanks for explaining Silvyre! Here is what I did for 2d20 (this time commented out less/great than symbols so it hopefully doesn't break the Forums) - in case others come looking: [[ {{ceil((15 - d20cs<1cf>20 + 1e-2) / (15 - 1)), {2}}kl1, {0}}kh1 ]] or as a easy macro that prompts for values: [[ {{ceil((?{Target Number|15} - d20cs<?{Crit Range|1}cf>?{Complication Range|20} + 1e-2) / (?{Target Number} - ?{Crit Range})), {2}}kl1, {0}}kh1 ]] Now Nesting it into a character sheet inside Queries 3 deep has been fun - but I finally got that done this afternoon.
1510722498
Silvyre
Forum Champion
Awesome!