Big math question about factoring in 2d6 bell curve to tables

:slight_smile: With 2d6 there are 36 possible results, with 7 being the most likely and 2/12 being least likely.
I was looking at this 2d6 table being put in, it corrisponds to a chart but rather than roll the dice and reference the chart, I could have both at once.
However the math is wrong, there are 11 results and it appears to be a flat chance for all values.

Is there a bulit in way of creating the bell curve of 2d6 where 7 is the most liekely number?

My only idea is, with 2d6 having 36 possible results, I could add 36 results to this table and duplicate them to create the propper odds, but that’s sligthly annoying.

Let me know!:slight_smile:

So I’ve added the 36 results, and it’s certainly better, but it still seems a bit off to me.

If you mean to obtain the result frequency of a 2d6 without using Vassal ‘s dice component then you want an expression thus:
{Random(6) + Random(6)}

On the other hand, you are using a Vassal dice component. Why is it configured to roll just one dice though?

I think you need to roll 2 dice. is there a property to give you the sum of the results?

If I use just: {Random(6) + Random(6)} It will give me a number between 2-12, but nothing else.
No text from the various numbers, just a sum of the 2 dice.
I’m tinkering with various inputs. Unsuccessful thus far.

I’m trying to get the 2d6 distribution with the report function.

How do I get it to also report the various text along with the {Random(6) + Random(6)}

The Random Text component that you were using doesn’t allow a set of dice to be aggregated, as you have found. It merely defines a single die with custom face (text or numbers) and allows you to roll multiples of those.

I’ve created a demo that I think does what you want. It defines the results table as set of Global Properties and then uses the Random() function to look them up from an Action Button, thus:
{GetProperty("result" + (Random(6) + Random(6)))}

There’s a folder in Global Properties containing the results table, you can export that from the demo and import it into the Global Properties folder in your own module. You can do similar with the Action Button or just copy the lookup expression into the Report field of an Action Button in your module.

2 Likes

I’m trying to grasp this, how do I use your demo? Do I add it to my module in the module editor?

To simply view the demo, open it from the Module Manager (it’s a zip file but that is all a .vmod is; if you still have issues, rename the file type to .vmod and retry).

To use the demo’s 2d6 feature in your module, first open the demo in the editor. Look in the Global Properties component and within the folder that is sitting in there. You need the properties defined there to be in your own module.

Likewise, the Action Button at the bottom of the demo module. You need to create the equivalent in your module.

Thank you so much! I got it to work:)

1 Like

36
{Random(6).toString()+Random(6).toString()+ " bingo!"}

2-12
{(Random(6)+Random(6)).toString()+ " bingo!"}

1 Like