Turret damage

From EVE University Wiki
Revision as of 15:02, 3 September 2010 by Naara elein (talk | contribs) (→‎Governing Equation: added an explanation on what x^a is for those who don't know, to make the math less scary)
Jump to: navigation, search
This article is a stub. You can help the UniWiki by expanding it.
This is a work in progress. Some parts need to be rewritten, things will be added and the layout is not complete.

EVE relies on math to determine the outcome of events, like all computer games. A player can develop a feel for the inner workings of the game by experience and practice over time. Such knowledge is often powerful and can tip the balance in pvp encounters. Some, but not all, of this practical knowledge stems from an intuitive understanding of the math behind the scenes.

This article will look into the math that controls gunnery. Hopefully this will provide insights into the mechanics of damage-dealing that could take many months to develop otherwise. The content is based on math rather than experience, to ensure that the information is as objective and unbiased as possible, and that the reader can verify everything that is written here independently.

Governing Equation

TurretHitChance1.JPG

  • Transversal speed = Movement up/down/left/right relative to an object, but not towards or away from it (that is called radial speed). Measured in m/s.
  • Range to target = The range to an object. Measured in meters.
  • Turret tracking = Found on the attributes tab of a turret. Measured in rad/second.
  • Turret signature resolution = Higher values make it harder to hit small signature radii. Measured in meters.
  • Target signature radius = The size of the target, or more precisly the radius of an imagined circle that represents the target's sensor footprint. Measured in meters.
  • max(0, x) = Takes the highest value of zero or x. Used to set all negative values to zero in this case.
  • Turret optimal range = Found on the attributes tab of a turret. Inside this range no range penalites from distance are applied. Measured in meters.
  • Falloff = Found on the attributes tab of a turret. Represents how rapidly a turret's accuracy declines as the target moves beyond optimal range. Measured in meters.


This equation can look a bit intimidating at first. But it is central to the way turrets deal damage, because it calculates each turret's chance to hit its target, so we must study it to learn more about how to effectivly deal damage with turrets. In the rest of this article this equation will be poked, prodded and picked apart until all its secrets are belong to us. First of all: by looking at the different variables in the equation above, we can see that many of them are fixed or require certain modules to manipulate, e.g signature radius. In an unfitted ship, the only variables that a pilot have any control over are range to target and transversal speed. All the other variables can only be manipulated by fitting in a certain way or by activating certain fitted modules. Let's look a little closer at the equation and see what more we can learn.

To paraphrase Oli Geist, this equation can be abstracted to:

Chance to hit = 0.5 ^ (tracking term + range term).

Those who know a bit of math will recognize that x^(a+b) is the same as (x^a)*(x^b), so this can also be written as:

Chance to hit = 0.5 ^ (tracking term) * 0.5 ^ (range term)

From this we can see that tracking and range are calculated seperately and are then multiplied. So anything that effects range does not effect tracking. In other words, excellent tracking can not make up for a range problem, and vice versa.

General

What does x^a mean? Just in case you are not familiar with this kind of math, lets take a look at some basics. This is nothing more than a convenient way of write 'x' times itself 'a' number of times, if x = 0.5 and a = 3 this will be 0.5*0.5*0.5, so 0.5 times itself 3 times. That is easy enough. Things become a little more abstract when 'a' has decimals or is lower than 1, e.g. 0.5^(0.3), how does one multiply 0.5 with itself 0.3 times? Luckily we don't need to worry about that, we can just run the numbers in a computer to get the answer.

A few special things with x^a is that when a = 0, the answer will be 1. In this case 1 corresponds to 100%, that is 100% hit chance. If 'a' is very high instead, like infinately big, the answer will approach 0, so 0% hit chance. In our case, this means that we want 'a' (the big scary thing on the upper right of 0.5 in the equation above) to be as small as possible since that means more hits.

Range

So what can we do to maximize hits? Well, the range term becomes zero if we're at or under our turret's optimal range. It goes to 1 at (optimal + falloff), to 4 at (optimal + 2* falloff), and to 9 at (optimal + 3* falloff). 0.5^4 is 0.0625, or a 6.25% chance of hitting a large stationary target at that range. 0.5^9 is 0.002, or a 2/1000 chance of hitting -- good luck with that!

So we can say that any range over (optimal + falloff) is very sketchy, and staying at or near optimal range is good. No surprises here.

Tracking

What about tracking? Well, if the transversal speed is 0, the tracking term evaluates to zero (multiply with a zero and the answer is always zero). Since 0.5^0 = 1, this means that the tracking part of the equation will give a 100% hit chance, and as long as the target stays inside optimal range the chance to hit will remain at 100%. It doesn't matter if you are in a tiny frigate and your foe uses capital ship guns, your small size means nothing if your transversal is zero. This is not how things work in real life, but it is how EVE works. So getting your target to fly straight towards you, or straight away from you, is great, if you are the one with the big guns. If the target instead makes sure to keep up their transversal speed they will be harder to hit. The best way to minimize the tracking term is some combination of:

  • Keep the target at longer range
  • Lower the transversal speed
  • Increase your turret's tracking speed and/or decrease its signature resolution
  • Increase the target's signature radius

Modules that can help with these are AB's/MWD's, webs, tracking computers, and target painters. You can also choose 'keep at range' on a target to minimize the transversal -- though bear in mind that your target will be able to hit you more easily too. Note also that if the range ever becomes zero, the equation makes a forbidden division with zero. This results in an error and the turrets will automatically miss.

Turret damage output

Base damage

A turret's base damage is a fixed number, calculated by multiplying the turrets damage multiplier (make sure it's fitted, and that you are in the ship before looking up the value to get all bonuses included -- you can also check this in EFT) and the sum of the damage types from the loaded ammo type. The target's resistance values are not taken into consideration. The base damage is a tad below the average damage (about 1.5% lower) when there is a 100% hit chance -- the reason for this are the perfect hits.

