DPS calculation formula for ships?

Wondering if there is a file containing the exact formula for how DPS is calculated for selection ship stats.

Take the Vaygr Flagship for example. Its entire weaponry consists of 12 guns (12 * hgn_MShulldefensegun) and a listed DPS of 120.

Correct me if I am wrong but the stats for the hgn_MShulldefensegun are:

  • min/max damage (damagehealth) = 20, 20
  • Delay between shots (fFireTime) = 0.2
  • Duration of burst (fBurstFireTime) = 0.7
  • Delay between bursts (fBurstWaitTime) = 0.5

There may be other factors I may have omitted.
I’m not sure exactly how to get 120 from this.

Buddy, I don’t know were you got those values but some of them are wrong,

min/max damage (damagehealth) = 20, 20
Delay between shots (fFireTime) = 2
Duration of burst (fBurstFireTime) = 0
Delay between bursts (fBurstWaitTime) = 0

StartWeaponConfig(NewWeaponType,"Gimble","Bullet","HDefense","Normal",2500,2200,0,0,0,0,1,1,0,2,0,0,1,0,0,0,0.1,"Normal",0,0,0);

This weapon doesn’t use burst fire, and with that is pretty easy to see the 120 dps from the game UI.

1 Like

Whoops. Thank you very much.

Could you give me clues on whether or not I have calculated the 5200 DPS Stat for the Hiigaran Battlecruiser correctly?


Hgn_BattleCruiserKineticBurstCannon x 2 x 2 - (2 turrets and 2 cannons per turret)
Hgn_BattleCruiserKineticBurstCannonLeftSide x 1 x 2 - (1 turret and 2 cannons per turret)
Hgn_BattleCruiserKineticBurstCannonRightSide x 1 x 2 - (1 turret and 2 cannons per turret)

StartWeaponConfig(NewWeaponType,"AnimatedTurret","Bullet","Kinetic_Large","Normal",5000,6000,0,0,0,0,1,1,1,5,0,0,1,1,40,25,0.1,"Normal",1,0,0); AddWeaponResult(NewWeaponType,"Hit","DamageHealth","Target",650,650,"");

650 damage * 4 turrets * 2 cannons / 5 second shot delay = 1040 DPS


IonBeam_bc x 2 x 2 - (2 turrets and 2 beams per turret)

StartShipHardPointConfig(NewShipType,"Weapon IonBeam 1","Hardpoint_IonBeam1","Weapon","Innate","Damageable","Hgn_BattleCruiserIonBeamTurret","","","","","","","",""); StartShipHardPointConfig(NewShipType,"Weapon IonBeam 2","Hardpoint_IonBeam2","Weapon","Innate","Damageable","Hgn_BattleCruiserIonBeamTurret","","","","","","","","");
StartWeaponConfig(NewWeaponType,"AnimatedTurret","InstantHit","IonBeam_bc","Normal",0,6000,0,6,2,0,20,0,1,15,0,0,1,1,20,20,0.1,"Normal",1,0,2000); AddWeaponResult(NewWeaponType,"Hit","DamageHealth","Target",15000,15000,"");

15000 damage * 2 turrets * 2 beams / 15 second delay between start of beam firings = 4000 DPS


Hgn_PulsarSide x 4

StartWeaponConfig(NewWeaponType,"AnimatedTurret","InstantHit","Laser","Normal",0,1000,0,0.4,0,0,1,1,1,0.7,1.5,1,1,1,120,120,0.1,"Normal",1,0,300); AddWeaponResult(NewWeaponType,"Hit","DamageHealth","Target",50,50,"");

This is the part that gets me the most. In-game testing shows that the pulsars aren’t consistent, they fluctuate between 2 or 3 shot bursts despite the numbers here. How do I obtain the remaining 160 DPS from this?
Damagehealth = 50, fFireTime = 0.7, fBurstFireTime = 1.5, fBurstWaitTime = 1


4000 Ion cannon DPS + 1040 Kinetic turret DPS + 160 Pulsar gun DPS? = 5200


I hope I haven’t made any other errors or omitted something.

Lastly, is it listed anywhere in the files what multiplier to add due to number of cannons/beams on a single turret? I could only determine this through manual inspection in game.

The info about the amount of cannons per turret can be found inside the hod file only, the effect file can give a hint though but only if an effect its used.
Everything above the Pulsars looks right, now I’m going to start explaining the burst fire:

The best way to calculate a weapon is starting by its RoF(Rate of Fire), most weapons in HW use continuous RoF its the easiest and simple to calculate, but burst fire weapons use 2 additional components that you already know as “Burst fire time” and “Burst wait time” so things get a little tricky, and I don’t like to use RoF but Shots per seconds instead.

Burst fire time is the amount of time when shots can be fired, so fBurstFireTime/fFireTime should give you the amount of shots that can be fired within that Burst Firetime and even the whole fire cycle, so 1.5/0.7=2.142857142857143, we are only interested in the integer to calculate the DPS so it is 2.

Normally the Firetime would be the same as the whole fire cycle, but in burst fire its composed by the sum of “Burst fire time” and “Burst wait time”, so the BC pulsars are fBurstFireTime = 1.5, fBurstWaitTime = 1, so its 1.5 + 1 = 2.5.

That means that every 2.5 seconds 2 shots can be fired, 2 / 2.5 = 0.8 gives me the amount of shots per second, so 0.850=40 is the DPS of each gun, and since the BC has 4 of them you get 404=160.

Now this next part is only based on speculation, I have seen that Burst fire weapons are a little bit inconsistent in the amount of shots fired in each burst fire time, I can only conclude that its because the burst wait time is more like a pause that is issued to a continuous rate of fire weapon each x(burst fire time) for y(burst wait time), so in 1.5 / 0.7 = 2.14… only 2 shots can be fired but 14% of the next shot has already been reloaded, that means that when the next burst starts it needs to complete the remaining 86% reload time so it will delay 0.86 * 0.7 = 0.602 after the start until the next first shot fired, then after the second shot there are going to be left 0.198 seconds till the end of the burst meaning that 28% of the next shot is already reloaded, and this continues making them inconsistent over time, but I don’t think that is possible to have 3 shots in a single burst with these time values, but strange things can happen.

2 Likes

Thank you very much. I was in the process of making a spreadsheet of individual weapon DPS for every ship and now I’ve been able to perfect the cell formula.

Like you said, the game’s calculation only cares about integers for “Shots per Burst”. Also, the final DPS value is rounded UP to the nearest integer if it is a decimal.

As an example, Hiigaran Interceptor in-game DPS is listed as 36.
hgn_kineticautogun:

Damage per shot = 37
Delay between shots = 0.6
Burst duration = 1.3
Delay between bursts = 0.8

Shots per burst = 1.3 / 0.6 = 2.16667 which is 2 whole shots.
Therefore DPS = 2 shots * 37 damage / (Burst duration + Delay between bursts)

=35.238

Rounded UP to nearest integer = 36

Yeah, there’s definitely some quirkiness with non-integers for shots per burst.