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

Creating compounding exploding dice count always the same

Hello There! I working on Sheet for my next game and i approach a problem with compound exploding dice. System is based on x10d's rolls. Of course they can compounding explode and the result is sum up. This is simple part where i don't have any problem. /r xD10!! - simple. But somethimes they can explode when roll is lower than 10 for example 9 or 8. /r xD10!!<9 - this part is plain too. But the rules say - "All exploding dice must count as 10" so when i roll 1D10!!<8 and have 8 (explode), 9 (explode) and 5 - the results is 8+9+5 but i need to be: 10+10+5. Anyone have any idea how to create something like this?
1642863316

Edited 1642863355
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'll need to use custom roll parsing . On mobile atm, or I'd post some demo code.
Ok, i read this and so... creating myself something like this is much above my skills. But thanks for helping
1643043906
David M.
Pro
API Scripter
Here is a Scriptcard that I think does what you are asking: !script {{ --#title|Custom Explode Example --=numDice|?{Number of d10's|3} --=thresh|?{Explodes on|10} --#leftsub|(explodes=10) --#rightsub|Threshold [$thresh.Raw] --=total|0 --&diceStr| --%LoopCounter|1;[$numDice];1 --=thisRoll|1d10 --?[$thisRoll.Total] -lt [$thresh.Total]|[ --&diceStr|+[$thisRoll] --=total|[$total]+[$thisRoll] --]|[ --&diceStr|+[$thisRoll] --=total|[$total]+10 -->Explode| --]| ​ --%| --+Rolls|[&diceStr] ​ --+Grand Total|[$total] ​--X| ​--:Explode| ​--=explodeDie|1d10 --?[$explodeDie.Total] -lt [$thresh.Total]|[ --&diceStr|+([$explodeDie.Raw]) --=total|[$total]+[$explodeDie] --]|[ --&diceStr|+([$explodeDie.Raw]) --=total|[$total]+10 -->Explode| --]| ​--<| }} Example output. Base rolls are highlighted, bonus dice from explosions follow in parentheses Example1: roll 4d10 base dice, explodes on 9 or greater Example2: roll 3d10 base dice, explodes on 6 or greater
1643044321
David M.
Pro
API Scripter
Dang I just realized you were asking about doing this within a sheet. Mine is just a standard macro using the Scriptcards api script.
1643060401

Edited 1643062974
If it could be create in this API - i will be fair enough for me. But this what you created is not what i needed - ok, to be fair not exacly what i needed. This work propertly but after roll i need keep highest sum up (in example 1 - this will be 9(10)+9(10)+6 =24(26) ). That was a mistake that i don't mentioned about keep highest before...
1643063644
David M.
Pro
API Scripter
Oh, so if rolling 4d10 (explode 9) like in example one, you only take the highest subtotal? The first 9 counts as 10, then explodes, rolling another 9 (counting as 10 again), and exploding again to roll a 6. Subtotal1 = 26 . The 2nd base die was a 10, which exploded for a 3. Subtotal2 = 13 . The 3rd and 4th base dice were 8 and 7. Subtotal3 = 8, Subtotal4 = 7 So, the actual roll total is only 26 (the highest subtotal)? _______ Assuming that is the case, try this out: !script {{ --#title|Custom Explode Example --=numDice|?{Number of d10's|3} --=thresh|?{Explodes on|10} --#leftsub|(explodes count as 10) --#rightsub|Threshold [$thresh.Raw] --=highestTotal|0 --%LoopCounter|1;[$numDice];1 --=thisRoll|1d10 --?[$thisRoll.Total] -lt [$thresh.Total]|[ --&diceStr[&LoopCounter]|+[$thisRoll] --=subTotal[&LoopCounter]|[$subTotal[&LoopCounter]]+[$thisRoll] --]|[ --&diceStr[&LoopCounter]|+[$thisRoll] --=subTotal[&LoopCounter]|[$subTotal[&LoopCounter]]+10 -->Explode| --]| ​ --?[$subTotal[&LoopCounter]] -gt [$highestTotal]|=highestTotal;[$subTotal[&LoopCounter]] --%| --%LoopCounter|1;[$numDice];1 --+Roll[&LoopCounter]|[&diceStr[&LoopCounter]] [b]= [/b][$subTotal[&LoopCounter]] --%| ​ --+Roll Result|[$highestTotal] ​--X| ​--:Explode| ​--=explodeDie|1d10 --?[$explodeDie.Total] -lt [$thresh.Total]|[ --&diceStr[&LoopCounter]|+([$explodeDie.Raw]) --=subTotal[&LoopCounter]|[$subTotal[&LoopCounter]]+[$explodeDie] --]|[ --&diceStr[&LoopCounter]|+([$explodeDie.Raw]) --=subTotal[&LoopCounter]|[$subTotal[&LoopCounter]]+10 -->Explode| --]| ​--<| }}
Yeap, if i can't do this in sheet this will be working perfect. A lot of thanks (btw. my namesake) David :D