Example: A turret has a damage multiplier of x1.725, and is loaded with an ammo type that does 7 EM and 5 Thermal damage. The base damage is then 1.725*(7+5) = 20.7

Random damage distribution

At the heart of a turret's damage output is a single randomly generated value between 0 and 1 that is several digits long, something like 0.317226. This random number is used both to determine if the turret hits the target and also to determine how much damage the hit actually does. Should the randomly generated number be less than 0.01 (1% chance), it will be a perfect hit (aka 'wrecking'). A wrecking hit always deals exactly three times the base damage. The thing about perfect hits is that they always occur as long as that random number was lower than 0.01 and at the same time lower than the hit chance. So perfect hits are not scored by 1% of the shots that can hit, but by 1% of all hits and misses taken together. This means that if your chance to hit is 1% or below, you can only get perfect hits and misses. Almost all shots will miss of course, but those that do hit will be perfect.

The raw damage dealt by a turret is calculated by taking the randomly generated number that resulted in a hit, adding 0.49, and multiplying this sum with the turret's base damage. Since the first 0.01% of the random value is used for perfect hits, the random values that hit normally are those between 0.01 and up to 1 at most (1 if the chance to hit is 100%). So if the chance to hit was 100%, this means that the normal damage will be between 50% (0.01+0.49) and 149% (1+0.49) of the base damage, or in the case of perfect hits always exactly 300% of the base damage. This number will then be reduced accordingly by the target's damage resistances in order to obtain the final damage number.

  • Damage generation
    • Calculating variables
      • Turret Base Damage = Turret Damage Multiplier * Sum of Ammo Damages
      • Hit Chance = ((calculated by the big equation at the top of this page))
      • X = Random (0 to 1)
    • Calculating raw damage
      • If (X < 0.01 and X < Hit Chance) Then RAW DAMAGE = 3 * Turret Base Damage (these are called perfect or wrecking hits)
      • Else If (X < Hit Chance) Then RAW DAMAGE = (X + 0.49) * Turret Base Damage (these are normal hits)
      • Else RAW DAMAGE = 0 (these are misses)
    • Calculating damage after resistance
      • Resistance modified EM Damage = Ammo EM damage * (100% - Target EM Resistance)
      • Resistance modified Thermal Damage = Ammo Thermal damage * (100% - Target Thermal Resistance)
      • Resistance modified Kinetic Damage = Ammo Kinetic damage * (100% - Target Kinetic Resistance)
      • Resistance modified Explosive Damage = Ammo Explosive damage * (100% - Target Explosive Resistance)
      • Damage dealt = RAW DAMAGE * (Sum of Resistance modified damages) / (Sum of Ammo Damages)

The quality of the hit will be described by the value of the random number + 0.49, ranging from barely scratching (least damage) to excellent (highest damage) for regular hits, on top of which there may also perfect hits and misses. On the normal hits this number is multiplied with the turret's base damage. By looking carefully at the damage generation above, it becomes clear that the Hit Chance not only means that a turret can miss, it also places a cap on the maximum damage number on the non-perfect hits. The next section will deal with this in more detail.

