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: Bomber Approximate DPS Values OR "Math is fun when it involves explosions!"  (Read 4194 times)

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile

Overview

Recently I was attempting to balance a modded-in Bomber type fighter wing based on its apparent damage and effectiveness in combat. The fighter in question (the Firebird from Disassemble Reassemble) is designed primarily to hunt frigates and light destroyers, and carries an MIRV torpedo that splits into half a dozen very fast – but low damage – missiles.

In testing it seemed to be far more effective than it was worth, so, prior to giving it a cost increase, I decided to calculate some approximate damage values in comparison to a selection of stock bomber wings.

The results were quite surprising. Compared purely the total potential damage from a single attack run against the Piranha, Khopesh, and Flash bomber wings, the Firebird actually came out with the lowest total potential damage out of the lot, by a long shot.

Suspecting sortie damage was not enough, I then did an extremely rough calculation for the same wings, working out how much time it takes them to do this damage at a target an arbitrary distance from their carrier (ie. Fly to target, unload ordnance, fly back to carrier and re-arm). And, once again, the Firebird came out at the bottom of the pack.

Following this I decided to put my mathematical brain – desperately in need of exercise – to work, with a proper theoretical context and hard stock numbers to work from.

DISCLAIMER: This is not to say any one bomber wing is more powerful than any other, and no balance concerns are being pointed at here. It is simply something I wanted to calculate and look at the results of to fulfill my own curiosity.

Without further ado, here is the situation.



Context

Let us say we have a stationary carrier at a given position in the battlefield, and a stationary target some 4000 units away (the peak operating range for almost all stock fighters). The carrier is fielding one bomber wing from the stock selection I have made. At some point, the carrier orders the bombers to engage the target. The bombers proceed at their maximum speed until they reach their Attack Run Range (a unique distance specified in the files for each fighter wing) from the target. They then begin unloading ordnance as fast as they can, continuing to approach the target until they run out of ammunition.

Once depleted, the bombers turn and head straight back to the carrier at best possible speed, land, and re-arm before launching again.


What I want to figure out, is how much damage each bomber wing can possibly do in a single sortie; how long that sortie takes; and therefore, what each bomber's average – and very approximate – damage per second actually is.

Foolish assumptions to make the calculations easier:
- Allowing 2 seconds for re-arming of fighters
- Ignoring all other external factors that could affect the bomber's sortie times and effectiveness (eg. Other ships, point defence, interceptors, etc.)
- Ignoring damage types of bombers. Purely focused on base numbers.



The Numbers

Of stock Starsector's seventeen modular fighter wings, I will be running numbers for all six of it's “Bomber” wings:
   - Piranha
   - Khopesh
   - Dagger
   - Trident
   - Longbow
   - Flash

Each have their own strengths and weaknesses, but all we're worried about right now is raw damage output, and how long they take to do it.

Here are the base values I've gathered from the game files to utilize in the calculations:

Bomber TypeWing SizeTop SpeedAttack Run RangeAmmunitionShot DamageShot Cooldown
Piranha31502,500104001
Khopesh21802,000142000.05*
Dagger31752,00011,0000
Trident21302,00021,0000
Longbow32002,00011,000**0
Flash41702,50065001.5


* Note that I have given the Khopesh a 0.05 second shot cooldown, when in actual fact it has 0.1 seconds. This is due to the fact it has 14 missiles across two separate launchers, which I didn't want to make an exception for in the spreadsheet I did these calculations in.

** Note also that I am not bothering about damage types. All except for the Longbow do HE damage, but that isn't relevant to the calculation.



Calculations

The first number to extrapolate is the total damage of the sortie. This is found by simply multiplying together the wing size, per shot damage, and ammunition of the bomber wing. The results are as follows:

Bomber TypeTOTAL SORTIE DAMAGE
Piranha400 x 10 x 3 = 12,000
Khopesh200 x 14 x 2 = 5,600
Dagger1,000 x 1 x 3 = 3,000
Trident1,000 x 2 x 2 = 4,000
Longbow1,000 x 1 x 2 = 2,000
Flash500 x 6 x 4 = 12,000

As you can see, the damage numbers here vary wildly. But don't fret! There are still plenty of other things to factor in.

The first part of the total time calculation is the time it takes the bombers to reach their Attack Run Range. Since the ARR is a distance from the target, we calculate the distance they must travel by subtracting the bombers' ARR values from 4000 (the range from the carrier to the target). Then we divide that value by the bomber's top speed, and voila, we get the time it takes to reach “firing range”.

