Speed & Range Loss Fix

If you liked this item, please rate it up on Steam Workshop page.

Author: iamdaFalcon

Last revision: 11 Jun at 18:04 UTC

File size: 718.08 KB

On Steam Workshop

Description:
This mod fixes a global issue that negatively affected submarines speed and their range

Problematic

1. When time acceleration is applied, submarine speed drops significantly
2. Each submarine in the game travels much less than stated in its in-game description (And no, the problem is not fuel)

I found out that these are two sides of the same coin:
it turned out that when time is accelerated, speed drops, but fuel consumption remains unchanged.

Together, due to these issues, a submarine not only moves slower but also runs out of fuel much earlier than it should.

For example, IXA, instead of 18,000 km stated in the in-game description, traveled only ~13,400 km.

Localization of the problem in the vanilla game

1. The problem occurs only in surfaced position
Underwater the bug does not occur
2. The problem occurs with both diesel and electric propulsion
3. The problem occurs at time acceleration presets x140, x1800, x15000 in map view mode
4. The speed drop is accompanied by constant depth jitter from 0 to 1/2 meters

Since fuel consumption does not change, the speed problem automatically becomes a range problem, as the submarine moves slower and travels significantly fewer kilometers per unit of fuel than it should.

How the mod fixes this

My conclusions are that the real problem is the unintended depth jitter, and the speed and range bug is only a consequence of this problem.

This constant depth jitter causes the submarine to incorrectly recalculate its state, which leads to unstable movement.

The mod eliminates this jitter, and after that, the submarine no longer experiences constant changes in water physics, which makes speed stable again.

And stable speed in turn corresponds to fuel consumption, which leads to a fairly accurate match with the range stated in the description of each submarine.

Result

The mod fixes the physics bug that caused submarines to lose speed and travel significantly less distance at high time acceleration than they should according to their in-game characteristics.

Mod Installation

The mod can be freely and safely activated or deactivated at any time.

1. Subscribe
2. Launch the game launcher
3. Open the Mods section, find Speed & Range Loss Fix, and enable it.

That’s it. The mod will start working immediately. No further action or configuration is required.

The mod does not

– does not change engine power
– does not change fuel consumption
– does not change fuel tank capacity
– does not change submarine characteristics
– does not change saves
– does not require starting a new game

Important

This is my first mod release, and just in case, make a copy of your saves before installing it.

For maximum compatibility, it is recommended to set the mod to the highest priority in the mod load order.

Especially for developers

In base game without mods if x140 is first activated, and then the map is opened, speed will fluctuate wildly.

I logged Time.timeScale (If I am not mistaken, it is also gameTime.PhysicsTimeScale) and here is what I got:

UI Preset
Time.timeScale without map
Time.timeScale with map
Time.timeScale first activation of time acceleration, then opening map
x12
7.2
12
12
x48
28.8
48
48
x140
86.4
100
144 !

For some reason, the value of Time.timeScale at x140 differs depending on when acceleration was activated (before opening the map or after, 144 vs 100).

This may be the cause of the problem in this case.

No such behavior is observed for x12 and x48.

To handle this specific case, my mod has dedicated logic: if Time.timeScale hits 144, it triggers an instant restart of the x140 preset, which resets Time.timeScale back to 100.