DPS mechanics.

Generic non-balance topics.
Helios
Level 3
Posts: 220
Joined: Mon 18 Feb, 2013 1:37 am

DPS mechanics.

Postby Helios » Tue 08 Apr, 2014 7:36 pm

For as long as I've played, one thing I never got into the nitty-gritty of was Dps calculations and the various weapon mechanics. Wind-up/down, cooldown, reload frequencies and durations, things of that nature that are written down in the codex. Is there any one or a comprehensive guide that explains these? Before I would just look up dps numbers but after Kasrkins were added and I saw the various bonuses of weapons expertise I was confused how each bonus affects the weapon on a fundamental level. Yeah sure, it makes the weapon better but HOW? (Melta and lasgun bonus was obvious, you can ignore those). What do these stats do exactly?
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Tue 08 Apr, 2014 9:13 pm

Code: Select all

if($reload_f == 0) $reload_f = 1;

if ($row['is_melee'] == 1) // If this is a melee weapon
     {
      $dps = $dmg_hp / ($windup + $winddown + $cooldown);
     }
elseif ($burst > 0) // If this is a ranged burst weapon
     {
      if ($row['is_missile'] == 1) // If it fires a missile but has burst for animation reasons, let's not fuck up DPS with burst formula
      {
        $dps = ($reload_f * $dmg_hp) / (($reload_f * ($windup + $winddown + $burst + $cooldown)) + $reload_d);
      }
else // Otherwise it's an actual burst weapon
      {
        $dps = ($reload_f * $burst * $dmg_hp) / (($reload_f * ($windup + $winddown +   $burst + $cooldown)) + $reload_d);
      }
     }
    elseif (($windup + $winddown + $cooldown) > 0) // Otherwise it must be a ranged single-shot weapon, but check for division by zero
     {
      $dps = ($reload_f * $dmg_hp) / (($reload_f * ($windup + $winddown + $cooldown)) + $reload_d);
     }
    else // Same, but replace that bit by 1 if it was 0
     {
      $dps = ($reload_f * $dmg_hp) / (($reload_f * 1) + $reload_d);
     }


The first part (if) is for melee weapons.

The second (the first elseif, with a sub-if and else) is for weapons with burst value.

The third (the second elseif) is for weapons without burst value, but with windup, winddown, or cooldown.

The fourth (else) is for anything else (hence the else : P).

reload_f + reload_d = reload frequency + reload duration

This is in the code Lulgrim wrote for the creation of the weapons pages in the Codex.

So here's the Kasrkin's grenade launchers as an example:

Not melee, no burst duration, but they do have windup+winddown+cooldown >0

So: DPS = (0 * 45) / (0 * ( .1 + .6 + 5) + 0); Clearly this equals zero, but the code also says to take reload frequency in this case to be 1 since you're just taking it to not be part of the equation. (see the top of the code)

So we have 45/5.7 = 7.89, which is what it says in the codex.

And then if you reduce the cooldown by 1, which is what Weapon Expertise does, you get 45/4.7 = 9.57 dps. -> 21.3% increase in dps

So there ya go.

Edit2: Plasma Guns for fun and procrastination: Not melee, no burst, so same equation: reload frequency is 6 to 8, so take the average (7)

DPS = (7 * 40) / (7 * (0 + .5 + 1.5) + 3) = 16.47 dps Whaddya know.

With the weapon expertise granting -30% reload time, since 3 * .7 = 2.1:

(7 * 40) / (7 * (0 + .5 + 1.5) + 2.1) = 17.39 dps -> 5.59% increase in dps

Edit: Whoa, I have a blue thing.
Helios
Level 3
Posts: 220
Joined: Mon 18 Feb, 2013 1:37 am

Re: DPS mechanics.

Postby Helios » Wed 09 Apr, 2014 3:23 pm

Can you explain what constitutes "burst" for a ranged weapon?
lolzarz
Level 3
Posts: 254
Joined: Thu 06 Mar, 2014 11:17 am
Location: Terra

Re: DPS mechanics.

Postby lolzarz » Wed 09 Apr, 2014 3:33 pm

Helios wrote:Can you explain what constitutes "burst" for a ranged weapon?


That means firing multiple projectiles in a short period then reloading for a long time, if I remember correctly. For instance, Tankbustas fire a burst of 3 rockets per attack and Whirlwinds fire a burst of 4 missiles per attack.
WEE AR DA SPEHSS MAHREENS! WE AR DA EMPRAH'S FUREH!
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Wed 09 Apr, 2014 3:35 pm

