# Hit formula for weapons?

#### f98alda

##### Second Lieutenant
Does anyone know the actual formula used now for determining if a weapon hits?
What I have found so far is that tracking counteracts evasion, and then accuracy and remaining evasion determines the probability of hitting. I haven't found the actual formula, though.

What I'm really trying to figure out is what weapons I should use. In my current game, I have tier 2 lasers and tier 1 missiles and kinetic. Going by the raw DPS listed, it looks like the base kinetic weapon is better than the tier 2 lasers, at longer range, which seems a bit strange. However, I expect the DPS calculation doesn't take any evasion into account, but without the actual formula I can't really determine which to use.

#### Karl244

##### Major
Try both and see which one is better?

#### GloatingSwine

##### Field Marshal
I'm p. sure it's just Accuracy-(Evasion-Tracking).

NB: Listed DPS values do include accuracy, so if you want to work out the accuracy against a given theoretical target you need to recalculate the average DPS without that.

(And the answer is kinetic, the extra DPS does make up for the lower accuracy and more besides. Energy takes over late game with the ability to counter heavy armour on plasma weapons, but start from kinetic)

#### jju_57

##### Field Marshal
No one knows for certain as this information was never released. Best guess is Accuracy - (Evasion - Tracking) = hit rate.

EDIT: There is still over targeting which means overkills and wasted damage. Therefore, a faster firing weapon has a lower chance of wasting damage against a target that will be killed anyway.

Last edited:

#### f98alda

##### Second Lieutenant
OK, I did a little checking against the values in the weapon_components.csv file. If we assume that the formula Accuracy - (Evasion - Tracking) = hit rate is correct, the small mass driver is pretty much strictly better than the small red laser. In fact, you would have to have 90% armour for the laser to be better. This seems a bit off, I have to say.
Since they both have the same tracking, and quite a high one at that, evasion doesn't even really come into play until much later in the game (and doesn't affect the relationship between these two weapons).
What's more, you actually have to have 11% armour for the small blue laser to be better than the small masic mass driver, and even with higher armour values, the difference is very small.

This means we have one starting weapon choice which is strictly better than another, and even usually better than the second tier of the other.
Re-balancing needed here...
What I think should be done is to lower the tracking value of the basic mass drivers a bit, so the basic ships actually have a chance of evading them. It should be lowered enough to get them approximately in line with the laser for normal corvette evasion.

• 2

#### DarkFenX

