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

WIP Nightlife character sheet – More sheet creation questions

1545483780

Edited 1545484084
Foemass
Sheet Author
I’ve been working on a character sheet for Nightlife , and have made decent progress, here’s a peek: However, I’m having an issue with combat rolls.     Combat rolls in Nightlife work by trying to roll under your combat skill’s score on a d100, with modifiers and auto success/auto failure ranges on the roll.   Which is achievable enough, this does the trick nicely: '/roll {1d100cs<1cf>96+?{Modifier|0}}<@{score}f>[[96+?{Modifier|0}]]' The problem comes with what’s meant to happen next.   Following a successful combat skill roll you need to calculate your damage modifier from that roll.   Which is:  ([Combat skill score] – [previous roll’s d100 result])/10   But unless I’m mistaken performing calculations with the dice result is beyond the capacities of a roll template. And I don’t want to stray into the dark forest of API scripts as I eventually want to make this sheet available for public use.   So basically, I just wanted to check if there’s a clever way I’ve missed to pull off this damage modifier calculation.   I get a bit OCD with these things, and it’s going to irritate me no end to have to exclude this one mechanic XD.  
1545484655

Edited 1545484750
GiGs
Pro
Sheet Author
API Scripter
Unfortunately your intuition is correct: you cannot do this without the API.  You can kind of achieve it, if you change the roll to an inline roll, like so:  &{template:whatever} {{roll=[[{1d100cs<1cf>96+?{Modifier|0}}<@{score}f>[[96+?{Modifier|0}]] ]]}} and pass it as a value to the rolltemplate. You can then use nested rollGreater and rollLess logic functions to show the number of successes. You'd need to alter the above formula so that it was the roll - skill (roll minus skill, or skill - minus roll), not roll < skill. That way you can use rollGreater and rollLess to check if it is less then 0, less than 10, less than 20, less than -10, less than -20, etc. The downside is you wont be able to show the actual dice roll as its own entity in the output.
You genius, that did the trick!  Thanks GiGs, that workaround is more than I had hoped for.  Shame they can't see the roll result, guess i'll add a debug option to see the damage modifier even on failed attacks, just so weird people like myself can see the gears turning.  (Its not quite the same just seeing Failure! shouted back at you ;) )  
1546614177
GiGs
Pro
Sheet Author
API Scripter
Great! :)