Thanks to the wonders of maths, the results here start to get a little... hairy.

Bomber TypeTime to reach ARR from 4k range (seconds)
Piranha10
Khopesh11.1111111111
Dagger11.4285714286
Trident15.3846153846
Longbow10
Flash8.8235294118

Next up, for those bombers with multiple shots and a cooldown time for their weapons, there must also be a total time it takes for them to unload that ordnance. If we assume the bomber continues flying towards the target during this time, then they must gain extra distance from the carrier while firing, which will play into the sortie time.

The equation here is in two parts. First we figure out how long the bombers take to fire all their ordnance in seconds, by multiplying their ammunition value minus one (since the last shot doesn't need a cooldown after it) by their shot cooldown. Then we multiply that time by the bomber's top speed, which gives us the extra distance they cover while firing.

At the same time, we also add that extra distance to the original “distance to firing range” value, to get the total distance from the bomber to its carrier once it has expended its ordnance and heads back home.

Bomber TypeExtra distance gained during fireTotal return distance to carrier
Piranha1,3502,850
Khopesh1172,117
Dagger0*2,000
Trident0*2,000
Longbow0*2,000
Flash1,2752,775

* Note that the Dagger, Trident and Longbow all have 0 extra distance gained due to them having single shot weapons (or in the case of the Trident, a pair that fire in sync) and therefore don't have to worry about weapon cooldowns.

Now we have the total distance from the target back to the carrier, we can calculate how long it now takes the fighter to return. For the record, this is exactly the same as the “time to firing range” and the “time to fire ordnance” values added together, but I've calculated it out anyway. Then we add 2 seconds – a completely guessed value for how long it takes the bomber to land, re-arm and launch again – and add up all the time values to get the total sortie time.

Bomber TypeTime to return to carrierApproximate time to re-armTOTAL SORTIE TIME (seconds)
Piranha19231
Khopesh11.7611111111224.8722222222
Dagger11.4285714286224.8571428571
Trident15.3846153846232.7692307692
Longbow10222
Flash16.3235294118227.1470588235

Interesting! So while the Piranha and Flash previously held the records for total potential sortie damage by a huge margin, they're also some of the worst in the realms of sortie time.

Last but not least is to divide the total sortie damage by the total sortie time, to get the calculated damage per second for each bomber wing. To display more easily, I've rounded these all down to the nearest whole number.

Bomber TypeCALCULATED DAMAGE PER SECOND
Piranha387
Khopesh225
Dagger120
Trident122
Longbow90
Flash442

The Piranha is still very high on this list, but interestingly we can now see part of why the Flash is such an effective bomber!

At this point it's worth pointing out again that this does not account for other factors, such as damage type, effectiveness against different targets, PD saturation, and per-shot damage, the latter being important for armour penetration.



All practical purposes aside, this was fun to calculate out, and I find these numbers really quite interesting to look at, and compare to what I know as these bombers' various other strengths and weaknesses. Perhaps you have learnt something, or perhaps you have have found this utterly pointless, but all the same, I hope you have enjoyed.  8)

- AxleMC131
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

Code
Bomber Type	Wing Size	Top Speed	Attack Run Range	Ammunition	Shot Damage	Shot Cooldown
Lightning 2 339* 400 1 1,400 0
Inferna 6 150 1,500 1 1,000 0
Teuton Smiter 3 150 800 1 1,550 0

Bomber Type TOTAL SORTIE DAMAGE
Lightning 1,400 x 1 x 2 = 2,800
Inferna 1,000 x 1 x 6 = 6,000
Teuton Smiter 1,550 x 1 x 3 = 4,650

Bomber Type Time to reach ARR from 4k range (seconds)
Lightning 10.6194690265
Inferna 16.6666666667
Teuton Smiter 21.3333333333

Bomber Type Extra distance gained during fire Total return distance to carrier
Lightning 0* 3,600
Inferna 0* 2,500
Teuton Smiter 0* 3,200

Bomber Type Time to return to carrier Approximate time to re-arm TOTAL SORTIE TIME (seconds)
Lightning 10.6194690265 2 21.2389380530
Inferna 16.6666666667 2 33.3333333333
Teuton Smiter 21.3333333333 2 42.6666666667

Bomber Type CALCULATED DAMAGE PER SECOND
Lightning 132
Inferna 180
Teuton Smiter 109

P.S. some of your attack run ranges are wrong.  For non-bomb weapons, the actual weapon range is used instead, unless it's tagged with the flag that allows it to be fired from beyond max range (like the Longbow's sabot).
« Last Edit: January 29, 2018, 12:42:41 PM by Dark.Revenant »
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile

