I have been trying to make an accurate average damage formula and have been running into some trouble.
so here are the things you know
number of dice
how many sides the dice have (assume all dice have the same number of sides and are not weighted)
a bonus added after the dice are rolled
resistance (a number multiplied after)
rounding (any number ending below .5 is rounded down else rounded up to the next integer)
What given all these things is the average damage of the weapon?
oh as an example that I did manually (I really want a formula can't do this for all resistances)
a 2d6 weapon firing against a resistance of .075 will do 21/36 average damage
average damage formula
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Crying is not a proper retort!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
not sure to understand what are you calculating:
a 2d6 weapon has an average damage of 6 (central point of the gaussian distribution)
every hit is multiplied by the resistance (0.075), but beacause the 12*0.075=0.9 (less than 1) and every hit less than 1 are rounded up to 1 (hit under 0.5 of damage are not rounded to 0 but to 1)
i say that : a 2d6 weapon firing against a resistance of .075 has an average damage of 1.
what i'm doing wrong ?
a 2d6 weapon has an average damage of 6 (central point of the gaussian distribution)
every hit is multiplied by the resistance (0.075), but beacause the 12*0.075=0.9 (less than 1) and every hit less than 1 are rounded up to 1 (hit under 0.5 of damage are not rounded to 0 but to 1)
i say that : a 2d6 weapon firing against a resistance of .075 has an average damage of 1.
what i'm doing wrong ?
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
the average damage of a 2d6 weapon is 7 it is just two random ranges of 1-6 so its 2*((1+2+3+4+5+6)/6) but that is without any rounding I don't know how to do it with rounding (at least a way other than the long way)
remember you don't round the average you round the individual results
remember you don't round the average you round the individual results
Crying is not a proper retort!
- Ttech
- Fleet Admiral
- Posts: 2767
- Joined: Tue Nov 06, 2007 12:03 am
- Location: Traveling in the TARDIS
- Contact:
Betelgeuse wrote:the average damage of a 2d6 weapon is 7 it is just two random ranges of 1-6 so its 2*((1+2+3+4+5+6)/6) but that is without any rounding I don't know how to do it with rounding (at least a way other than the long way)
remember you don't round the average you round the individual results
Let me make a converter and a calculator. So its a bit easier to do.

- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
if it is accurate I would be happy if you do it
Crying is not a proper retort!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
ok, what we know is:
considering a aDb+c dice throw
min damage: a+c
max damage: ab+c
average between max damage and min damage: (ab+a+2c)/2
now, we want to calculate 2 arrays, the first is the array with the list of all possible throw in order: lets call this a1
it start at a+c and finishes at ab+c
so
a+c, a+c+1, ..., ab+c-1, ab+c
how long is this array ? ab-a+1
now let's consider a second array (a2), as long as the first, and fill it with the corresponding values of the probability of the throw.
We discovered that we can calculate the values of the probability from the diagonals of the Pascal's triangle.
the values are exactly the values of the diagonal number a, up to the value b
The additional values, up to the half of the array lenght or half of the array leght +1 (if the array is odd) are calculated as : number of the pascal's triangle-(number of the 1st pascal triangle at the same diagonal*a), number of the pascal's triagle-(number of 2nd pascal triangle at the same diagonal*a)
moreover the sum of all the numbers of a2 = b^a
Example, step by step:
lets take 3d5 (aDb)
lenght of the array is: ab-a+1=13
a1=3,4,5,6,7,8,9,10,11,12,13,14,15
the a (so the third) pascal's triangle diagonal is: 1,3,6,10,15,21,28,36,....
so let's put the numbers of the diagonal up to b in the a2
a2=1,3,6,10,15,x,y,x,15,10,6,3,1
x will be 21-(a*1)=18
where 1 is the first number of the same diagonal
y will be 28-(a*3)=19
where 3 is the second number of the same diagonal
as a check of our calculations: 1+3+6+10+15+18+19+18+15+10+6+3+1=125
and 125 = 5^3 (b^a)
Resolved dices thows, as full examples:
2d6+1
3,4,5,6,7,8,9,10,11,12,13
1,2,3,4,5,6,5,4,3,2,1
3d6+1
4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
1,3,6,10,15,21,25,27,27,25,21,15,10,6,3,1
4d3
4,5,6,7,8,9,10,11,12
1,4,10,16,19,16,10,4,1
3d3
3,4,5,6,7,8,9
1,3,6,7,6,3,1
3d4
3,4,5,6,7,8,9,10,11,12
1,3,6,10,12,12,10,6,3,1
5d4
5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
1,5,15,35,65,101,135,155,155,135,101,65,35,15,5,1
Resources:
an interactive pascal's triangle
http://mathforum.org/dr.cgi/pascal.cgi?rows=20
considering a aDb+c dice throw
min damage: a+c
max damage: ab+c
average between max damage and min damage: (ab+a+2c)/2
now, we want to calculate 2 arrays, the first is the array with the list of all possible throw in order: lets call this a1
it start at a+c and finishes at ab+c
so
a+c, a+c+1, ..., ab+c-1, ab+c
how long is this array ? ab-a+1
now let's consider a second array (a2), as long as the first, and fill it with the corresponding values of the probability of the throw.
We discovered that we can calculate the values of the probability from the diagonals of the Pascal's triangle.
the values are exactly the values of the diagonal number a, up to the value b
The additional values, up to the half of the array lenght or half of the array leght +1 (if the array is odd) are calculated as : number of the pascal's triangle-(number of the 1st pascal triangle at the same diagonal*a), number of the pascal's triagle-(number of 2nd pascal triangle at the same diagonal*a)
moreover the sum of all the numbers of a2 = b^a
Example, step by step:
lets take 3d5 (aDb)
lenght of the array is: ab-a+1=13
a1=3,4,5,6,7,8,9,10,11,12,13,14,15
the a (so the third) pascal's triangle diagonal is: 1,3,6,10,15,21,28,36,....
so let's put the numbers of the diagonal up to b in the a2
a2=1,3,6,10,15,x,y,x,15,10,6,3,1
x will be 21-(a*1)=18
where 1 is the first number of the same diagonal
y will be 28-(a*3)=19
where 3 is the second number of the same diagonal
as a check of our calculations: 1+3+6+10+15+18+19+18+15+10+6+3+1=125
and 125 = 5^3 (b^a)
Resolved dices thows, as full examples:
2d6+1
3,4,5,6,7,8,9,10,11,12,13
1,2,3,4,5,6,5,4,3,2,1
3d6+1
4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
1,3,6,10,15,21,25,27,27,25,21,15,10,6,3,1
4d3
4,5,6,7,8,9,10,11,12
1,4,10,16,19,16,10,4,1
3d3
3,4,5,6,7,8,9
1,3,6,7,6,3,1
3d4
3,4,5,6,7,8,9,10,11,12
1,3,6,10,12,12,10,6,3,1
5d4
5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
1,5,15,35,65,101,135,155,155,135,101,65,35,15,5,1
Resources:
an interactive pascal's triangle
http://mathforum.org/dr.cgi/pascal.cgi?rows=20
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
to get the diagonal
all negative terms are 0
the 0 term is always 1
the nth term is the ∏ from i=1 to n of (a + i - 1)/i
lets do some pseudo code to fill out a2
lets define N(x,y) as the y term on the x diagonal
lets define the current terms index as t
lets define the array length as l
how does that look (might be an off by one error but that is the basic look)
all negative terms are 0
the 0 term is always 1
the nth term is the ∏ from i=1 to n of (a + i - 1)/i
Just to clarify this you can have more than two extra numbers they just follow the same pattern.number of the pascal's triangle-(number of the 1st pascal triangle at the same diagonal*a), number of the pascal's triagle-(number of 2nd pascal triangle at the same diagonal*a)
lets do some pseudo code to fill out a2

lets define N(x,y) as the y term on the x diagonal
lets define the current terms index as t
lets define the array length as l
Code: Select all
for every t up to and including l/2 - 1 + l%2
{
the t term is N(a,t)-(a*N(a,t-b))
the l - t - 1 term is the same as the t term
}
Last edited by Betelgeuse on Sun Mar 02, 2008 9:12 pm, edited 4 times in total.
Crying is not a proper retort!
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
I remember from a discussion in a weapon particles, that any damage less than 1 is always rounded to 1.
We should consider that in the calculator.
I don't know how the numbers >1 are rounded ingame, but I suppose transcendence rounds the numbers appropriately in defect or in excess as needed.
We should consider that in the calculator.
I don't know how the numbers >1 are rounded ingame, but I suppose transcendence rounds the numbers appropriately in defect or in excess as needed.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
not quite any numbers >=.5 are rounded up and anything else is rounded down. (at least on armor I don't think shields are different)
Crying is not a proper retort!