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!

  • peto (he/him)@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 months ago

    Finally, a stat generation method for powergamers.

    Can it do White-Wolf style dice? What if say, I had a pool of 14, and could re-roll up to 4 failures?

      • peto (he/him)@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        6 months ago

        For the sake of complexity, any non-1 failures. And ones cancel successes without reducing to zero. I don’t need the solution, just if it currently can handle that kind of thing.

        Edit: can it handle if I don’t use all those rerolls in the first round of rerolls, but can in subsequent rounds, eg, I only get 3 failures, and I then re-roll a re-roll.

        • illectrility@sh.itjust.worksOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          6 months ago

          I believe it doesn’t handle any of that right now. I admittedly only play D&D so that’s the use-case I based this on. The scenario you’re describing sounds really complex and I have no idea how I would implement that kind of functionality currently

          • peto (he/him)@lemm.ee
            link
            fedilink
            English
            arrow-up
            2
            ·
            6 months ago

            Fair enough. It’s not like I really play those kinds of games much anymore. I do kind of miss the mechanical intricacies though, rather than the middle ground we are in today.

            I might have a go at the problem myself now you have recalled it to mind.

            • illectrility@sh.itjust.worksOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              6 months ago

              I wish you best of luck. Feel free to re-use any of my code if you think it could be helpful. Even though in my opinion it is a huge mess

    • illectrility@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      Well, I had a look at anydice.com but I couldn’t get re-rolls to work. So I made this specifically with re-roll functionality in mind. All in all they’re pretty similar, though.

  • naught101@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 days ago

    Heh, I just but one of these for myself, but for the specific “best 2 out of 4d6” the game I’m playing uses. Pretty interesting.

    Made me realise that as long as you’re free to adjust the success threshold(s), every action dice roll mechanic is basically equivalent (because you can quantile map the threshold to get approximately the same probabilities).

    Doesn’t hold for damage, I guess.