The function number N/A
The complete error text N/A
The window affected Main Window, Singapore System
What you were doing at the time Point Defence with reduced chance-to-hit twin guas-turrets
Conventional or TN start TN
Random or Real Stars Random
Is your decimal separator a comma? dot
Is the bug is easy to reproduce, intermittent or a one-off? easy with the db
If this is a long campaign Year 8
There was a forum thread suggesting that more weapons with reduced size
would be more effective as PD than fewer normal sized.
So i build a 0.6 HS (10% chance to hit) gauss cannon and build twin turrets with an TS of 16000 km/s
My Napoleon failed to hit any of the alien missiles (35,200 km/s )
I know that the chance to hit is low, but event log indicates that it is still 1%.
As i did not safe at this point, I recreated this with SM created/moved ships.
10 ships fire each 180 shots at 7 missile salvos = 126000 shots and hit 0
- So either the chance to hit is much lower and the event log is showing the wrong number,
- there is a bug (rounding error)
- or my fleet is very very ..... very unlucky
AuroraDB-test-low-to-hit-1 .db is a few seconds before the first impact,
AuroraDB-test-low-to-hit-2 .db after 7 salvos engaged
I setup some scenarios to replicate your bug in the bug thread, and I think I figure out what went wrong.
In short, if the final hit chance is between 0.5% and 1%, the display will round it to 1, but the actual hit chance will be rounded down to 0. If the final hit chance is slightly higher than 1%, it seem to be working as expected.
My setup: incoming missiles at 100kkm/s, turret tracking speed 40kkm/s, missiles have ECM 6, BFC has ECCM 2, BFC 10kkm accuracy 98%, 10% size gauss
Test 1: Active range against 6MSP is 14,419,238 km, the missiles can traverse this distance in less than 29 ticks, so the final tracking bonus is 28%. In this case, hit chance can be calculated as:
( (40000*1.28/100000)*0.98 - (0.6-0.2) ) * 0.1 * 100% = ( 0.50176 - 0.4 ) * 10% = 1.0176%
The displayed interception chance is 1%. The interception used 16650 shots out of 18000 available shots to intercept 180 incoming missiles, which gives an accuracy of 1.081%
Test 2: Active range against 6MSP is 13,894,726 km, the missiles will spend less than 28 ticks in this range, so the final tracking bonus is 27%. In this case, hit chance can be calculated as:
( (40000*1.27/100000)*0.98 - (0.6-0.2) ) * 0.1 * 100% = ( 0.49784 - 0.4 ) * 10% = 0.9784%
The displayed interception chance is still 1%, however the interception hits 0 out of 18000 available shots.
Attached is the DB for the above setups:
The attacking side is the Earth Federation on Earth. 10 missile destroyers have been setup in the Battle Fleet to fire 30x 6-missile salvos.
The defending side is the Martian Republic on Mars. 10 PD ships of the Gauss 10 PD class are setup for final PD with the proper PD settings. 2 long range AMM sensors are available. For test 1, nothing needs to be adjusted. For test 2, turn
off the active sensor on Gauss 10 PD 001.
While I still have the setup around, I tested a bit more.
Same setup: incoming missiles at 100kkm/s, turret tracking speed 40kkm/s, missiles have ECM 6, BFC 10kkm accuracy 98%, 10% size gauss. This time BFC has ECCM3. This can be achieved with the same DB, but SM edit Gauss 10 PD class to replace its ECCM2 with ECCM3, and then use auto FC assign for all 10 ships in this class in the Battle Fleet.
With 28% tracking bonus, the hit chance is:
( (40000*1.28/100000)*0.98 - (0.6-0.3) ) * 0.1 * 100% = ( 0.50176 - 0.3 ) * 10% = 2.0176%
The interception showed 2% hit chance, 8832 shots fired destroying all 180 missiles, which gives an accuracy of 2.0380%
With 27% tracking bonus, the hit chance is
( (40000*1.27/100000)*0.98 - (0.6-0.3) ) * 0.1 * 100% = ( 0.49784 - 0.3 ) * 10% = 1.9784%
The displayed interception chance is 2%, while 18000 shots filed hitting 164 missiles, which gives an actual accuracy of 0.9111%. So the actual hit chance used in game is probably again rounded down to 1%, which is inconsistent with the displayed hit chance.
As an overall suggestion for fixing this bug, @Steve please use double for the hit percentages (and in the log), rather than int.