When a weapon takes more than one shot to do its damage. For example, a space marine bolter has a burst duration of 2, so it does its 25 health damage over 2 seconds instead of just being a 1 shot weapon like the grenade launchers, which deal their damage with only one grenade.
Helios
Level 3
Posts: 220
Joined: Mon 18 Feb, 2013 1:37 am

Re: DPS mechanics.

Postby Helios » Wed 09 Apr, 2014 5:22 pm

Got it. Now, I don't have any programming expertise so could you gimme an example for a burst weapon? Do Eldar DA have burst weapons for example?
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Wed 09 Apr, 2014 5:31 pm

Sure. Here's the equation from the code: $dps = ($reload_f * $burst * $dmg_hp) / (($reload_f * ($windup + $winddown +   $burst + $cooldown)) + $reload_d);

So, the DA's shuriken catapult has reload frequency 6 - 8, so 7 average, 15 health damage, no wind up or wind down, 1 second cooldown, reload duration of 3, and a burst of 2 seconds. It isn't melee, and has a burst duration > 0. So:

DPS = (7 * 2 * 15)/((7 * (0 + 0 + 2 + 1) + 3) = 210/24 = 8.75

Edit: And actually, here's the Dark Reapers weapon since they have an ability that removes weapon reload duration and cooldown and decreases health damage by 30%. Same equation:

DPS = (7 * 2 * 28.5)/((7 * (0 + 0 + 2 + 1) + 3) = 210/24 = 16.625 ~ 16.63

When Pinning Fire is activated: 28.5 * .7 = 19.95

DPS = (7 * 2 * 19.95)/((7 * (0 + 0 + 2 + 0) + 0) = 19.95 dps -> 20% dps increase + suppression
Last edited by Wise Windu on Wed 09 Apr, 2014 7:06 pm, edited 1 time in total.
User avatar
Lulgrim
Admin
Posts: 1311
Joined: Sun 03 Feb, 2013 9:44 pm
Location: Grimdark
Contact:

Re: DPS mechanics.

Postby Lulgrim » Wed 09 Apr, 2014 6:00 pm

Wise Windu wrote:When a weapon takes more than one shot to do its damage. For example, a space marine bolter has a burst duration of 2, so it does its 25 health damage over 2 seconds instead of just being a 1 shot weapon like the grenade launchers, which deal their damage with only one grenade.

The base damage once for each second of burst, actually. E.g. 50 damage for the 2-second-burst for Tacs.
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Wed 09 Apr, 2014 6:03 pm

Ah, okay. Thanks
User avatar
Broodwich
Level 3
Posts: 496
Joined: Fri 12 Apr, 2013 10:04 pm

Re: DPS mechanics.

Postby Broodwich » Thu 10 Apr, 2014 4:15 am

Wind up and wind down are the times before and after a melee hit where the dude is swinging his sword/whatever. Most melee don't have cooldown which is important since suppression only affects cooldown (x20) so melee dps isn't theoretically affected. Sluggas used to have their burnas I think have a cooldown so they were one of the only, if not the only, unit that had melee damage reduced by suppression. Auto cannons were buffed at some point to have a cooldown of 0 as well
Fas est ab hoste doceri
Arbit
Level 3
Posts: 357
Joined: Tue 28 May, 2013 10:00 pm

Re: DPS mechanics.

Postby Arbit » Thu 10 Apr, 2014 6:21 pm

Broodwich wrote:Sluggas used to have their burnas I think have a cooldown so they were one of the only, if not the only, unit that had melee damage reduced by suppression.

Ha ha, I remember Relic's finest derp moment when a proposed changelog showed the cooldown had been removed from burna melee and everyone was like "this would give burna melee double damage... you adjusted their damage values so this won't happen RIGHT???" and Relic was like "oh PSH sure we checked that it's fine". I have made this image to commemorate that moment
Image

PS Wind up and wind down apply to some ranged weapons as well, like the SM pdev and lascannon

Also thanks everyone for the informative thread! This answers many questions I had as well.
My 1v1 map - Imperial Plaza. Revisions are in progress so please check it out and give feedback!
Helios
Level 3
Posts: 220
Joined: Mon 18 Feb, 2013 1:37 am

Re: DPS mechanics.

Postby Helios » Thu 10 Apr, 2014 7:50 pm

I thought suppresion affected reload speed. In either case, what's the difference between cd and reload?
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Thu 10 Apr, 2014 8:22 pm

Helios wrote:I thought suppresion affected reload speed. In either case, what's the difference between cd and reload?


Suppression multiplies cooldown by 20.

I believe cooldown is the time between attacks, so a weapon with 1 cooldown, the dark reapers' weapon for example, will have 1 second between the end of one burst attack and the beginning of another. Reload is much less frequent and takes much longer. Multiple cycles of cooldown and attack occur between the "bookends" of reloading, which in this case occurs on average every 7 seconds.
Arbit
Level 3
Posts: 357
Joined: Tue 28 May, 2013 10:00 pm

Re: DPS mechanics.

Postby Arbit » Fri 11 Apr, 2014 12:24 am

Am I correct in that reload frequency is actually the number of bursts fired before a reload is required? I have a notedpad here with some equations scribbled on it that seems to indicate that is does, but TBH it's been a long time since I cracked a calculus book.

If you plug larger values for $reload_f into the equation you come up with higher dps, which means the unit gets to take more shots before reloading. Conversely, if you decrease $reload_f, you get lower dps which indicates that the unit is spending more time reloading. You can also fiddle with the equation a bit so it reads

$dps = ($burst * $dmg_hp) / (($windup + $winddown + $burst + $cooldown) + ($reload_d/$reload_f)

I think that's equivalent to what is in the code. It generates the same numbers anyway, and it presents it a bit more intuitively... it basically reads

(damage)/((time required to make an attack)+(reload duration/reload frequency))

damage over time essentially
My 1v1 map - Imperial Plaza. Revisions are in progress so please check it out and give feedback!
Bahamut
Level 4
Posts: 578
Joined: Fri 27 Sep, 2013 12:58 am

Re: DPS mechanics.

Postby Bahamut » Fri 11 Apr, 2014 2:21 am

Arbit wrote:$dps = ($burst * $dmg_hp) / (($windup + $winddown + $burst + $cooldown) + ($reload_d/$reload_f)



gotta multiply dmg and burst by reload frequency too to get the full damage it does over each reload cycle
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Fri 11 Apr, 2014 2:51 am

No, if you multiply by reload_f/reload_f you get the same as the original equation, he just used algebra to simplify it.
Bahamut
Level 4
Posts: 578
Joined: Fri 27 Sep, 2013 12:58 am

Re: DPS mechanics.

Postby Bahamut » Fri 11 Apr, 2014 4:11 am

Wise Windu wrote:No, if you multiply by reload_f/reload_f you get the same as the original equation, he just used algebra to simplify it.


you dont xy =/= (x+y)

reload frequency tells you the ammount of bursts the weapon fires before reloading

for example tac bolter

burst duration 2
reload frequency average 7
reload time 3
damage_hp 25
cooldown 1

(25*2*7) / ((2+1)*7+3) = 14.583 dps per tac bolter

that formula is: (reload_freq*burst_dur*dmg_hp) / ((cooldown+windup/down+burst_dur)*reload_freq + reload dur)
User avatar
Wise Windu
Moderator
Posts: 1190
Joined: Sat 14 Sep, 2013 2:22 am

Re: DPS mechanics.

Postby Wise Windu » Fri 11 Apr, 2014 4:46 am

Bahamut wrote:you dont xy =/= (x+y)


Well obviously.

Bahamut wrote:$dps = ($burst * $dmg_hp) / (($windup + $winddown + $burst + $cooldown) + ($reload_d/$reload_f)


multiply the top by reload_f -> ($burst * $dmg_hp * $reload_f)

multiply the denominator by reload_f -> ($reload_f*($windup + $winddown + $burst + $cooldown) + ($reload_d))

See? Same thing as the original, and since you're multiplying by reload_f/reload_f, you're effectively multiplying by 1. It's just an algebraic simplification.

You may have missed the reload_d/reload_f in the denominator.
Bahamut
Level 4
Posts: 578
Joined: Fri 27 Sep, 2013 12:58 am

Re: DPS mechanics.

Postby Bahamut » Fri 11 Apr, 2014 5:14 am

ya ya i saw it now

Return to “Community General Discussion”



Who is online

Users browsing this forum: No registered users and 3 guests