Immersive Railroading

Immersive Railroading

3M Downloads

Increasing MB_PER_LITER breaks Steam Locomotive operation

robot256 opened this issue ยท 1 comments

commented

Describe the bug
I'm sure this is on someone's to-do list already, but I didn't see it listed as an issue and didn't want it to be forgotten.

Changing the MB_PER_LITER config setting to anything larger than 1 breaks the operation of steam locomotives. The firebox is unable to heat the over-sized boiler fast enough to replenish steam pressure at the rate the locomotive uses it. Even if you increase the locoHeatTimeScale value, you can only drive for a short time before having to stop and wait for the boiler to.

How to reproduce
Steps to reproduce the unwanted behavior:

  1. Change MB_PER_LITER to 8.
  2. Change loco locoHeatTimeScale to 1152. (To keep warm up time reasonable.)
  3. Fill a steam loco with 8x as much water as usual, and watch it come up to pressure in about the same time as before.
  4. Drive with throttle above 25% and watch the steam pressure decrease rapidly.

Expected behavior
Changing MB_PER_LITER should not affect locomotive steam-up time or steam consumption while driving. The locomotive boiler should remain the correct (scale) number of liters, and simply store more buckets of water and consume it faster.

System Information

IR-Version: "1.7.3_1.12.2"

Forge-Version: "1.12.2 - 14.23.5.2854"

Additional context
I agree with the "// TODO" comments in the code that the solution is to convert buckets back into liters for use in the boiler physics calculations. I believe there are three places in LocomotiveSteam.java where this is needed:

Line 610: double boilerVolume = this.getTankCapacity().Buckets();
Line 630: boilerTemperature += energyKCalDeltaTick / ((waterLevelMB + 1) / 1000);
Line 663: double maxPressureTick = maxKCalTick / (this.getTankCapacity().MilliBuckets() / 1000);

For balance, it would also be good to convert the water consumption from liters to buckets as well. I'm also not sure if the hard-coded 10mB/tick tender transfer rate will be enough if you start altering either the MB_PER_LITER or locoWaterUsage config options.

commented

Updating to comment that this bug persists in the latest 1.8.0.1 build on Minecraft 1.6.5.