Hit description Random damage modifier
Perfectly 0.490 to 0.500 (special case, 3x the base damage instead)
Barely scratches 0.500 to 0.625
Hits lightly 0.625 to 0.750
Hits 0.750 to 1.000
Well aimed 1.000 to 1.250
Excellent 1.250 to 1.490

A turret with a 100% hit chance will see a natural and unavoidable damage spread between 50%-149% of its base damage for normal hits, and will always do exactly 300% of its base damage on perfect hits. A turret with a 75% hit chance will have a damage spread of 50%-124% on normal hits and do 300% on perfect hits, thus it can never do any excellent hits.

Example: A turret fires on target. The chance to hit is 0.8981. The EVE server rolls a random number between 0 and 1, and gets 0.6573 -- this is less than the chance to hit so the shot lands on the target. At this point 0.49 is added to the random number which then becomes 1.1473. The turret had a damage multiplier of x2.1 and the ammo does 4 EM and 2 Thermal, so the base damage is 2.1 multiplied with 6 (4+2), which is 12.6. After multiplying this with the random number we get the raw damage, which is 1.1473 x 12.6 = 14.456. In this damage the raw EM part is 1.1473 x 2.1 x 4 = 9.6373 and the raw Thermal part is 4.8187. Assuming the target's shield was hit, and that only the normal 20% resistance to Thermal is in effect, the final damage then becomes 9.6373 + (4.8187*0.8) = 13.492 points. In the log the hit will be described as 'well aimed' and be rounded off to one decimal place.

Damage and DPS reduction due to a decreased hit chance

When a turret has less than 100% chance to hit its damage dealing capabilites are reduced in two different ways. The first and obvious one is that it sometimes misses, the other is that the max damage on normal hits (e.g. not perfect ones) is reduced as well. Both of these effects will decrease the DPS output. If you read the previous section, you may remember that the a random number between 0 and 1 is generated to see if a turret hits. If this value is lower than the chance to hit, the shot lands and this number is then used further: 0.49 is added to it, and the result is then multiplied with the turret's base damage to obtain the raw damage done (damage before resistances)

What this all means is that targets that are tricky to hit also take less damage since high rolls now are discarded as misses. This can be seen in the damage log: a hard-to-hit target never recieves excellent or well aimed hits, sometimes barely scratching is the highest possible (though of course perfect hits can still happen). The practical effect is that the DPS decreases more than the chance to hit does.

Example: (please note that perfect hits are not considered in this example to make the numbers easier to follow) A turret has 50% chance to hit at optimal+falloff, ignoring tracking. The highest randomly rolled number that can result in a hit is thus 0.5 -- higher numbers mean a miss. This will shrink the damage interval down to 0.5 to 0.99 for normal hits, which on average is 0.745 ((0.5+0.99)/2). Compare that with a case inside optimal range where the chance to hit is 100%, ignoring tracking. Here the damage interval is 0.5 to 1.49 and the average is 0.995. At optimal+falloff (and ignoring perfect hits) the DPS from normal hits are hence reduced to 50% x 0.745=37.25% of normal. (When perfect hits are taken into consideration the DPS value becomes 39.5% instead, see the table below)

The table below shows how DPS decreases as a target becomes harder to hit. Note that the reason for the hit chance reduction doesn't matter, be it because of falloff or just tracking issues, the DPS goes down identically. The table can be used to see both how the damage declines as one goes deeper into falloff, and how the damage declines as a result of a lowered hit chance due to tracking problems. If you wish to combine the effects of tracking and falloff, you can do this by first picking the hit chance from falloff and then the hit chance from tracking, multipling the values to get the combined hit chance, looking in the hit chance column until you find a hit chance that is closest to the product you got, and then reading your relative DPS from that line.

Comment: The relative DPS below is over 1 at the start, but this is not an error. It's because it's relative to the base damage of the turret. What puts it above 1 are the perfect hits, since they do extra high damage.

