H
HamsterBoo
Guest
-note- This tutorial is used for the purpose of balancing a map with bash and figuring out just how useful your bash is in combat -note-
Calculating Real Damage Per Second With Bash
Explenation of why I have done this
When a unit has bash, it is difficult to calculate exactly how useful that bash is. The problem lies in the fact that it is useless to calculate DPS leaving stun time out and is difficult to calculate it with stun time in.
DPS is simple without bash because it is merely a reflection of how much damage on average you do per hit (plus any modifiers) divided by your attack cooldown. With bash, your opponent is stunned part of the time you are fighting, resulting in him taking more damage, but no way to express that damage in DPS.
This is merely an equation of how to calculate how much the bash actually improves your DPS.
Equation
Min=minimum damage, Max=Maximum damage, Cd=Cool down, Db=Damage bonus, C=Chance of bash, Bl=Bash length, No=Number of opponents
((Min/2+Max/2)/Cd+Db/Cd*C)/(1-(C/Cd*Bl/No))
This is the average hit damage
This makes it the average DPS
This adds the average DPS of the bonus damage from bash
This is the average time/second your enemy will be stunned
This makes it so you divide by the amount of time the enemy is NOT stunned as opposed to the opposite
This changes the average enemy stunned time to suit how many opponents you have (1v1 ur opponent may effectively be stunned for 4/10 seconds, but 1v2 its 2/10, 1v4 its 1/10, etc.
Heres the equation for people who want to include everything in the RDPS (critical strike, bonuses to damage, % chance to deal damage) without calculating it themselves.
Min=minimum damage, Max=Maximum damage, Cd=Cool down, Db=Bash damage bonus, C=Chance of bash, Bl=Bash length, No=Number of opponents, Cm=Critical strike multiplier, Cc=Chance of critical strike, B=bonus damage (items)
((Min/2+Max/2+B+(Min/2+Max/2+B)*(Cm-1)*Cc+C*Db)/Cd)/(1-(C/Cd*Bl/No))
This is for those who want to include critical strike.
-Note: If you have a skill with a% chance of dealing X damage, just add another of the stanza C*Db to the right of the original where C is the % chance and Db is the damage bonus of the skill.
How to use equation
1. You can't have RDPS without average damage, so calculate your average damage (include EVERYTHING (including abilities, bonuses, etc). You do this by adding your maximum damage and minimum damage and then dividing by two (in equation it is distributed), then adding any bonuses (orbs, claws of attack, critical strike, +% damage, etc.).
-Note: for calculating how much bonus damage critical strike does, its (Average Damage)*((Damage Multiplier)-1)*(Chance of Critical Strike)
-Example: Average damage=10, 10% chance of 5 times critical hit does (10)*((5)-1)*(.1)=4 damage, meaning on average you do 14 damage per hit.
2. To make your average damage per hit average damage per second, divide it by your attack cooldown. The formula for this is (Base attack speed)*(100/(100+(bonuses)+(agility)*(bonus per agility point)*100)
-Example: Base attack speed=1.5, bonuses=+20% and +10%, agility=70, bonus per agility point=.01%: (1.5)*(100/(100+(20+10)+(70)*(.01)*100)=1.5*(100/(130+70)=.75
3. Next you need to add the bonus damage of the bash to your average damage. The equation for this (included above) is (bonus damage of bash)*(chance of bash)/(attack cooldown)
-Note: this equation can be used for any % chance of bonus damage
-Example: Bonus damage=25 (normal), Chance of bash=10%, attack cooldown=.5: (25)*(.1)/(.5)=5 average bonus damage per second
4. This is where the whole thing gets tricky. You have to take the average time your enemy is stunned per second (Bash length)*(chance of bash)/(attack cooldown) which is included in the equation. This is only against 1 opponent though, so divide by the number of opponents you are facing to get the effective average stun time (20 seconds of stun vs 2 opponents is the equivalent of 10 seconds that both of them are stunned). You want to make sure that you divide your total DPS by the time your enemy is NOT stunned however, subtract average stun time per second from 1.
Example: Lets assume that a unit does 10 damage per second, 1 hit per second, and has a 10% chance of bash which lasts 1 second. In 100 seconds, the unit stuns 10 times, leading to 20 seconds of the enemy being stunned. The unit does 800 damage while the enemy is not stunned and 200 damage while the enemy is stunned. If you take the 200 damage and spread it over the time enemy is not stunned you get 2.5 damage for each second, plus the 10 damage you already had, equaling 12.5 Real Damage Per Second.
However, if you are fighting 2 opponents, stunning 1 for 20 seconds is the equivalent of stunning both for 10 seconds each. 900 damage normally and 100 damage while the enemy is stunned. Spread out the 100 damage over 90 seconds and you get about 1.1, meaning you do 11.1 Real Damage Per Second.
The equation does the same thing, but over a period of 1 second, not 100.
5. Your done, normal DPS has been divided by the amount of time per second your opponent is not stunned (if he is stunned 1 second or more (mathematical, not practical) out of 1 second, you do infinite damage (dividing by 0 equals infinity), if he is never stunned, you do normal DPS).
Heres an unexplained walkthrough/example
Lets assume out unit does 10-24 damage with an attack cooldown of .5 and a 2 second 10% bash that deals 25 bonus damage.
First, find the DPS without bash. (10/2+24/2)/.5=34
Then, calculate the DPS of the damage bonus. 25/.5*.1=5
Calculate total DPS. 34+5=39
Chance of bash/second. .1/.5=.2
Average time spent bashed. .2*2=.4
Real DPS vs 1 opponent. 39/(1-.4)=65
Real DPS vs 2 opponents. 39/(1-(.4/2))=48.75
Real DPS vs 3 opponents. 39/(1-(.4/3))=45
Real DPS vs 4 opponents. 39/(1-(.4/4))=43.33
Real DPS vs 5 opponents. 39/(1-(.4/5))=42.39
Real DPS vs 10 opponents. 39/(1-(.4/10))=40.63
Real DPS vs 20 opponents. 39/(1-(.4/20))=39.80
Real DPS vs 50 opponents. 39/(1-(.4/50))=39.31
Real DPS vs 100 opponents. 39/(1-(.4/100))=39.16
The reason the RDPS decreases when you are against more opponents is that this method takes the damage that is done when your opponent is stunned and adds it to the damage when the unit is not stunned. The problem with this is that when you have more opponents the effectiveness of the bash is lessened. The equation for multiple opponents only works when the opponents are the same. It is possible to calculate if they are different, but it is not useful or easy.
For those of you familiar with graphing, this is basically a graph with a Y asymptote on 39 and an X asymptote on 0 (although it is impossible to have points in between integers of the X).
Suggestions for choosing # of opponents when balancing (the less opponents you choose, the lower his base damage must go for him to be balanced)
In a melee map your hero will be fighting with a team, so 2-4 opponents is most likely, so choose 3 for # of opponents.
In an RPG with spell immune bosses, its probably more like 4-6 opponents, so choose 5 for # of opponents.
In an RPG without spell immune bosses, its 1 or 4-6 opponents, so 2 is probably best to keep him from owning bosses.
-Note: to balance it out a little better, it would be best to give the boss some support units and choose 3 or 4 for # of opponents
In a AOS map, it will be about 1-3 opponents, but choose 1 or 2 for # of opponents (or he will become too good a hero-killer)
In general, just figure out about how many opponents will be teaming the hero at once and choose the middle number (non-integer values work BTW)
Edit: added in the /No in (I forgot it in first version
Edit2: added a sort of walkthrough for the equation
Edit3: added in another equation which is a tiny bit different (but ultimately the same) and includes the equation for critical strike
Calculating Real Damage Per Second With Bash
Explenation of why I have done this
When a unit has bash, it is difficult to calculate exactly how useful that bash is. The problem lies in the fact that it is useless to calculate DPS leaving stun time out and is difficult to calculate it with stun time in.
DPS is simple without bash because it is merely a reflection of how much damage on average you do per hit (plus any modifiers) divided by your attack cooldown. With bash, your opponent is stunned part of the time you are fighting, resulting in him taking more damage, but no way to express that damage in DPS.
This is merely an equation of how to calculate how much the bash actually improves your DPS.
Equation
Min=minimum damage, Max=Maximum damage, Cd=Cool down, Db=Damage bonus, C=Chance of bash, Bl=Bash length, No=Number of opponents
((Min/2+Max/2)/Cd+Db/Cd*C)/(1-(C/Cd*Bl/No))
This is the average hit damage
This makes it the average DPS
This adds the average DPS of the bonus damage from bash
This is the average time/second your enemy will be stunned
This makes it so you divide by the amount of time the enemy is NOT stunned as opposed to the opposite
This changes the average enemy stunned time to suit how many opponents you have (1v1 ur opponent may effectively be stunned for 4/10 seconds, but 1v2 its 2/10, 1v4 its 1/10, etc.
Heres the equation for people who want to include everything in the RDPS (critical strike, bonuses to damage, % chance to deal damage) without calculating it themselves.
Min=minimum damage, Max=Maximum damage, Cd=Cool down, Db=Bash damage bonus, C=Chance of bash, Bl=Bash length, No=Number of opponents, Cm=Critical strike multiplier, Cc=Chance of critical strike, B=bonus damage (items)
((Min/2+Max/2+B+(Min/2+Max/2+B)*(Cm-1)*Cc+C*Db)/Cd)/(1-(C/Cd*Bl/No))
This is for those who want to include critical strike.
-Note: If you have a skill with a% chance of dealing X damage, just add another of the stanza C*Db to the right of the original where C is the % chance and Db is the damage bonus of the skill.
How to use equation
1. You can't have RDPS without average damage, so calculate your average damage (include EVERYTHING (including abilities, bonuses, etc). You do this by adding your maximum damage and minimum damage and then dividing by two (in equation it is distributed), then adding any bonuses (orbs, claws of attack, critical strike, +% damage, etc.).
-Note: for calculating how much bonus damage critical strike does, its (Average Damage)*((Damage Multiplier)-1)*(Chance of Critical Strike)
-Example: Average damage=10, 10% chance of 5 times critical hit does (10)*((5)-1)*(.1)=4 damage, meaning on average you do 14 damage per hit.
2. To make your average damage per hit average damage per second, divide it by your attack cooldown. The formula for this is (Base attack speed)*(100/(100+(bonuses)+(agility)*(bonus per agility point)*100)
-Example: Base attack speed=1.5, bonuses=+20% and +10%, agility=70, bonus per agility point=.01%: (1.5)*(100/(100+(20+10)+(70)*(.01)*100)=1.5*(100/(130+70)=.75
3. Next you need to add the bonus damage of the bash to your average damage. The equation for this (included above) is (bonus damage of bash)*(chance of bash)/(attack cooldown)
-Note: this equation can be used for any % chance of bonus damage
-Example: Bonus damage=25 (normal), Chance of bash=10%, attack cooldown=.5: (25)*(.1)/(.5)=5 average bonus damage per second
4. This is where the whole thing gets tricky. You have to take the average time your enemy is stunned per second (Bash length)*(chance of bash)/(attack cooldown) which is included in the equation. This is only against 1 opponent though, so divide by the number of opponents you are facing to get the effective average stun time (20 seconds of stun vs 2 opponents is the equivalent of 10 seconds that both of them are stunned). You want to make sure that you divide your total DPS by the time your enemy is NOT stunned however, subtract average stun time per second from 1.
Example: Lets assume that a unit does 10 damage per second, 1 hit per second, and has a 10% chance of bash which lasts 1 second. In 100 seconds, the unit stuns 10 times, leading to 20 seconds of the enemy being stunned. The unit does 800 damage while the enemy is not stunned and 200 damage while the enemy is stunned. If you take the 200 damage and spread it over the time enemy is not stunned you get 2.5 damage for each second, plus the 10 damage you already had, equaling 12.5 Real Damage Per Second.
However, if you are fighting 2 opponents, stunning 1 for 20 seconds is the equivalent of stunning both for 10 seconds each. 900 damage normally and 100 damage while the enemy is stunned. Spread out the 100 damage over 90 seconds and you get about 1.1, meaning you do 11.1 Real Damage Per Second.
The equation does the same thing, but over a period of 1 second, not 100.
5. Your done, normal DPS has been divided by the amount of time per second your opponent is not stunned (if he is stunned 1 second or more (mathematical, not practical) out of 1 second, you do infinite damage (dividing by 0 equals infinity), if he is never stunned, you do normal DPS).
Heres an unexplained walkthrough/example
Lets assume out unit does 10-24 damage with an attack cooldown of .5 and a 2 second 10% bash that deals 25 bonus damage.
First, find the DPS without bash. (10/2+24/2)/.5=34
Then, calculate the DPS of the damage bonus. 25/.5*.1=5
Calculate total DPS. 34+5=39
Chance of bash/second. .1/.5=.2
Average time spent bashed. .2*2=.4
Real DPS vs 1 opponent. 39/(1-.4)=65
Real DPS vs 2 opponents. 39/(1-(.4/2))=48.75
Real DPS vs 3 opponents. 39/(1-(.4/3))=45
Real DPS vs 4 opponents. 39/(1-(.4/4))=43.33
Real DPS vs 5 opponents. 39/(1-(.4/5))=42.39
Real DPS vs 10 opponents. 39/(1-(.4/10))=40.63
Real DPS vs 20 opponents. 39/(1-(.4/20))=39.80
Real DPS vs 50 opponents. 39/(1-(.4/50))=39.31
Real DPS vs 100 opponents. 39/(1-(.4/100))=39.16
The reason the RDPS decreases when you are against more opponents is that this method takes the damage that is done when your opponent is stunned and adds it to the damage when the unit is not stunned. The problem with this is that when you have more opponents the effectiveness of the bash is lessened. The equation for multiple opponents only works when the opponents are the same. It is possible to calculate if they are different, but it is not useful or easy.
For those of you familiar with graphing, this is basically a graph with a Y asymptote on 39 and an X asymptote on 0 (although it is impossible to have points in between integers of the X).
Suggestions for choosing # of opponents when balancing (the less opponents you choose, the lower his base damage must go for him to be balanced)
In a melee map your hero will be fighting with a team, so 2-4 opponents is most likely, so choose 3 for # of opponents.
In an RPG with spell immune bosses, its probably more like 4-6 opponents, so choose 5 for # of opponents.
In an RPG without spell immune bosses, its 1 or 4-6 opponents, so 2 is probably best to keep him from owning bosses.
-Note: to balance it out a little better, it would be best to give the boss some support units and choose 3 or 4 for # of opponents
In a AOS map, it will be about 1-3 opponents, but choose 1 or 2 for # of opponents (or he will become too good a hero-killer)
In general, just figure out about how many opponents will be teaming the hero at once and choose the middle number (non-integer values work BTW)
Edit: added in the /No in (I forgot it in first version
Edit2: added a sort of walkthrough for the equation
Edit3: added in another equation which is a tiny bit different (but ultimately the same) and includes the equation for critical strike