njlyon0 / dndR

Dungeons & Dragons Functions for Players and Dungeon Masters
https://njlyon0.github.io/dndR/
Other
16 stars 2 forks source link

pst.. want more dice? #19

Open oganm opened 2 months ago

oganm commented 2 months ago

I wrote the diceSyntax package a while back but never submitted it to cran. It allows for defining more complex dice rolls while also letting you calculate the probabilities. I haven't been maintaining the R version for some time but did end up re-writing it for another language to have more rigid checks to syntax and a few more features. it is mostly based on roll20 syntax.

if interested i could backport the missing bits from the newer version and it could be a mostly drop in replacement for the roll function minus the reroll parameter (rerolling would be part of the syntax with more flexibility "1d10ro<2") without breaking anything else

njlyon0 commented 2 months ago

Thanks for reaching out about this and I definitely like the idea of more dice!

Could you say more about how it differs from the current roll function?

I'm thinking if it does support more nuanced rolling syntax I'd call it advanced_roll when it's in this package to make it intuitively clear how it differs from the standard roll function.