Parts into falloff Hit chance Relative DPS Reduction in DPS by %
0 1,0000 1,0151 0,0%
0,1 0,9931 1,0048 -1,0%
0,2 0,9727 0,9747 -4,0%
0,3 0,9395 0,9268 -8,7%
0,4 0,8950 0,8641 -14,9%
0,5 0,8409 0,7906 -22,1%
0,6 0,7792 0,7104 -30,0%
0,7 0,7120 0,6274 -38,2%
0,8 0,6417 0,5454 -46,3%
0,9 0,5704 0,4672 -54,0%
1 0,5000 0,3951 -61,1%
1,1 0,4323 0,3303 -67,5%
1,2 0,3686 0,2736 -73,0%
1,3 0,3099 0,2249 -77,8%
1,4 0,2570 0,1840 -81,9%
1,5 0,2102 0,1502 -85,2%
1,6 0,1696 0,1225 -87,9%
1,7 0,1349 0,1003 -90,1%
1,8 0,1058 0,0825 -91,9%
1,9 0,0819 0,0685 -93,2%
2 0,0625 0,0576 -94,3%
2,1 0,0470 0,0492 -95,2%
2,2 0,0349 0,0428 -95,8%
2,3 0,0256 0,0379 -96,3%
2,4 0,0185 0,0343 -96,6%
2,5 0,0131 0,0316 -96,9%
2,6 0,0092 0,0277 -97,3%
2,7 0,0064 0,0192 -98,1%
2,8 0,0044 0,0131 -98,7%


The formulas used to calculate this table were:

  • Chance to Hit: 0.5^(0+(Falloff parts / 1)^2)
  • Relative DPS: if(HitChance>0.01 then (HitChance-0.01)*((0.50)+(HitChance+0.49))/2+0.01*3 else HitChance*3)
  • Reduction in DPS: (RelativeDPSatCurrent/RelativeDPSat100%hit)*100%-100%

Damage and DPS dependancy on tracking in fast ship dogfights

(not finished)

Answers to some questions

Do small targets take less damage from big guns?

Usually they do. If they have zero transversal speed, they will take full damage from any attacks in optimal range. However, if they have a transversal speed this will result in two things: they become harder to hit and the maximum damage they can receive goes down as well. A hit will never deal less than half the gun's base damage, and half of something very high still hurts.

Since big guns have large signature resolution values and tracking speed values, it becomes harder to hit a small target and the hits will have a lower maximum damage. Unless of course the small ship pilot drops his transversal to 0, at which point the big guns will hit easily and deal full damage (the award for such piloting is an insurance payout).

Can a turret hit a target with a larger angular velocity than its own tracking?

Yes it can. From the chance to hit equation it can be deduced that the tracking part can be broken down into:

Chance to hit (tracking part) = 0.5 ^ (((Angular velocity / Turret tracking) * (Size ratio between gun and target))^2)

From this it can be seen that the angular velocity and the turret tracking are compared as a ratio -- it's not an upper limit. So turrets with less tracking than their target's angular velocity can still hit: all that happens is that the chance to hit is reduced. If we consider a case in which angular velocity is equal to the turret's tracking, and assuming that the size ratio between gun and target is 1 (the gun's signature resolution is equal to the targets signature radius), we get chance to hit = 0.5^((1/1*1)^2) = 0.5^1 = 0.5, or 50%. So, roughly speaking a gun will hit 50% of the time when angular velocity and turret tracking are the same on same sized targets.

If the angular velocity is twice as high as the tracking (and gun and ship still have identical sizes), the chance to hit becomes 0.5^4 = 6.25%. If the tracking is twice as big as the angular velocity (and again, size ratio is 1) then the chance to hit will be 0.5^((0.5)^2) = 0.5^0.25 = 84.1%. In theory small and fast ships could benefit more from tracking bonuses than they would from raw damage bonuses, at least if nobody tries any clever manual piloting moves.

Are frigates with a smaller signature radius better than larger frigates in frigate pvp?

When comparing small signature radii, say 35m and 43m, the differance is only noticeable at short distances (up to 1 or 2 km). The one with the smallest radius get a small advantage from this factor. However, other factors come into play as well, and this advantage is many times offset by the fact that the larger-signature frigates use guns that generally have higher tracking values (the trend is: projectiles have the worst tracking, lasers are in between, hybrids have the best; when compared on an equal basis). So it really doesn't seem to matter. What is clear is that a high tracking can be more important than the damage multiplier on the gun, especially since the max damage drops if the gun can't track well enough.

Are target painters useful for turrets?

