# Math Inquiry



## Aizar (Mar 21, 2011)

O, Great NTs, I need your intellectual prowess.

I'm trying to design a rolling system for an RPG. I'm having some problems with balance issues.

Short explanation of the context--when the people in this game get in battle, the battle gets broken down into a series of attacks. For each attack, both the attacker and the defender roll from a random number generator. Whoever gets higher, "wins", meaning if the attacker wins, the defender gets hit. If the defender wins, the attack misses, is deflected, etc.

The number you roll out of for the attack changes depending on how powerful you are. Right now, my partners are proposing this: 



> Civilian 100
> Apprentice 150
> Journeyman 200
> Adept 250
> ...


Other suggestions were made for adding on the bonus to the rolls to the RESULT rather than what the number rolled out of. I think this too unbalanced, as we don't want these battles to be foregone conclusions, we just want to give people with higher skills an edge in the combat.

I replied with the below. 



> I think the differences between the tiers should be a lot smaller. Run these things through a random generator test and see how often the tiers beat each other. Then adjust accordingly.
> 
> Numerically, differences of 100 are ENORMOUS. You don't need it to be that enormous. Ideally, the difference between the highest tier and the lowest tier should be the same as the average roll. And the distant from the lowest tier from 0 should be 75% or more of the average roll.
> 
> ...


Can you double-check my logic on this? Or add in any other random thoughts you might have on how to go about balancing an RPG combat system. Muchly appreciated!


----------



## very bored (Jul 6, 2009)

Full disclosure: I prefer games that favor stats over random numbers.



> I think the differences between the tiers should be a lot smaller. Run these things through a random generator test and see how often the tiers beat each other. Then adjust accordingly.
> 
> Numerically, differences of 100 are ENORMOUS. You don't need it to be that enormous. Ideally, the difference between the highest tier and the lowest tier should be the same as the average roll.


I think I agree with the above part, but why do you think this?


> And the distant from the lowest tier from 0 should be 75% or more of the average roll.


----------



## Aizar (Mar 21, 2011)

very bored said:


> Full disclosure: I prefer games that favor stats over random numbers.


So do I, but for this we wanted something very simplistic--able to be memorized without referring to a character sheet somewhere simplistic. 



> I think I agree with the above part, but why do you think this?


Thinking this out...

The numbers above are what you roll out of. If you rolled out of 75, 75 is the highest result possible, and most results will be a lot less than that. If your lowest tier was 30 with an average of 100, your highest would be 130. Keeping that average with those parameters pushes the weight of the tiers in different directions. In the 30 example, the higher tiers would be a lot closer together. So where you place that % depends on how you want the skill gain to curve. And I'm not sure what would be most realistic there.


----------



## very bored (Jul 6, 2009)

I would push the maximum rolls for all the higher tiers down, closer to the middle, but if the average maximum roll is going to be 100, and the minimum maximum roll is 75, you get a tier list like this one

tier 1 75
tier 2 83
tier 3 91
tier 4 100
tier 5 108
tier 6 116
tier 7 125

(but the average of these numbers isn't 100...)


and with a random number generator, I got
tier 1 42	65	32	66	58	10	40	42	39	65
tier 2 35	73	43	30	25	33	69	51	48	8
tier 3 29	46	74	17	23	43	28	38	17	68
tier 4 *99	*11	14	59	3	54	*95	*52	69	71
tier 5 60	*78	*53	*98	106* 53	54	10	69	2
tier 6 *87	*23	31	12	*83	*29	40	57	31	72
tier 7 7	51	23	48	44	62	*123	107	76* 60

Bolded numbers are the ones that the bottom tier could never beat.


----------



## Coppertony (Jun 22, 2011)

One thing to try (and I don't know how feasible this is in a table-top game) would be to have the random numbers be sampled out of a bell curve or a pseudonormal distribution, rather than giving each value in the range the same likeliness. So, from a range of 0 - 100, getting a 50 out would be more likely than getting a 25 or a 75, which would correspondingly be more likely than getting a 0 or 100. This would preserve a sense of randomness, while keeping different strength values tangibly different.


----------



## Aizar (Mar 21, 2011)

So all tiers would have the 0-100 range, but the lowest tier would be more likely to roll a 25 say, with the highest tier more likely roll a 75? (And everything in between for the other tiers). Do you know the math formula that would do that?


----------



## Coppertony (Jun 22, 2011)

Aizar said:


> So all tiers would have the 0-100 range, but the lowest tier would be more likely to roll a 25 say, with the highest tier more likely roll a 75? (And everything in between for the other tiers). Do you know the math formula that would do that?


I mean something like this:








Normal distribution - Wikipedia, the free encyclopedia

So, suppose we had 2 tiers, a tier I (mean = 50, sd = 10) and a tier II (mean = 60, sd = 10). 

For tier I, 68.2% of the rolls would be within the range of mean +- sd, or (50-10, 50+10) = (40,60). Then 95% of the rolls would be within the range of mean +- 2*sd, or (30,70).

For tier II, the same proportions of the rolls would be within ranges of (50,70) and (40,80).

Plus, you can play around with the standard deviation if you want, so that some tiers might be 'riskier' and have more rolls that deviate from the mean and some other tiers would be 'safer' and have rolls that tend to be around the mean but are less likely to get very high or very low rolls.

Does that kind of make sense? Sampling from distributions is built into most math/statistical packages like MATLAB or Mathematica, I know there are free packages for Python and probably Java. Graphing calculators too. oh, and wolphramalpha.com


----------



## Aizar (Mar 21, 2011)

Yes, it does make sense. Hm. I do like that.


----------



## Psychosmurf (Aug 22, 2010)

Aizar said:


> So all tiers would have the 0-100 range, but the lowest tier would be more likely to roll a 25 say, with the highest tier more likely roll a 75? (And everything in between for the other tiers). Do you know the math formula that would do that?


Top tier: (1/Sqrt( 2 Pi (15^2))) Exp[- ((x-75)^2)/(2 (15^2))]

Bottom tier: (1/Sqrt( 2 Pi (15^2))) Exp[- ((x-25)^2)/(2 (15^2))]

The formula gives you the probability that a roll will result in the number x. So, for the top tier, the probability that someone would roll 75 would be = (1/Sqrt( 2 Pi (15^2))) Exp[- ((x-75)^2)/(2 (15^2))] = 0.026

The probability, while low, is due to the relatively high probabilities of the neighbors of 75.

EDIT: I changed it a bit because it seemed too sharp. You might wanna tweak the number 15 a bit and see where that gets you.


----------