P.S. some of your attack run ranges are wrong.  For non-bomb weapons, the actual weapon range is used instead, unless it's tagged with the flag that allows it to be fired from beyond max range (like the Longbow's sabot).

Oh wow, really? I was not aware of that. Thanks for the heads-up!
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

One of the reasons bombs come out behind most other things is because of their slow speeds; this means their inaccuracy is huge, if the bombs aren’t released sufficiently close.  I’ll put up the plug-in formula for that in a bit; that’s pretty straightforward to calculate.

You’re also not accounting for PD.  You’ll have to make some assumption there as a basis; perhaps a good initial number would be 10 damage / projectile / 200 SU (as a starting number; I’m just putting a guess out here).  So projectiles that travel farther are much more likely to get absorbed by PD.  

From your OP, I gathered that your missile might be feeling hyper-efficient because of this factor (the fast-moving missiles will be in the PD window less time and the double projectile means PD might waste damage). in which case merely lowering the projectile hitpoints might make a huge difference in balance; Alex balanced his missiles roughly vs. the Vulcan, IIRC.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

So... the Excel / Google Sheets / OpenOffice formula for hitting a target with a radius of 40 with a bomb (or other unguided projectile) is:

=min(40/((sqrt(F7^2 + F7^2 - (2*F7*F7*COS(((W7 +X7)/2) * 0.0174532925))))),1)

Where F7 is the maximum range in the CSV (not the true range of the projectile, in the case of bombs; that's determined by the projectile timer) W7 and X7 are minimum and maximum spread (averaged in this formula).

Note that this doesn't take into account shot speeds, because it's presumed that the projectile is launched using the standard quadratic equation for aiming them perfectly.   IRL, this isn't sensible for slower projectiles, because they are moving so slowly that the Circular Error Probability is considerably larger (think of it as increasing W7 and X7 in correlation with range).

Short version:  bombs suck at hitting anything small and fast.  You already knew that.  But that's the math.

I think you're also going down some other random rabbit-holes with your presumptions:

1.  What is the chance the bomber dies on the way to the target?  Are your supposedly-broken missiles on a platform that doesn't die very often?
2.  What is the chance the bomber survives to attack again? 
3.  How quickly will dead bombers be revived and get to strike again?
4.  Are there any factors that might significantly change the results, and why?  For example, are some projectiles inherently better at striking targets that have more PD because they have more hitpoints or move more quickly?  What type of PD best-counters a projectile, or is there one type that's inherently better?  Is that a reflection of poor balance in the Vanilla design?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile

Uhh...

@xenoargh I think you've misunderstood the point of this post. ??? This isn't me complaining that my bomber is too powerful and I don't know why, this was me doing that in my own time (and figuring out why), then doing all this math anyway and thinking "Wow, these numbers are cool, I should share them!"

Apart from the lead-in, this post has nothing to do with the Firebird - which, by the way, is not "broken". :P It was simply a little more powerful than I expected, and I was considering giving it a cost increase to compensate. During the course of these calculations it was theorized and confirmed that the reason the Firebird seems to do more damage is due to several factors:
- Its primary role is that of an anti-frigate bomber, so comparing it to anti-bigger-ship bombers isn't really a good idea.
- Out of the initial three bombers I compared it to the Firebird was the only one with a guided projectile, and a very fast one at that.
- Given the characteristics of the Swift Burst MIRV (the Firebird's payload), the secondary projectiles had a tendency to hit a small target from all directions, something AFAIK no stock bomber does.

And yes, I was ignoring things like PD and other weapons etc. I did that deliberately to keep the calculations fairly simple - all I was looking at was raw potential damage. That's it. Sortie Damage, Sortie Time and therefore Damage Per Second were the only things I was comparing here. How a bomber performs is definitely not solely dependant on its damage potential.



TLDR: Basically, the Firebird is definitely good at what it does, but has far inferior bomber performance outside of its anti-frigate role. The main point of this forum post was simply to explain the context, do a little math, and share some numbers that I found interesting. And those numbers were simply raw potential damage, ignoring all other external factors.
« Last Edit: January 30, 2018, 09:11:46 PM by AxleMC131 »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

It's cool, man, was just trying to help you out; the math on these things is much more complicated than it looks initially, is all :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile

... the math on these things is much more complicated than it looks initially, is all

Believe me, I know. XD There's a damn good reason I didn't want to factor anything else in apart from damage and time.
Logged