*
*
Home
Help
Login
Register
Welcome, Guest. Please login or register.
August 19, 2022, 04:13:49 AM

Login with username, password and session length
Forum changes: Editing of posts has been turned off until further notice.
Search:     Advanced search
275647 Posts in 27717 Topics by 4285 Members Latest Member: - Jason DAngelo Most online today: 68 - most online ever: 565 (October 17, 2020, 02:08:06 PM)
Pages: [1] 2 3
Print
Author Topic: Dice distribution calculator  (Read 12614 times)
Jasper Flick
Member

Posts: 161


WWW
« on: May 01, 2009, 03:47:00 AM »

I made a little online calculator for dice distributions and like to share it: http://catlikecoding.com/dice/

You can use any linear combination of dice, like 1d6, 2d10, or 1d6 + 6d10 - 2d100.

It's useful if you want to see the impact of changing your dice.

There are probably others out there too, but I couldn't find them. Those I did find used random numbers, not the real mathematical distributions, which I use.

This isn't first thoughts for a RPG itself, but I suppose this is the best place to put it.

Logged

Trouble with dice mechanics? Check out AnyDice, my online dice distribution calculator!
zmobie
Member

Posts: 26


« Reply #1 on: May 01, 2009, 05:10:02 AM »

this is really nice. Thanks!
Logged
Egonblaidd
Member

Posts: 91


« Reply #2 on: May 01, 2009, 02:00:52 PM »

Interesting little tool.  You can even put in dice types that don't exist, like d49's or d10000's (it takes a loooooooong time to load that one).  Some things you might want to think about adding: dice multiplication and division, like if you roll two dice and then multiply them together, in fact, you might want to think about non-additive dice handling in general.  Say I roll 3d6 and I want each one to individually come up as greater than 4, say.  So if all are greater than 4 I have 3 successes, if only two are greater than 4 then I only have two successes (which may mean I don't succeed, or don't succeed well).  So you could have the user enter a "difficulty", and it would calculate the probabilities that X dice would come up greater than (or less than or whatever) that difficulty.  Another one would be the probability of rolling so many dice with the same number (doubles, triples, quadruples, etc.).  That sort of thing.  Obviously there will always be new ways to read dice to get a result, but if you could include some of the more common ones like I listed then that would be helpful.

Still, it's helpful as is.  It's definitely going in my bookmarks, I will want to fiddle around with it later.
Logged

Phillip Lloyd
<><
mjbauer
Member

Posts: 115


« Reply #3 on: May 01, 2009, 09:06:54 PM »

Great tool. Really useful.

Thanks.
Logged

mjbauer = Micah J Bauer
Jasper Flick
Member

Posts: 161


WWW
« Reply #4 on: May 02, 2009, 03:15:58 AM »

Nice suggestions. Egonblaidd!

Smiley Sure, nonexistent dice are no problem. Using d10000s is asking a lot though! But I think it's fast enough for all practical purposes. 100d100 runs in about ten second, which is funny to try out by the way.

Are there any games that use something like 1d4 * 1d6? Anyway, it's a funny idea and not hard to do, so I'll add it.

How would you deal with divisions in a game? 1d4 / 1d6 can produce nonintegers like 3/5. I think actually doing the math at the table is painful and slow, so you would probably want to use the numbers as they are. Which means you would use the mathematical division to represent something completely different. Something like 1/4 meaning 1 for succes and 4 for effectiveness. Like a D&D attack / damage roll: 1d20 / 1d6. Hey, that's actually pretty sweet. Ok, division is in too!

This calculator deals with totals, not successes. I could do a success distribution too, but that would have to be a separate calculator. Might do that later.

Chances of rolling doubles and triples is easy to calculate, but requires its own calculator as well.

Granted, I could combine it all into one general purpose calculator, but I'm not building a spreadsheet program, just simple calculators.

Glad I could be of use!
Logged

Trouble with dice mechanics? Check out AnyDice, my online dice distribution calculator!
Seamus
Member

Posts: 106


WWW
« Reply #5 on: May 02, 2009, 07:01:25 AM »

This is a cool program. Very helpful. Anything like it for a system built on successes with multiple dice (like vampire).
Logged

Bedrock Games
President
BEDROCK GAMES
Egonblaidd
Member

Posts: 91


« Reply #6 on: May 02, 2009, 07:17:11 AM »

Logged

Phillip Lloyd
<><
Egonblaidd
Member

Posts: 91


« Reply #7 on: May 02, 2009, 07:42:51 AM »

One last note I wanted to make, as someone that's interesting in designing video/computer games as well as RPGs, something like this can also be quite useful for probability calculation.  A random number generator is essentially a, well, a real die, or rather the other way around, but on a computer a random number generator is like rolling a die, but you aren't limited by what type of dice you can physically obtain, nor are you as restricted in the sorts of formulas that use dice, since the computer does the work.  You can use non-real dice like d33's in a program if you wanted to.  You could use 100d100, even though it would be impractical to roll a d100 a hundred times.  So those interested in random number generation for computer programs can also make great use of this tool.

