this post was submitted on 25 Feb 2025
83 points (97.7% liked)

rpg

4931 readers
8 users here now

This community is for meaningful discussions of tabletop/pen & paper RPGs

Rules (wip):

founded 3 years ago
MODERATORS
 

I made a web page where you can simulate a complex dice roll sequence with conditionals (e.g. re-roll when roll is a 1) using a Python-like syntax. (Click the "Toggle Syntax" button to view examples)

It needs a second to load because it has to load a Python interpreter in the background (I'm not good at web development) but once that's done, it works really well.

It's still very barebones and I still have to work out some problems.

Maybe some of you could use it, though.

There's also just the Python version available to run locally here

Everything is GPLv3, enjoy!

all 15 comments
sorted by: hot top controversial new old
[–] Wutchilli@feddit.org 12 points 2 years ago (1 children)

Nice Work, but did you forgot to link the Website?

[–] illectrility@sh.itjust.works 16 points 2 years ago* (last edited 2 years ago)

Yes, yes I did... It's here

Thank you for pointing that out

[–] AnExerciseInFalling@programming.dev 7 points 2 years ago (1 children)

This is super cool!

Does it support things like max/min to simulate advantage/disadvantage?

It would be really cool to mathematically compare different kinds of rolls, like the cascading dice damage post from a couple weeks ago (even if its not built into the notation, just writing out the logic by hand)

[–] illectrility@sh.itjust.works 6 points 2 years ago (1 children)

No, there is no advantage or disadvantage functionality. I made it purely for balancing, so finding out the average damage a character would do. In that case I would just write out all the different rolls the character would do when attacking and have the program calculate using that. It's pretty barebones

Still a very cool project! Fun to play around with

[–] neodc@sh.itjust.works 7 points 2 years ago (1 children)
[–] illectrility@sh.itjust.works 5 points 2 years ago* (last edited 2 years ago)

Pretty similar but I couldn't get re-rolls to work on there. That's the main reason I made this

[–] Kitathalla@lemy.lol 3 points 2 years ago (1 children)

Cool. I used to have an app that would do this and it was great to play with for various scenarios. Nice to see a website version.

[–] illectrility@sh.itjust.works 3 points 2 years ago (1 children)

What was the app called and is it still available?

[–] Kitathalla@lemy.lol 3 points 2 years ago (1 children)

No, it was oooold. Like, ipod touch old. It didn't make it past ios 5, I think. It's why I'm loving your webpage.

[–] illectrility@sh.itjust.works 3 points 2 years ago

Okay, would've been interesting to see

[–] jcr@jlai.lu 1 points 2 years ago (1 children)

I am working on a dice expression evaluator on my side, and I will certainly reuse your code if I can ! Thanks for giving the example, as a GNU enthusiast, it is very nice ! Great job making it work !

[–] illectrility@sh.itjust.works 1 points 2 years ago

Best of luck to you. I think my code is quite messy but if you can use any of it, feel free!