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

Exploding Dice

A few questions is it possible to create a roll macro that can make certain dice ranges change colors in dice pool games, so if I explode on a 9-10 they both appear green, also would it be possible to make a macro that can allow you to mess with the number needed a duce success, so if you get a success on a 6-10, but have an ability that allows you to make it go down to 5-10. Thank you for any help you can give it is much appreciated
1630379598
timmaugh
Pro
API Scripter
Sure... [[20d10!>?{Explosion threshold?|8}cs>?{Explosion threshold?}]] That would roll 20d10, prompting you for the explosion threshold and using that same figure for the bar for a critical, which triggers your coloration. You could replace the 20 with a query for how many dice, and the d10 with a query for what sides... though you probably already know what that die type is supposed to be if you are in a die pool game.
The dice system is more success-based, the current macro we are working with is /r ?{target number 6|1}d10>6! it works but I was wondering if there is a more dynamic way you could modify the >6 could be a selected number, or have it be a selection like a -1 for that specific roll, main this is the macro you sent didn't have the successes show up
1630467415
timmaugh
Pro
API Scripter
I didn't quite understand some of the details in your last post (what is a "selection like a -1 for that specific roll"?)... however, here is an example of the same effect with exploding dice with a custom threshold, and using that threshold as the "success" bar and critical success (for getting the color): [[?{Dice|10}d10!>?{Explosion threshold|6}>?{Explosion threshold}cs>?{Explosion threshold}]]
That's actually pretty much what I was searching for for the most part. Only thing is, this macro only counts the exploding dice as a success, from the test rolls I have done. The dice system is roll Xd10 and each number above 6 is counted as a success, then on 10s, they explode into another dice. The number on the d10 can count as success can sometimes change from 6-10, to 5-10 depending on what is going on in combat, same with the explosion value, so it can be 10, but then shift to 9-10. Sorry if the wording of the previous post was difficult to understand, I didn't properly explain it, sorry about that.
1630525119
timmaugh
Pro
API Scripter
Hmm. There's still wiggle room in what you're describing. I can see you describing two different scenarios, and they need very different solutions. Scenario 1 Bunkai: You want to roll Xd10, designate whether they explode on a 9 or a 10, and designate whether a success should count as anything over a 6 or anything over a 5. You want your successes to be color coded to quickly show up as successes when you look at the roll-tip. Lastly, the explosion threshold (either 9 or 10) and success threshold (either 5 or 6) will remain the same for all dice thrown. You can achieve this one with something similar to what I posted, above, just changing the success threshold out to be something other than the explosion threshold: [[?{Dice|10}d10!>?{Explosion Threshold|10}>?{Success Threshold|6}cs>?{Success Threshold}]] That one would allow 1s to reduce your number of successes, though... so a roll of 8, 1, 4, 8, 7 would show as 3 successes rather than 4. If you need to stop the 1s from chipping away at your successes, you can do: [[?{Dice|10}d10!>?{Explosion Threshold|10}>?{Success Threshold|6}cs>?{Success Threshold}cf=0]] Scenario 2 Bunkai: You want to roll Xd10 under conditions where the first round of explosion could happen at 9 or 10, and after that further explosions might occur at a 9 or 10. Similarly, the first round of successes might count as a 5 or greater OR they might be at a 6 or greater, but further explosions might have a different threshold for success. If this is what you're looking for, the explosion threshold can't change between cycles of Roll20 throwing dice. That is, it can't be 10 for the first pass, but then 9 for the second pass. However, with the help of some metascripts, you can make that happen. This solution uses ZeroFrame and Plugger. If you needed to pull from the selected token the base number of dice to roll, you might also need SelectManager. !&{template:default}{{name=Roll Example}}{{Base Roll=[[?{Dice|10}d10!>?{Explosion Threshold|10}>?{Success Threshold|6}cs>?{Success Threshold}]]}}{{Final Adjusted=[\][\]$[[0]].value [Base Roll] + {&eval} getDiceByVal($[[0]] >=?{Explosion Threshold} all count){&/eval}d10!>?{Secondary Explosion Threshold|10}>?{Secondary Success Threshold|6}cs>?{Secondary Success Threshold}\]\] }}{&simple} Or, with the line breaks included for readability: ! &{template:default} {{name=Roll Example}} {{Base Roll=[[?{Dice|10}d10!>?{Explosion Threshold|10}>?{Success Threshold|6}cs>?{Success Threshold}]]}} {{Final Adjusted=[\][\]$[[0]].value [Base Roll] + {&eval} getDiceByVal($[[0]] >=?{Explosion Threshold} all count){&/eval}d10!>?{Secondary Explosion Threshold|10}>?{Secondary Success Threshold|6}cs>?{Secondary Success Threshold}\]\] }} {&simple} I put it in a roll template just to show the difference in the roll. Here is the output with the base roll's roll-tip expanded. This shows just the first values: Now, the same output, with the second roll expanded: You can see that in the base roll, the 9 did not explode, but both 10s did. In the final roll, the 9 did explode and the 5 did count as a success, because for this roll I instructed it to explode on 9s and count anything at or over 5 as a success.
The first one would be the one I am looking for, it's exactly what I needed thank you so much. Tho I was wondering if it is possible for you to have a set value for successes, and then be able to modify that set number. So if the target number is 6, and you roll 5 6 7 8, it will be 3 successes, but then you apply a -1 to the success value to make it 5 so in that example you would end up with 4 successes instead of 3. This would be done before you rolled, if it is not possible then don't worry about it, and thank you so much for the help, I really appreciate it and my players will be thrilled to see this new macro.
1630546747
timmaugh
Pro
API Scripter
Actually, that's super easy. Barely an inconvenience. This version locks in the base success number at 6, but it reads an attribute on the Kokoro character that you can use to track the floating combat mod for the success threshold (ie, a -1). [[?{Dice|10}d10!>?{Explosion Threshold|10}>[[6+@{Kokoro|AttackSuccessMod}]]cs>[[6+@{Kokoro|AttackSuccessMod}]]cf=0]] If the AttackSuccessMod is a -1, the threshold becomes a 5. You can update that attribute by hand or by using ChatSetAttr to modify the sheet, or by throwing a "combat mods" token on the table and linking one of the bars to that attribute, then either entering changes or using TokenMod to make changes. Not sure if the modifier is global, but if not you could have different attributes for different characters (their macros would pull from their own sheet -- or their entry on a mule character sheet), or for different types of rolls. The rolls themselves would just have to pull the correct modifier (the one specific to them). Another alternative, if you didn't want to have to track a combat mod attribute, would be to have a query that offered only the applicable results. For instance, if the mods could only ever be 0 (for a 6 or better), -1 (for 5 or better), or -2 (for 4 or better), then you could substitute in this query for those calls to the character sheet: ?{Combat Mod|0|-1|-2} And choose it every time. The default there would be 0.
1630601868

Edited 1630601961
Okay makes sense, thank you so much for the help I really appreciate it. I'll be going with the Query, mainly because it would make it a fair bit easier for me when I am DMing.