Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: DPS Calculation  (Read 3209 times)

redlynx

  • Ensign
  • *
  • Posts: 11
    • View Profile
    • Sector Loadouts
DPS Calculation
« on: February 16, 2019, 10:42:13 PM »

Hi all,

I am having some issues understanding how a weapon's final DPS is calculated. Here's an example of how far I came:
https://docs.google.com/spreadsheets/d/15WNXJcAVBBZ6Y61wGWl99C_eg78yQp3JTGCeeucwyQs/edit?usp=sharing

For some weapons, DPS calculation seems pretty straight-forward. Take the damage/shot, multiply by the bust size if applicable, multiplied by the shots/second - there's your DPS. However, while my formula works great for weapons such as Heavy Blaster, the Mjolnir Cannon, and the Thermal Pulse Cannon, there are two things I don't understand:

  • The Light Machine Gun's DPS is off. According to my formula it would do 312.5, but the game says 165 - which is just 50% (edit: I forgot to take burst delay into account)
  • Any missile's DPS is way off. According to the formula the Reaper-class Torpedo would deal 800, but Starsector says 4.000. (edit: my bad, that's the value from the Wiki

So, my first hypothesis was that PD weapons have their DPS cut in half - however, for Dual Flaks and Vulcans that's not true (maybe because they are Fragmentation)?

Could anybody shed some light, please?
« Last Edit: February 18, 2019, 02:09:52 PM by redlynx »
Logged
https://sectorloadouts.info -- create and share your favorite loadouts! (BETA)

Unreal_One

  • Ensign
  • *
  • Posts: 44
    • View Profile
Re: DPS Calculation
« Reply #1 on: February 16, 2019, 10:52:12 PM »

Are you accounting for charge up/down? A single burst from a LMG takes 0.8 seconds in total, (burst size - 1) * burst delay + charge delay. No idea on the missiles.

Edit: Looking at your spreadsheet, you aren't accounting for burst delay.
« Last Edit: February 16, 2019, 10:57:43 PM by Unreal_One »
Logged

redlynx

  • Ensign
  • *
  • Posts: 11
    • View Profile
    • Sector Loadouts
Re: DPS Calculation
« Reply #2 on: February 16, 2019, 11:01:50 PM »

That's one mystery solved, thank you!
Logged
https://sectorloadouts.info -- create and share your favorite loadouts! (BETA)

Unreal_One

  • Ensign
  • *
  • Posts: 44
    • View Profile
Re: DPS Calculation
« Reply #3 on: February 16, 2019, 11:05:22 PM »

The reaper class in my game doesn't show a DPS, where are you getting that?
Logged

redlynx

  • Ensign
  • *
  • Posts: 11
    • View Profile
    • Sector Loadouts
Re: DPS Calculation
« Reply #4 on: February 16, 2019, 11:11:24 PM »

You're correct - I took this info from the wiki, without thinking: https://starsector.fandom.com/wiki/Reaper-class_Torpedo
Naturally, a reaper can never deal 4,000 DPS. Even with unlimited ammo, it would be able to shoot 0.2 times per second - so 800 DPS is correct. Guess that's another one down, I'll verify for more weapons, though. Thanks again!
Logged
https://sectorloadouts.info -- create and share your favorite loadouts! (BETA)

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: DPS Calculation
« Reply #5 on: February 17, 2019, 09:57:55 AM »

Damage per second for anything that isn't a Beam is not simply a straightforward linear calculation of damage/time. 

That said, the first step is to see the potential damage, which is:

(Damage * Burst Size) / (Charge Up + Charge Down) + (Burst Delay * Burst Size).  So, D/s = (D * BS) / (CU + CD) + (BD * BS).


Logged
Please check out my SS projects :)
Xeno's Mod Pack

redlynx

  • Ensign
  • *
  • Posts: 11
    • View Profile
    • Sector Loadouts
Re: DPS Calculation
« Reply #6 on: February 18, 2019, 02:08:58 PM »

Thanks! Since I am looking for an approximation, this will suffice.
Logged
https://sectorloadouts.info -- create and share your favorite loadouts! (BETA)

XViper

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: DPS Calculation
« Reply #7 on: August 16, 2023, 04:31:38 AM »

Apologies for the necro, but after racking my brain for quite some time, I just couldn't get the same number as the in-game UI was presenting for various weapons.
I came across this thread, which helped me with my calculations.
Specifically redlynx's linked spreadsheet, which included some steps I was entirely not considering.

I just wanted to voice my appreciation.

For anyone wanting the formula for Excel (to be used in the weapon_data.csv), here it is:

=(([@[damage/shot]]*(MAX(1,[@[burst size]]))*(1/([@chargeup]+[@chargedown]+([@[burst size]]-1)*[@[burst delay]]))))

Thanks again, and hopefully this helps someone else who is looking for this information in the future.

Note this is for "damage per shot" weapons, with no ammo regen calculations.
I haven't figured out how to properly calculate the sustained and beam damages correctly.
« Last Edit: August 25, 2023, 02:41:11 AM by XViper »
Logged