##### Second Lieutenant
Formula which makes accuracy to work exactly the same as tracking makes little sense to me (why won't you merge them?). Formula which acts as DPS multiplier also looks weird - you can merge min/max damage and accuracy into just min/max damage, changing average and increasing spread a bit.

This one looks quite good, from my PoV:
http://www.stellariswiki.com/Space_warfare

#### Risa

##### Lt. General
OK, I did a little checking against the values in the weapon_components.csv file. If we assume that the formula Accuracy - (Evasion - Tracking) = hit rate is correct, the small mass driver is pretty much strictly better than the small red laser. In fact, you would have to have 90% armour for the laser to be better. This seems a bit off, I have to say.
Damage of mass driver weapon lines are probably bugged. If you replace max_damage with (max_damage - min_damage), you will find it gives about the same accuracy-adjusted damage per day. So it's very likely that the script writer is using (min_damage + max_damage) as a guiding tool to balance weapons and erroneously fill that value to column of max_damage.
I posted a bug report about that.

• 2

#### Risa

##### Lt. General
Formula which makes accuracy to work exactly the same as tracking makes little sense to me (why won't you merge them?). Formula which acts as DPS multiplier also looks weird - you can merge min/max damage and accuracy into just min/max damage, changing average and increasing spread a bit.

This one looks quite good, from my PoV:
http://www.stellariswiki.com/Space_warfare
Formula is: chane_to_hit = Acc - max(0, eva - trk).
So weapon with high tracking can help hitting target with high evasion. But if the target don't have much evasion, it won't make the gun more accurate.

• 1
• 1

#### f98alda

##### Second Lieutenant
Formula which makes accuracy to work exactly the same as tracking makes little sense to me (why won't you merge them?).
The reason not to merge them is to be able to have large weapons unable to hit evasive craft, but still able to hit large craft, and at the same time not necessarily have small weapons hit large ships 100% of the time.

#### DarkFenX

##### Second Lieutenant
Formula is: chane_to_hit = Acc - max(0, eva - trk).
So weapon with high tracking can help hitting target with high evasion. But if the target don't have much evasion, it won't make the gun more accurate.
Has anyone actually tested it? Like, for example, do guns with 0.7 accuracy and 5 tracking (large arty) still miss 30% of shots vs battleships which have 5 evasion?

The reason i'm asking is that info on the wiki has at least some tests backing it.

#### jju_57

##### Field Marshal
Has anyone actually tested it? Like, for example, do guns with 0.7 accuracy and 5 tracking (large arty) still miss vs battleships which have 5 evasion?

The reason i'm asking is that info on the wiki has at least some tests backing it.

Well they should miss and if you look at final results and hold the mouse over the hit button you do see that they have missed. Your brief scenario with no other inputs would result in 70% hit ratios.

#### DarkFenX

##### Second Lieutenant
Well they should miss.
Yes i understand that they should miss according to your formula. But the question i am asking is different - did someone actually test it in game?

#### grekulf

##### Stellaris Game Director
Formula is: chane_to_hit = Acc - max(0, eva - trk).
So weapon with high tracking can help hitting target with high evasion. But if the target don't have much evasion, it won't make the gun more accurate.
This is true.

And in regards to mass drivers - consider that their accuracy is much lower than lasers, so every point of evasion is a bigger loss in overall damage dealt.

You choose the weapon depending on what you are planning to fight.

• 10

#### domein

##### Vintage Brewer
Use overwhelming force, this works every time. As every battle happens in the flat field, law of overwhelming force works perfectly.
Would be cool if ships would cover each other with shields, or if they could hide from enemy fire behind debris from destroyed friendly ships, or take cover in the asteroid fields.
Ah dreams dreams.

#### DarkFenX

##### Second Lieutenant
This is true.

And in regards to mass drivers - consider that their accuracy is much lower than lasers, so every point of evasion is a bigger loss in overall damage dealt.

You choose the weapon depending on what you are planning to fight.
Thank you for confirmation.

• 1

#### Knightroglycerine

##### Corporal
Wait, I'm still a bit confused. Does accuracy counter evasion, or does tracking counter evasion? Or both, and in that case, why have two stats that do the same thing?

#### EntropyAvatar

##### General
Wait, I'm still a bit confused. Does accuracy counter evasion, or does tracking counter evasion? Or both, and in that case, why have two stats that do the same thing?

The way I'd put it, evasion counters accuracy, and tracking counters evasion. The difference is pretty subtle, but the max() in formula makes accuracy and tracking different. Namely, accuracy is always useful, but tracking is only useful up to the point where it fully counters evasion. So accuracy helps you hit battleships, but tracking doesn't play much role there. On the other hand, even 100% accuracy by itself is going to have a low hit rate against high-evasion corvettes, so you need tracking there.

#### chopak

##### Major
Evasion counters Accuracy, and Tracking counters Evasion. Tracking want do much if your gun has shitty Accuracy.

#### Torakka

##### Major
Wait, I'm still a bit confused. Does accuracy counter evasion, or does tracking counter evasion? Or both, and in that case, why have two stats that do the same thing?
According to the formula above, accuracy and tracking both kind of counter evasion, but there are also some differences:

1) Tracking only counters evasion, so any amount of tracking over current target's evasion value is useless (it might, of course, still be usefull later when targeting another ship with higher evasion).

2) Accuracy determines your maximum change to hit (I.E. against a target with 0% evasion). It is harder to "cap" than tracking.

Basically, having these separate stats means that the developers (and modders) can make certain weapons and modules good against either all ships (accuracy) or only high evasion ships, I.E corvettes and maybe some destroyers (tracking).

EDIT: TLDR, if you ever have a choice between +1 accuracy and +1 tracking, pick the accuracy.