PDA

View Full Version : Player Help I need a fancy dice roller



Lestrange
2018-04-24, 12:04 PM
My friends and I are doing a 20th-level game to close out the year, with the most broken homebrew we can find. It's always a good time, but I've run into a problem. The character I've made deals 5d12+10d10+5d6 points of damage on a hit. They get to re-roll all 1s and 2s once, and any die that gets the highest result explodes, adding another die of the same type.
Obviously I don't want to take too much time on my turns, so I'd like suggestions on a dice-rolling app that could handle this complex calculation for me. Or if anyone has made a program for something similar, could you pass it along?

claddath
2018-04-24, 03:51 PM
If you have python installed on your laptop you could use this code to do it. It's quick and dirty, but it does the job. Plus it tells you all the rolls and rerolls so you can see the exploded dice/rerolled 1's and 2s.



from random import *
def dieroll(type):
return(randint(1,type))

def massroll(num, type):
rt = 0
for i in range(0,num):
r = dieroll(type)
print("roll:" + str(r))
if r < 3:
r = dieroll(type)
print("reroll:" + str(r))
x = r
while (r == type):
r = dieroll(type)
print("plusroll:" + str(r))
x = x + r
rt = rt + x
return rt

print("Total :" + str(massroll(5,12) + massroll(10,10) + massroll(5,6)))


*Edit to remove unused variable.

Goaty14
2018-04-24, 05:23 PM
If you have python installed on your laptop you could use this code to do it. It's quick and dirty, but it does the job. Plus it tells you all the rolls and rerolls so you can see the exploded dice/rerolled 1's and 2s.

If you don't have python on your laptop, you could run a google search (https://www.google.com/search?q=python+code+runner&rlz=1C1CHBF_enUS725US725&oq=python&aqs=chrome.1.69i57j35i39l2j0l3.2056j0j7&sourceid=chrome&ie=UTF-8) to find online (https://trinket.io/python) programs (http://www.skulpt.org) to do it for you.

Lvl 2 Expert
2018-04-24, 05:33 PM
I have a free phone app (Android, in my case) called CritDice. It allows you to use longer strings of dice, reuse recent die combinations and save them as favorites. It has a dN function for giving up your own number of sides as well if you're rolling something really unusual. I think the number of favorites I can save is limited and such, because there is a payed version of the app, but it's worth looking into.

Lestrange
2018-04-24, 11:06 PM
Thanks so much, everyone! I think the python code will work!