dog
True Bro
woof
Posts: 10,608
|
Post by dog on Feb 18, 2009 14:52:24 GMT -5
Hey Den,
Are there any formulas to calculate the kill radius of any explosives in the game?
|
|
Den
He's That Guy
Posts: 4,294,967,295
|
Post by Den on Feb 18, 2009 16:58:18 GMT -5
Two methods.
Method one: Damage lost with every unit of distance. Luckily, every explosive loses damage starting at zero. COD4's Frag Grenade = Damage of 300 to 75 and Range of 0 to 256.
First, get the difference of the two damage values for MaxDamage. 300 - 75 = 225. Next, divide that damage by the Maximum Range to get Damage Lost Every Unit. 225 / 256 = 0.87890625 With every unit of measurement, the frag grenade loses that much damage.
Since the Amount of Damage to get to 100 damage is 200 from 0, then: 200 / 0.87890625 = 228
Alternatively it only takes 25 damage from 75 to 100, so then: 25 / 0.87890625 = 28 256 - 28 = 228
The Frag Grenade has a lethal range of 228 units of measurement. Round off at the end, not during the "damage lost" part.
MaxDamage - MinDamage = TotalDamage TotalDamage / MaxRange = DamageLost
MaxDamage - 100 = LethalRange LethalRange / DamageLost = Maximum Kill Range
----- Method 2: Get the average in ever diminishing spaces (AKA the long way): Take the two range extremes, add them together, and divide that by 2. Take the two damage extremes, add them together, and divide that by 2. Then take the two closest numbers on either side of 100, divide by 2. Pair up with their accompanied range values.
(0 + 256) / 2 = 128 Range (300 + 75) / 2 = 187.5 Damage
(128 + 256) / 2 = 192 (187.5 + 75) / 2 = 131.25
(192 + 256) / 2 = 224 (132.25 + 75) / 2 = 103.625
Continue on with those numbers until it is narrowed down all the way to the difference between one single number. The next average will skip ahead of 100 damage, so simply add the two ranges and two damages that are closest to 100. Of course, it narrows down to 228.
|
|
dog
True Bro
woof
Posts: 10,608
|
Post by dog on Feb 19, 2009 12:26:55 GMT -5
Thx once again, Den The wearisome method that I've been using all this while was to plot a graph of Damage against Distance, draw a straight line connecting both the min & max damage in the y-axis, and find out the range that meets up with 100 in the gradient. However, it's only as accurate as the boxes in the graph paper. The first method is pretty helpful for calculating the kill radius accurately. ;D
|
|
|
Post by sketchybrown on Feb 23, 2009 16:36:23 GMT -5
Another way: Damage Lost Every Unit. 225 / 256 = 0.87890625With every unit of measurement, the frag grenade loses that much damage. -> Quote from Den implies a Linear decrease in damage over distance, so we can say: Let:r = distance from grenade @ explosion D(r) = damage to player at distance r D(r) = a*r + b where {a,b} are Real Numbers Given:damage @ explosion center D(0) = 300 damage @ max explosion radius D(256) = 75 Then:Find bD(0) = a*0 + b = b = 300 = b Find aD(256) = a*256 + b = 75 a = (75-b)/256 = (75-300)/256 = -0.87890625 ~ -0.88 = a So, from above:
D(r) = -0.88*r + 300r = [0, 256] D = 0 for r > 256 This function D(r) will allow calculation of damage at any distance r from the center of the grenade's explosion._______________________ Ex: Find kill Radius for normal & juggernaut players (COD4)Given Kill Damages: (& D(r) derived above) Normal Player D N = 100 Juggernaut D J = 135 Find Kill DistancesNormal D(r N) = D N = 100 = -0.88*r N + 300 r N = (100-300)/(-0.88) = 227.27 rN = 227(checks within 1% of Den's exact answer above - error due to rounding a) Juggernaut D(r J) = D J = 135 = -0.88*r J + 300 r J = (135-300)/(-0.88) = 190.9 rJ = 191(Juggernaut users must be 36 units (16%) closer to the grenade than a regular user for death) ________________ Sooo... Grenade Kill Radius is 227 units from epicenter, 191 units for juggernauts:3Edit: I don't think "lethality" is a word...
|
|
dog
True Bro
woof
Posts: 10,608
|
Post by dog on Feb 23, 2009 21:48:16 GMT -5
^ Sweet
Btw, Juggernaut doesn't increase health to 135 though. More like it reduces damage to 0.75x of it's original value.
Hence, Health "increase" = 1/0.75 x 100 = 133.333
By applying the formula you've given earlier, rJ = (133-300)/(-0.88) = 189.77 ~190
|
|
Den
He's That Guy
Posts: 4,294,967,295
|
Post by Den on Feb 24, 2009 1:03:51 GMT -5
You can just change "100" to whatever to find damage at any range.
For example: MaxDamage - Y = 150 Y / DamageLost = RangeThatDelivers150Damage Which would be 170 units for the Frag.
Perks affect damage, so change damage.
Armor Vest / Juggernaut *0.75 225 - 56.25 = 168.75 168.75 / 256 = 0.6591796875
225 - 125 = 100 125 / 0.6591796875 = 190
Sonic Boom / Fireworks *1.25 375 - 93.75 = 281.25 281.25 / 256 = 1.0986328125
375 - 275 = 100 275 / 1.0986328125 = 250
|
|