ChanceToHitTarget

Sorry if this has already been covered, but i couldn't find any information on this, so i looked into it. I was trying to find a way to make weapons inaccurate, so after looking at "ChanceToHitTargetType" in the gameplay.constants, which was a dead end since it blankets all ships, i looked at these two modifiers instead, "ChanceToHitAsDamageTarget and ChanceToHitAsDamageDealer". After putting "ChanceToHitAsDamageDealer" into a passive buff and applying it to a krosov with a single beam weapon, i tested the hit chance from it. It doesn't make shots 'miss', but it does seem to stop a certain proportion of shots from firing.

A -100% (-1.0) hit chance seemed to stop roughly half of the shots from the ship from firing. from this i guessed that the actual firing chance was equal to 1 / (1-n), so i changed the value of n and kept testing it. I used 10 ships at a time and made the entire set fire 30 times, for a maximum of 300 shots.

a

Negative hit chance -100% -150% -200% -250% -300%   -400%   -500%
Maximum hits per round 10 10 10 10 10   10   10
Actual hits per round                  
  6 3 4   3   1   2
  5 1 4   4   2   2
  5 7 4   2   0   2
  7 2 5   1   2   3
  8 2 3   5   2   2
  5 4 3   4   1   1
  3 5 3   3   3   2
  4 2 3   2   2   1
  5 2 3   5   1   2
  5 6 3   6   2   1
  5 5 4   3   1   1
  4 6 1   3   3   1
  5 2 4   2   0   0
  1 2 5   1   1   2
  5 7 5   2   4   1
  5 3 3   3   3   0
  4 6 4   1   2   1
  6 4 3   2   2   0
  6 2 4   2   2   2
  3 3 5   4   1   4
  3 2 5   2   4   1
  7 1 1   4   2   0
  6 4 3   1   2   2
  4 5 2   2   1   1
  5 4 4   4   3   2
  7 5 5   1   1   2
  4 4 2   4   2   0
  3 2 6   3   1   1
  4 5 4   3   2   1
  5 8 3   3   0   1
                   
Total Hits (out of 300) 145 114 108   85   53   41
Hits per 10 shots 4.8333 3.8 3.6   2.8333   1.7667   1.3667
                   
Standard Deviation 1.464131 1.919051 1.191927   1.315251   1.040004   0.927857
                   
(sqrt of n-1) 5.385165 5.385165 5.385165   5.385165   5.385165   5.385165
reciprocal of (sqrt of n-1) 0.185695 0.185695 0.185695   0.185695   0.185695   0.185695
Uncertainty Average 0.271882 0.356359 0.221335   0.244236   0.193124   0.172299
Average hits per 10 4.8333+-0.2719 3.8+-0.3564 3.6+-0.2213 2.8333+-0.2442 1.7667+-0.1931 1.3667+-0.1723
Percentage of hits 48.33% +- 2.71 38% +- 3.56 36% +- 2.22 28.33% +- 2.44 17.67% +- 1.93 13.67% +- 1.72
Predicted % of hits 50% 40% 33%   25%   20%   16.67%

a

So it seems that 1 / (1-n) is a reasonable fit for the data. I ran the same tests with "ChanceToHitAsDamageTarget", this time with the krosovs firing on a cobalt with a passive buff, and the results were similar, a -100% (-1.0) buff preventing roughly half the shots against it from firing. When a ship with the miss buff fires on a ship with the dodge buff, the buffs are applied separately and multiplied. So a -100% ChanceToHitAsDamageDealer firing on a -100% ChanceToHitAsDamageTarget only fired roughly 25% of the time, and a -200% / -200% only fired roughly 11% of the time.

Note: these results are only valid when the ship fires from only a single point in the mesh. When i ran some of the tests on ships that fired a weapon from more than one point, they seemed to suggest that the firing chance is applied to each point separately. I'm not sure about how this affects the damage, i'll have to look further into this.

 

 

2,425 views 3 replies
Reply #1 Top

I don't think the game actually has a proper accuracy system. As far as I can tell a negative chance to hit is just a damage debuff.

 

I tested it with some flak frigates with a -100000% chance to hit debuff fighting some fighters with 1000000 damage per shot. If the game was actually checking if an attack hit, a ship should only rarely get hit but when it does it should be instantly destroyed. Instead, every single attack did some damage but didn't one hit kill. Thus it seems the chance to hit modifier is just another damage debuff effect.

 

I also know for a fact the game doesn't really take hard points or the number of shots fired into account, you don't actually need weapon points or weapon effects for the game to do damage, the core numbers in the entity file is all that matters. Everything else is cosmetic.

Reply #2 Top

Are you sure? Try using the same setup that I am. Give a random frigate a beam weapon that fires every 10 seconds or so. With a passive ability that gives the chancetohitasdamagedealer it clearly only fires a fraction of the time.

Reply #3 Top

Sounds interesting, anyone able to confirm this at all?