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|
--]|
--<|
}}