[1.11] Weapon tracking speed doesn't make sense

What is the relationship between weapon tracking speed and the enemy ship’s speed? Is it just, if tracking speed > ship speed, hit, else miss? This doesn’t seem to be the case. I’ve actually noticed that, even when tracking speed is considerably higher than ship speed, the vast majority of shots miss.

To test this, I created two units: a pack of fast rocket fighters and a single cruiser piled with cruiser defense lasers and tracking modules.

The rocket fighter build is:

[config]
name = rocket fighter 
guiname = rocket fighter 
hull = Federation Falcon Fighter 
cost = 109 

[modules]
0 = fighter power,
1 = fighter_rocket,
2 = fighter_engine III,
3 = fighter_engine III,

This results in 3.24 speed. Given that it uses rockets, a current bug (fixed, AFAIK, for 1.12) results in them orbiting the cruiser unable to fire.

The anti-fighter cruiser build is:

[config]
name = anti-fighter test cruiser 
guiname = Anti-fighter test cruiser 
hull = Federation Eagle Cruiser hull 
cost = 3444 

[modules]
0 = cruiser_defence laser,
1 = cruiser_defence laser,
2 = cruiser_defence laser,
3 = cruiser power III,
4 = cruiser_defence laser,
5 = cruiser_targetboosterII,
6 = cruiser_targetboosterII,
7 = cruiser_defence laser,
8 = cruiser_defence laser,
9 = cruiser_defence laser,
10 = cruiser droidbay,
11 = cruiser_armour V,
12 = cruiser_armour V,
13 = cruiser_armour V,
14 = cruiser_armour V,
15 = cruiser_armour V,
16 = cruiser_armour V,
17 = cruiser_armour V,

This has 7 cruiser defense lasers, which are 3.7 speed. The two level 2 tracking boosters should add ((0.16+0.16)*0.6 eff.)=0.192 for a total speed of 3.892, if I understand how tracking boosters work. At this speed, they are significantly faster than the ships and should be fully capable of hitting them.

When I ran the battle, it took over a minute at 4x before it was over. In the end, only 10% of the cruiser shots landed.

This is the fastest weapon I’m aware of and it was unable to take out even a moderately fast fighter. Even worse, this cruiser – purposely built for taking out fighters – wouldn’t stand a chance against them if I hadn’t intentionally crippled their weapons.

There are probably a few problems in here, but the one this post is about is the tracking speed. How does it work? Do these results point to a bug somewhere? The logic behind this should be made clearer to the player, including how tracking boost applies to the weapon tracking speed (is it strictly additive?). Also, the tracking speed logic likely needs to be changed so that even moderately fast ships can be hit with some consistency.

there is speed, and there is angular speed. We should rly ask admin ;]

If a targets speed is FASTER than the weapons tracking speed, there is a 2% chance of a lucky hit
Otherwise you divide the speed by the tracking speed, and the hit chance is the inverse. So if target speed is 2 and tracking speed is 5, the hit chance is 0.6, or 60%
If the target is cloaked, an additional variable is calculated at this point.
There is then a calculation based on ship size.
The size factor is 0.5 + ((shipsize/256 meters) * 0.5)
That is then multiplied by the hit chance to get the final hit chance.

Example: Target speed 2.5, size 16, tracking speed 2.9
hitchance = 1.0 - (2.5 / 2.9) = 0.13
sizefactor = 0.5 + ((16/256) * 0.5) = 0.531
final hitchance = 0.13 * 0.531 = 0.069 (6.9%)

Example: Target speed 0, size 200, tracking speed 1.0
hitchance = 1.0 - (0/1.0) = 1.0
sizefactor = 0.5 + ((200/256) * 0.5) = 0.89
final hitchance = 1.0 * 0.89 = 89%

Note that target boosters affect weapons tracking speed, not the final hit-chance directly.

BTW I am testing some stacking penalties for fighter engines which should slow down those twin-engine fighters and make the hit chances for fast fighters less of an issue.

So am I right in assuming that your own ships speed has no effect on its accuracy?

Well this explains a lot. This is why when fighter reach a certian speed (2.8-2.9) Both fighters and and frigate weapons can no longer hit them more than 2% of the time. Only cruisers have a weapon with tracking speed greater than that.

It’s interesting that the size of a ship actually matters. I’ll make me take a second look at every hull out there.

Thanks for the info, Cliff! The size factor in particular is very interesting to hear about.

Incidentally, I’m sure you’ve taken this into account, but what happens when the weapon’s tracking speed is higher than the target’s speed, but the calculated hit chance is less than 2%? Is there just a hard-coded minimum of 2%?

There is always a minimum hit chance no matter the speed difference

Thanks Cliff. I’ll need to collect a few more numbers, but I’ll verify that this explains the hit percentages I was seeing in my test case.

BTW, you may want to add something about this in the manual. You probably don’t need the whole explanation, but my intuitive guess was MUCH simpler than this and certainly didn’t factor in things like the size of the ship or a 2% minimum hit chance.

yes that’s very true. As the game gets closer to release I’ll be beefing up the manual with some gratuitous facts and figures like this.

This formula is very interesting. What is means is that the first tiny fraction of tracking speed over the target’s speed is immensely important. Going from just below the tracking speed to just above it gives a huge difference in hit probability. This seems to point to an obvious solution to the ultra-fast fighter problem: Add a few a low DPS, very low armor penetration weapons with very high tracking speeds of (e.g. 10). Such weapons would care much less for the difference in speed between a armored gunboat moving at 2.0 (tracking speed 10 would give about 40% to hit) and a multi-engine interceptor moving at speed 3 (about 35% to hit), so there might not be as much need to nerf fighter engines.

It’s also very interesting how the size factor works. The small sizes of fighter hulls mean that weapons will never have better than about a 50% chance of hitting a them, even at ridiculously high tracking speeds. Similarly weapons targeting frigates will max out around 75% (or more like 60% for the smallest ones). Stacked on top of the tracking speed issues (fighters can move much faster than cruisers!) this seems excessive, as its effect is simply to make all anti-fighter weapons terrible. A weapon that should be able to kill a large fighter (~50 hp) in a short time (10 seconds) needs to be capable of a relatively high theoretical DPS (10) even if it has an exceptionally high tracking speed because of the 50% max hit rate. The trouble is, such a weapon would be as good as some of the better cruiser sized weapons at tearing up other cruisers once their armor was gone (the very popular Cruiser Plasma Launchers do a nominal 10 DPS, for example). That seems crazy. There needs to be some way for fighters to be attacked effectively with weapons that are not as effective against larger ships, but the game mechanics don’t seem to allow that.

Excellent thread. Thanks for all the detail.

Being an old Star Fleet Battles player I love the detail.

I see this was all posted before the release. Two Qs: Is the to-hit formula still the same post-release? Also, does range have any effect on the to-hit chance?

Thanks.

Blackknight is spot-on about anti-fighter weapons. Another simple solution is low damage, high ROF. The trouble is such weapons also tear up capital ships once armor is gone. This is a problem, IMO, since I disagree with the notion that armor gets ablated away like peeling an onion in the first place.

None, but it does affect the amount of damage done, scaling from 50% damage at minimum range, up to 100% at optimum range, down to 50% at maximum range.

Wow. That is an incredibly useful tidbit for modders.