[1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons - Explained.

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
Kajar
Posts: 125
Joined: Sun, 15. Aug 10, 13:23
x4

[1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons - Explained.

Post by Kajar » Tue, 26. Oct 21, 16:52

Good Morning/Evening.
This is a thing I noticed when i happened to have a TER Pulse Mk1 for an extended time. The in-game encyclopedia did show a rate-of-fire of 1.33 shots per second, while it looked like it was firing at 2 shots per second and it turned out it in fact does.
Thus I went into a deep dive into the weapons and i found a number of incorrect values. Four types in total.

Type 1: Weapons that have burst-clips - Pulse Laser, Bolt Repeater etc - all have the rate-of-fire calculated incorrectly and actually fire faster, and thus have more dps and heat generated than what is listed in-game.
Example 1: TER S Pulse Mk1 is listed with 82 dps and 1.33 shots per second. Correct values are 124 dps and 2 shots per second.
Example 2: M Pulse Turret is listed with 72 dps and 6 shots per second. Correct values are 86 dps and 7.2 shots per second.
Likely cause: The formula to calculate the rate-of-fire and thus dps and heat fails to consider that the first shot in a burst-clip is "free" - fired without a delay.

Type 2: Large Pulse turrets have values for burst-clips as well, but it happens that they only use the "Reload Time" value and the clips are completely ignored. The Encyclopedia however still calculates the clips and thus shows incorrect values.
Example: SPL L Pulse Turret has a 4-shot clip with an interburst time of 0.7 seconds and a reload time of 1.9 seconds. The encyclopedia calculates it as such. What actually happens though is that only the Reload Time of 1.9 seconds is used and the burst-clip etc. is completely ignored by the game and never happens.

Type 3: Shard Battery and Tau Accelerator have incorrect heat-generated value in the encyclopedia.
Example: S Shard Battery Mk1 is listed with 245 heat per second, which fits nicely into it's 1 shot per second. Therefore i should be able to fire 41 shots until i overheat. In reality i can only fire 9 shots until overheat.
Likely cause: Heat is generated per projectile fired, not per shot and so the S Shard Battery Mk1 generates 5x245 heat per shot. The Encyclopedia appears to fail to include the multiple projectiles into the heat calculation for the Shard Battery and Tau Accelerator.

Type 4: Mass Driver, Boson Lance and Meson Stream. Because of how those weapons work, the encyclopedia is way off about their damage numbers. They probably need a formula of their own.

I have created a small, rough and ugly data sheet with my results. I did test those numbers in-game and was able to confirm them to be correct.
https://docs.google.com/spreadsheets/d/ ... edit#gid=0

I hope i was able to help making the game a tiny bit better. <3

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Shuulo » Tue, 26. Oct 21, 19:44

I can confirm that there is a discrepancy for weapons with clips used, thus incorrect values. I assume those values are also used in OOS calc so its also impacted.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: [BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Imperial Good » Tue, 26. Oct 21, 23:07

My own calculations showed the values were correct? You probably need to show the maths, maybe with video evidence.

Be aware that there is some smoke and mirrors going on. For example TER L bolt looks like it shoots a lot of projectiles, but actually each 6 shots is a single missile with a model looking like 6 shots. A lot of weapons do this visual deception to keep the projectile count low.

Some turrets, such as TER L Pulse, fire 2 shots per round, which counts as a single ammo from the magazine. Encyclopaedia does correctly factor this in.
aversin wrote:
Tue, 26. Oct 21, 16:52
Type 4: Mass Driver, Boson Lance and Meson Stream. Because of how those weapons work, the encyclopedia is way off about their damage numbers. They probably need a formula of their own.
I think the DPS for them is correct? Just the low attention calculations are meant to have them practically never hit anything small, but due to being guns they always hit. Similar to how the Asguard XL battery swats S ships from the sky low attention, but in sector struggles to even hit large targets like L destroyers in AI hands.

Kajar
Posts: 125
Joined: Sun, 15. Aug 10, 13:23
x4

Re: [BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Kajar » Wed, 27. Oct 21, 10:02

As mentioned, i did test the numbers in-game. I did a whooole bunch of weapon testing and data digging over the last few months and am certain i have all the quirks figured out at this point.

Anyway, Tests are easy enough to do. Just do a custom start and equip your ship with the weapons in question and a few extra target ships.
S Pulse Mk1 with a listed dps of 81 should take 40 seconds to destroy an unshielded Kalis fighter - 3300 hull. However, it only takes 33 seconds, which fits with 99 dps.
TER Pulse Mk1 with a listed dps of 82 also should take 40 seconds to destroy a Kalis fighter - 3300 hull. However, it only takes 26 seconds, which fits with 124 dps.
It is also rather easy to notice that the TER Pulse is firing at 2 shots per second and not 1.33.

Requested video proof: https://www.youtube.com/watch?v=vWYXzCqV63A

Yes, i am aware that the L Pulse turrets all shoot two projectiles. The magazine however is not used by the weapon for whatever reason. The encyclopedia still calculates the magazine though and thus the listed dps is also lower than what actually happens on the battlefield.

TER L Pulse Turret is listed with 378 dps and should take 61 seconds to destroy a Chtonios Vanguard - 23000 hull. However, it takes slightly less time at 57.5 seconds. Consistently. Which fits with 399 dps.
SPL L Pulse turret is listed with 321 dps and should take 71 seconds to destroy the Chtonios Vanguard - 23000 hull. Again, it takes slightly less time at 65.5 seconds. Again, consistently. Which fits with 351 dps.
I even checked the audio file of a recording to be sure. The L Pulse Turrets do not use the magazine mechanic. They fire consistently at just their Reload Time value. The burst-clip values are completely ignored by those turrets.

Here i used two TER L Pulse just to make it go a bit quicker. According to the Encyclopedia it should take some 30 seconds to destroy the target. However it consistently takes only 28 seconds. The margin is small, but it is there. This goes for all L Pulse turrets except the Paranid one, since they have no burst-clip assigned to them and thus get calculated correctly.
https://www.youtube.com/watch?v=DKQFakzhDZ4


The Mass Driver and Boson Lance are oddballs. Let's start with the Mass Driver. The first hint that something is wrong should be that both the Mk1 and Mk2 variants have the same dps values even though their heat generated is very different. 8000 for Mk1 and 4500 for Mk2. Seems like the encyclopedia doesn't consider Initial Heat at all.
Second, for both weapons it calculates a single bullet - which is correct. However, it doesn't calculate that this single bullet hits three times. While the S Mass Drivers have a damage value of 500, it actually deals 1500 damage. This happens because it has a Max Hit value of 3 but a ricochet chance of 0. Shard and Muon for example also have a Max Hit of 3, but DO have a ricochet chance and do not apply their damage multiple times to the same target.
Same thing happens with the Boson Lance, it also hits the target three times with a single bullet but the encyclopedia only calculates damage for one hit.
However, because those weapons use Initial Heat, and not Heat Generated Per Shot, the encyclopedia is way off.
And i don't have a clue what is happening with the Meson Stream in the encyclopedia.

According to the encyclopedia the M Boson Lance Mk2 has a dps of 1230 and should take around 18 seconds to destroy that poor Chtonios Vanguard once again. However, i actually need 70 to 80 seconds to destroy that ship, depending on how good i am on the trigger. This fits into my calculations of 282 sustained dps. 4800 damage per shot. Around 16 seconds to cool down enough to fire again.
According to the encyclopedia the M Meson Stream Mk2 has a dps of 5975 and 477 sustained. An Osaka has 95000 health. Going with sustained dps, i should need 199 seconds to destroy the Osaka.
I calculated a sustained dps of 612 and thus should need 155 seconds to destroy the Osaka. 12250 damage per shot. 20 seconds of cooldown. In the tests i did indeed need 158 seconds to destroy the ship and not 199 seconds.
Note that those weapons are designed for Alpha Strikes, dealing a lot of damage in a single shot, so the dps values can be somewhat scewed on lower health targets.
https://www.youtube.com/watch?v=nQslSAg13Lk

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: [1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Imperial Good » Thu, 28. Oct 21, 02:48

aversin wrote:
Wed, 27. Oct 21, 10:02
TER Pulse Mk1 with a listed dps of 82 also should take 40 seconds to destroy a Kalis fighter - 3300 hull. However, it only takes 26 seconds, which fits with 124 dps.

Code: Select all

      <ammunition value="2" reload="0.5" />
      <bullet speed="6220.8" lifetime="0.44" amount="1" barrelamount="1" icon="weapon_laser_mk1" timediff="0.005" angle="0.09" maxhits="1" ricochet="0" scale="0" attach="0" />
      <heat value="145" />
      <reload rate="2" />
      <damage value="62" repair="0" />
The 82 DPS value is obtained by the following calculation.

62 * 1 * 2 / (1 / 2 x 2 + 0.5) = 124 / 1.5 = 82.66...
aversin wrote:
Wed, 27. Oct 21, 10:02
TER L Pulse Turret is listed with 378 dps and should take 61 seconds to destroy a Chtonios Vanguard - 23000 hull. However, it takes slightly less time at 57.5 seconds. Consistently. Which fits with 399 dps.

Code: Select all

      <ammunition value="3" reload="0.5" />
      <bullet speed="2449" lifetime="2.476" amount="1" barrelamount="2" icon="weapon_laser_mk1" timediff="0.001" angle="0.02" maxhits="1" ricochet="0" scale="0" attach="0" />
      <reload time="3.1" />
      <damage value="619" repair="0" />
The 378 DPS value is obtained by the following calculation.

619 * 2 * 3 / (3.1 x 3 + 0.5) = 3,714 / 9.8 = 378.98

I think the problem here is that the addition of the magazine reload delay is blind and does not consider the reload speed of the weapon. Since 1/2 == 0.5 and 3.1 > 0.5, the result is that the entire magazine reload is masked under the normal weapon reload time, meaning the weapon is always limited by reload speed and never the magazine being empty.

For the damage estimate to be correct in this case the magazine reload must be ignored when weapon reload time is greater than or equal to magazine reload time.

For the above examples this would become...
62 * 1 * 2 / (1 / 2 x 2 + 0) = 124 / 1 = 124
619 * 2 * 3 / (3.1 x 3 + 0) = 619 * 2 / 3.1 = 399.35...
Which agree with your values.

When weapon reload is less than magazine reload then the factor has to be calculated representing the additional lost time due to waiting for magazine reload after the weapon has finished reloading. This is the magazine reload minus the weapon reload time.

An example of this would be the TER L batteries.

Code: Select all

      <ammunition value="18" reload="2" />
      <bullet speed="1440" lifetime="6.176" amount="1" barrelamount="1" icon="weapon_gatling_mk1" timediff="0.012" angle="0.21" maxhits="2" ricochet="0.01" restitution="0.3" scale="0" attach="0" />
      <heat value="183" />
      <reload rate="4.896" />
      <damage value="988" repair="0" />
988 * 1 * 18 / (1 / 4.896 x 18 + (2 - 1 / 4.896)) = 3249.86...

Of course it all depends on what is the intended behaviour. In these cases the current formula would be correct if magazine reload time was made to start only after the weapon has finished reload.

Kajar
Posts: 125
Joined: Sun, 15. Aug 10, 13:23
x4

Re: [1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Kajar » Thu, 28. Oct 21, 09:19

Well, this is already way beyond my math skills and so my approach was much more...basic. :D

For weapons with magazine i simply removed 1 shot from the calculation for rate of fire.
TER L Battery for example i calculated the damage for 18 shots and the reload for 17 shots in the magazine.
Bolt Repeater i calculated damage for 20 shots and the reload for 19 shots in the magazine.
etc.
I figured the encyclopedia is effectively calculating this: Shot-Wait-Shot-Reload-Wait-Shot-Wait-Shot-Reload...
No gun works like that. There is no waiting for the first shot in a magazine.
So, i simply removed one shot from the rate of fire calculation to get rid of that one extra "wait" that was messing with the calculation.
This gave me the numbers that were matching with what i was seeing happening in the game.


As for the L Pulse turrets, once i figured out that the completely ignore the magazine mechanic i simply did this.
The TER Pulse as example once again. 619 * 2 = 1238 / 3.1 = 399.35
It seems like the magazines are only working when "Reload Rate" is used and "Reload Time" complete ignores them.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: [1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Imperial Good » Thu, 28. Oct 21, 16:23

aversin wrote:
Thu, 28. Oct 21, 09:19
It seems like the magazines are only working when "Reload Rate" is used and "Reload Time" complete ignores them.
Or is it for the reasons I mentioned? Since reload time = 1 / reload rate A lot of the weapons using reload time meet the condition that reload time >= magazine reload time so the magazine reload time does not have an effect. Weapons that use reload rate generally have small resulting reload times so reload time < magazine reload time so the magazine reload time does have an effect.

In the case of TER L Bolt turrets it should be able to be tested using slasher mod with a high fire rate bonus roll since that will lower the reload time below the magazine reload time.

Kajar
Posts: 125
Joined: Sun, 15. Aug 10, 13:23
x4

Re: [1466][1466][BUG] Encyclopedia shows incorrect values for certain weapons.

Post by Kajar » Thu, 28. Oct 21, 18:02

Hmmmmm well, i changed the Bolt Repeater to use a Reload Time of 0.0833 (keeping rate of fire the same) and the burst-reload did work in this case.
So it looks like that your theory is correct. A Reload Time larger than Interburst Time cancels out the burst.

Post Reply

Return to “X4: Foundations - Technical Support”