Yes, but only if the chance to hit is below 100% due to poor tracking or by using large guns against a small target. If the decreased hit chance is because of falloff then a target painter will not help at all. A regular Target Painter I increases the signature radius of a ship by +25%. Since all tracking terms are multiplied with another in the hit chance equation, the number can be moved around inside it to see how it effects the other factors. So another way to look at it is this: the signature radius increase is identical to what would happen if the target instead had reduced its angular velocity to 80% (100%/125%) of its current or as if the turrets had gotten +25% more tracking against the target. (Keep in mind that this last part was only a comparison, a target painter doesn't actually reduce anyone's speed or improves anyone's tracking.)

If I group my guns, does EVE pick the same random number for all of them?

No. Even if the guns are grouped on your screen, they are still treated as separate turrets. You can see this by looking at the turret group's average damage distribution. It's also quite easy to see by looking at the damage output when shooting deep into falloff (or against hard-to-track targets).

+0.49? It says +0.50 on EVEonline wiki

Yes it does and the differance isn't exactly overwhelming. But the test that was made to ensure the validity of this article showed a small deviance. The test has too much collected data to present all of it here, so the method and results will be presented instead. Should you wish to check for yourself feel free to follow this procedure.

A frigate (named 'Ouch') was abandoned at a safespot. An Osprey was fitted with lasers (infinite ammo, perfect for afk:ing), a remote shield transfer and shield transfer drones. The guns and the ammo were chosen so that the damage would never go below 10.0 and to give as large of a damage interval as possible (an interval of at least 10.0 units (resistances must be accounted for) is needed to get a precision of at least 1% in the damage values) -- this ensured that the data would be good enough to draw accurate conclusions. The damage was only done to the shields, they where never allowed to drop below 25% since a bleed through into armor can happen that can mess with the observed damage numbers. Finally, the ships were positioned within optimal range and their speeds set to zero to ensure that the chance to hit is 0.5^0 = 100% and nothing less.

After 10,656 shots at the poor frigate, enough data was collected to make some conclusions about how the random damage distribution looks like. The data ends up in the My Documents\EVE\gamelogs folder (in Windows), and was easily copied into a prepared Excel sheet for analysis.

  • Base damage
    • The ammo type dealt: 7 EM and 5 Thermal
    • The base damage on the lasers were: 24.9063
    • Compensating for resistance (20% thermal) the modified base damage is: 22.8308

Analysis of the data and interpretation of some reduced frequencies of min and max results in the normal damage span:

Of the 10,656 shots the lowest recorded damage was 11.4 (recorded 15 times) and the highest non-perfect was 34.0 (recorded 33 times), perfect hits dealt 68.5 damage (recorded 101 times). On average, each damage number (anything between 11.5 to 33.9) was recorded 46.7 times (standard deviation = 7.02). The reason for the lower occurences of the min and max results on normal hits comes from rounding effects. Any damage in-between has an interval of 0.1 units (22.2500 to 22.3499 both produce the 22.3 in the log). However the min and max values do not have that span. The lowest theoretical number is Base Damage x 0.5 = 11.415, hence the interval to get 11.4 in the log is between 11.415 and 11.4499, that is only 0.0345 differance. So the expected number of occurances of the value 11.4 is only 34.6% of the average number, 15 recorded values / 34.6% = 43.4, close to average and inside the standard deviation. The upper interval is 67.8%, 33 times / 67.8% = 48.7, also close to average and inside the standard deviation. (Note: 34.6%+67.8%=102.4%, which is of course impossible -- the error comes from rounding errors in the 4th decimal of the base damage, awesome precision isn't needed for this comparative calculation since the natural random deviation is much larger anyhow, so this is good enough, the objective was to explain the lower frequencies of the end points which now has been done).

  • Lowest damage random multiple
    • Modified base damage x 0.51 = 11.6
    • Modified base damage x 0.50 = 11.4
    • Modified base damage x 0.49 = 11.2
    • The lowest observed damage is 50%
  • Highest non-perfect random multiple
    • Modified base damage x 1.50 = 34.2
    • Modified base damage x 1.49 = 34.0
    • Modified base damage x 1.48 = 33.8
    • The highest non-perfect damage is 149%
  • Perfect hits deal 68.5 damage
    • Modified base damage x 3 = 68.5

The collected data shows that the normal damage is distributed within 50%-149%. Since the first 1% unit is used for critical rolls, this means that the constant has to be 0.49.

Tracking Examples

coming soon

References:

http://wiki.eveonline.com/wiki/Turret_damage

http://www.eve-ivy.com/forum/viewtopic.php?p=201888#201888

http://www.eve-ivy.com/forums/viewtopic.php?p=216525#p216525

http://www.hostile.dk/files/eve/eve-tracking101.swf