By the way, if you know what you're doing, you can also use this for cards.  For example, in a standard deck of 52 cards with four suites, you have a 1.92% chance of getting any particular card (1d52) and a 7.69% chance of getting a particular value of any suite (1d13).  Cards do work slightly differently, as you only get one result (per draw), but multiples exist.  Say you have a deck with two sixes and four tens (maybe it's a standard deck, but two of the sixes are already in play while none of the tens are), you can't really model that as a dice roll because dice are assumed to have exactly one of all integers between (including) 1 and their number of sides.  If you really wanted to work with cards, especially if you're using custom cards (like a monster deck for a trading card game) rather than a standard deck, then it would probably be easiest to just make a spreadsheet to compute probabilities.  It wouldn't really be that difficult, either.  If there are X of this particular card, and Y total cards, then the chance of getting that card is X/Y.

What if you had multiple decks?  I suppose "standard" card games are "1c52", but you could do something like 2c52, draw from two separate decks!  Of course, if the cards are just the cards, then it's exactly like drawing from one deck, but twice (not twice from the same deck, just like drawing once from a single deck, but twice), but if the card values are combined then it's more like rolling dice.  Drawing a six and a four to get a "result" of ten (rather than two separate results of six and four) is like rolling two dice and getting a six and a four.
Logged

Phillip Lloyd
<><
Jasper Flick
Member

Posts: 161


WWW
« Reply #8 on: May 03, 2009, 10:10:08 AM »

Whoa man, you're rambling indeed! This is no quantum mechanics, just dice probabilities. Anway, welcome to Probability 101 I guess.

Ok, I've put in a decent parser and now you can insert stuff like "2d4 + (1d3 * 2d6 - 1)". So a Fudge die is simply "(1d3-2)".

So yea, now you can multiply dice too!

I've thought some more about proper division and it just doesn't make sense. It's also a pain to implement fractions, so I won't. Integer division might work, but I don't see it getting used in a game.

Actually, the division example I posted earlier is not a division at all, but a cartesian product. I'll see if I include that.
Logged

Trouble with dice mechanics? Check out AnyDice, my online dice distribution calculator!
Jasper Flick
Member

Posts: 161


WWW
« Reply #9 on: May 03, 2009, 12:42:34 PM »

Cartesian product added! You use it like "2d4 x 2d4". If you combine multiplications and cartesian products you can get some wacky graphs.
Logged

Trouble with dice mechanics? Check out AnyDice, my online dice distribution calculator!
Egonblaidd
Member

Posts: 91


« Reply #10 on: May 03, 2009, 01:50:28 PM »

That's some really cool stuff.  The Cartesian product can generate some bizarre probabilities, for example 2d3x2d3x2d3x2d3 looks like a sine wave whose amplitude is also a sine wave, etc.  And multiplication and Cartesian products together result in what looks like a random distribution of probability.

I'm already getting some ideas on how I could use Cartesian products for resolutions.  Essentially, it would be something like rolling separate sets of dice for damage and hit location/to-hit.  I could even have separate dice pools for attributes and skill that are rolled together, like a simultaneous skill and attribute test.  As an example, in combat you need to be both skilled enough and fast enough to hit your opponent, though practically you'd want to roll them together probably.  Although, that might be a way of tying skills and attributes together, rather than saying "difficulty is attribute + skill" or "attribute * skill", instead you'd test both the attribute and the skill simultaneously and try to cover the shortcomings of one with the other (i.e. level up a skill really high that depends on a low attribute).  Maybe you aren't as fast as your opponent, but maybe your skill allows you to anticipate his movements so you can have your weapon already moving to where he will be when you hit him.

Anyway, like I said, a really cool tool.  Just fiddling around with it gives me ideas of things I could do.
Logged

Phillip Lloyd
<><
Jasper Flick
Member

Posts: 161


WWW
« Reply #11 on: May 04, 2009, 07:13:49 AM »

Good it's spurring your imagination!

Some results might look weird, but the distributions really aren't haphazard. It sure gets hard to read though. I've alleviated this a bit by removing all "holes" from the display. So "1d2*1d2" won't show an empty row for 3. Now something like "1d4*1d4x1d4*1d4" looks more pleasing.

I also fixed a bug in the "<=" & ">=" table. Because the distributions of a multiplication is almost always asymmetrical, the assumption of a symmectrical distribution was no longer valid. So now I check whether it's asymmetrical, in which case I split the table in two.

The funny thing about the cartesian product is that it combines dice, but keeps the results seperate. So you didn't just roll an 8, you specifically rolled a 6 and a 2. You can use this to count successes. So I'll be adding that after all!
Logged

Trouble with dice mechanics? Check out AnyDice, my online dice distribution calculator!
chance.thirteen
Member

Posts: 210


« Reply #12 on: May 04, 2009, 09:07:59 AM »

After a brief looksee at the math behind it, wouldn't counting successes and thing liek roll 4d6 keep the highest 3d6 be signidicantly more difficult?

If you could ever make an application that could caluclate 4d8 + highest 2 of 5d12, I would love you forever.

Also is there a way to have zero be the lowest result of a calcluation, such as d10-5, min 0?
Logged
Egonblaidd
Member

Posts: 91


« Reply #13 on: May 04, 2009, 09:50:59 AM »

If you wanted a d10 that went from 0 to 9, you could do 1d10-1.
Logged

Phillip Lloyd
<><
chance.thirteen
Member

Posts: 210


« Reply #14 on: May 04, 2009, 10:28:42 AM »

I want a die that reads: 0 0 0 0 0 1 2 3 4 5


Likewise a really nice function would be one of absolute value. EG |1d6-1d6|

4d6 take the highest 3d6 is my most desired

Logged
Pages: [1] 2 3
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Oxygen design by Bloc
Valid XHTML 1.0! Valid CSS!