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 .
×

Extra text if a certain die rolls the a specific number.

So I'm trying to set up for a game of Kagegami High, but the character sheet currently rolls attribute rolls completely wrong. The thing is, I can see why they did it the way they did it because I can't figure out how to roll it correctly. So here is the way it should work: You roll a number of dice equal to the attribute (for instance, @{athletics}) 1 is a 1d6-1, any additional dice are 1d6. All of these dice are added together. Overall this part isn't the hard part. That is just 1d6-1 + the (stat -1)d6 The challenging part is that if the 1d6-1 rolls a 0, then it should alert the player as that means something weird is going to happen. Any way to do this?
1587176462
GiGs
Pro
Sheet Author
API Scripter
You could do  /roll 1d6-1 + [[{@{athletics}-1,0}kh1]]d6cf0 This rolls the first die, and by default, roll20 will color a die red if you roll the minimum value - which is also when d6-1. So that satisfies your need of an indicator. After the + it rolls the attribute-1d6 and adds them, and there are several things to note here: This part: {@{athletics}-1,0}kh1 takes the score -1, or 0, whichever is larger. It's done this way because just using stat-1, a 0 stat would cause -1 dice to be rolled. if you know the stats will aways be 1 or higher, so that never happens, you can simplify it to /roll 1d6-1 + [[@{athletics}-1]]d6cf0 The [[ ]] around athletics-1 is an inline roll: it forces that number to be calculated, so it can be used in calculations or here, as the number of dice. The end of the code d6cf0 says d6 with with critical failure of 0. This means if any of the dice show a zero, they'll be colored red. Since that cant happen, they'll never be colored red.  By default, roll20 also colors dice green if they roll the maximum value. If you want to avoid that, you can add cs7 to the dice, like so /roll 1d6cs7-1 + [[@{athletics}-1]]d6cs7cf0
1587176846
GiGs
Pro
Sheet Author
API Scripter
Note that you cant have extra text as such if you roll a certain number - roll20 doesnt support that natively. The method I illustrated is probably the only way to achieve this effect available to free users. Since you're a Pro user, you could also create an API script, or check  out the Power Cards script which probably can do this.
Thanks! I didn't realize you could set the critical failure range, knowing that really changes things! that really helped a lot.