[2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.

Moderator: ickputzdirwech

dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

[2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

Which is inconsistent with the steam boiler and steam engine, both of which operate at exactly 150 + ambient_temperature = 150 + 15 = 165, yielding the expected ratio of 2-to-1.

Based on the current intended balance, heat exchangers and steam turbines should operate at 500 + 15 = 515 degrees, and have a theoretical ratio of 10-to-6, but due to this oversight the ratio becomes 10-to-5.82 (or 10.3-to-6 depending on rounding, see below), where heat exchangers output 100/0.97 (non-decimal floating point -> 103.0928...) instead of 100 steam/s, and steam tubines operate at 5.82 MW instead of the expected 6 MW.

Initially reported here

This is a 3-line fix in their respective entity and energy_source definition (500 -> 515) and has no further effect on game balance.

https://lua-api.factorio.com/latest/pro ... emperature
https://lua-api.factorio.com/latest/pro ... emperature
https://lua-api.factorio.com/latest/typ ... emperature

factorio_1781950518.png
factorio_1781950518.png (297.96 KiB) Viewed 579 times
factorio_1781950523.png
factorio_1781950523.png (284.83 KiB) Viewed 579 times
Last edited by dupraz on Sat Jun 20, 2026 12:39 pm, edited 6 times in total.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

I can expand on what I mean by "likely intended balance" (since this dates back to 0.15, go ask who implemented this).

Take the steam boiler and steam engine, there is a sort of error-prone system where burners are defined by their energy consumption (per second), and generators by their fluid consumption (per tick):

- Steam boilers consumption is fixed at 1.8 MW.
- Steam engines consumption is fixed at 30 steam/s (0.5 per tick).

The middle-man between them is steam, at a given temperature delta of 150 degrees (150 + 15 = 165 operating) and a fixed 200J-per-degree-per-unit heat capacity constant (the following is calculated at runtime):

- Boilers produce: 1.8 MW / 150 degrees / 200 J = 60 steam/s.
- Steam engines produce: 30 steam/s * 150 degrees * 200 J = 900 kW.

Making the ratio exactly 1-to-2 (as obviously intended).

Now take the heat exchanger and steam turbine, they are defined thusly:

- Heat exchangers consumption is fixed at 10 MW.
- Steam turbines consumption is fixed at 60/s (1.0 per tick).

At a 500 degrees (very likely intended) delta, this checks out, because:

- Heat exchangers produce: 10 MW / 500 degrees / 200 J = 100 steam/s.
- Steam turbines produce: 60 steam/s * 500 degrees * 200 J = 6 MW.

Making the ratio 10-to-6.

However, as the delta in practice does not account for the 15 degrees ambient temperature, it becomes 500 - 15 = 485 degrees, and thus:

- Heat exchangers produce: 10 MW / 485 degrees / 200 J = 10_000 / 97 = 103.0928... steam/s (non-decimal).
- Steam turbines produce: 60 steam/s * 485 degress * 200 J = 5.82 MW.

If the heat exchange steam production is floored in practice (because it's an integer internally), then the ratio become:
- 10.3-to-6 (and around 0.1% of the energy is lost during rounding)
If it's treated as a floating-point, then in theory:
- 10-to-5.82

Neither seem correct nor meaningful.
Conclusion: the way entities are defined does not make the mistake clearly apparent until runtime, and why it's gone unnoticed until now.
Last edited by dupraz on Sat Jun 20, 2026 12:46 pm, edited 3 times in total.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by dupraz »

Moderators: Why was this moved from the bug tracker into the feature request forum? This is clearly an unintended bug, not some feature on my wish-list.
robot256
Smart Inserter
Smart Inserter
Posts: 1353
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by robot256 »

I too am annoyed when threads get moved without explanation, but it's pretty obvious why. While the 500 vs 515 degrees might have been an oversight in 2017, it is still a fundamentally arbitrary number that they chose to keep for 9 whole years. So much gameplay experience has built up around the existing number that changing it would be a big deal. Keeping it the way it is has not been unintended for a long time.

Has anyone ever made a mod to pay with the proposed ratio?
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by dupraz »

robot256 wrote: Sat Jun 20, 2026 12:43 pm So much gameplay experience has built up around the existing number that changing it would be a big deal.
The ratio change is barely significant, except the game would stop disappearing 0.1% of your steam energy due to rounding down meaningless floating points.
robot256 wrote: Sat Jun 20, 2026 12:43 pm Has anyone ever made a mod to pay with the proposed ratio?
I've been playing this way ever since I found out about this issue, never thought about bringing it up until 2.1, but this seemed like a good stopping gap to finally fix the mistakes of the past.
Last edited by dupraz on Sat Jun 20, 2026 12:53 pm, edited 1 time in total.
eugenekay
Smart Inserter
Smart Inserter
Posts: 1083
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by eugenekay »

robot256 wrote: Sat Jun 20, 2026 12:43 pmHas anyone ever made a mod to pay with the proposed ratio?
Steam Adjuster
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by dupraz »

eugenekay wrote: Sat Jun 20, 2026 12:50 pm
robot256 wrote: Sat Jun 20, 2026 12:43 pmHas anyone ever made a mod to pay with the proposed ratio?
Steam Adjuster
Note that this isn't a modded "proposed" ratio, but the actual "intended" ratio, so this isn't a "balance tweak" to "make things easier" like this mod is clearly proposing, but fixing a bug in how it's calculated.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for ambient temperature delta

Post by dupraz »

robot256 wrote: Sat Jun 20, 2026 12:43 pm it is still a fundamentally arbitrary number that they chose to keep for 9 whole years.
Also, care to tell me what you think the actual ratio as currently implemented by the game actually is? As in what your "experience" has interpreted as a fundamental part of the game?

Is it 103-to-60, as the steam tooltip implies, or is it 1000-to-582, as the power tooltip implies? No wrong answers here please. Maybe your brain simply ignored the blatant discrepancy between them until now.
robot256
Smart Inserter
Smart Inserter
Posts: 1353
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by robot256 »

The last time I played a real game, my nuclear setups were hodgepodge messes that intentionally didn't follow any ratios. I just fit as many heat exchangers as I could, and then added turbines and steam storage as much as I could. It wouldn't matter to me if the number changed, but it also doesn't break anything with it staying as is.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

Fun math problem for anyone interested, what is the correct ratio between these two units?

factorio_1781961034.png
factorio_1781961034.png (302.28 KiB) Viewed 381 times
factorio_1781961045.png
factorio_1781961045.png (290.26 KiB) Viewed 381 times

Note: even the power tooltip for the turbine here is innacurate, it says "5.82 MW" in the inventory.

factorio_1781961134.png
factorio_1781961134.png (40.53 KiB) Viewed 381 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4584
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by boskid »

Nothing here is a bug, its just some numbers not being round enough for people with OCD. I will ask other devs if we want to apply this balance change, but for now i am closing this topic because it appears to be too heated with rage about this subject not being treated seriously.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4584
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by boskid »

Decision was made: we want to keep current numbers and there are no bugs here.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

So temperature aside, is it really not a bug that heat exchangers generate less energy than they consume due to rounding (around 1 MJ of steam for every GJ of heat), or is this just a tooltip inaccuracy? It's about the same floating-point floored into integer issue I mentioned yesterday.
eugenekay
Smart Inserter
Smart Inserter
Posts: 1083
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by eugenekay »

dupraz wrote: Sat Jun 20, 2026 1:41 pmis this just a tooltip inaccuracy?
Yes, in-game tooltips display rounded numbers to an arbitrary position; not the internal game-engine values. When benchmarked over 6000 ticks this setup produces 10309.2781 units of Steam / 100 Seconds = 103.092781 per second.
06-20-2026, 10-32-38.png
06-20-2026, 10-32-38.png (498.31 KiB) Viewed 244 times
Whereas The Wiki (and a TI-83 calculator) gives an estimated production rate of 103.0927835/s per second according to the values defined in entities.lua. You would need to dig into FluidEnergySource.cpp and friends to determine where the floating-point erorr has crept in; but it does not seem significant to gameplay.
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

eugenekay wrote: Sat Jun 20, 2026 2:43 pm Yes, in-game tooltips display rounded numbers to an arbitrary position; not the internal game-engine values.
Fair enough, the ratio is then 10_000_000 to (500-15)*60*200 (or 1000 to 582), and only the power tooltip is relevant.

FWIW
dupraz
Inserter
Inserter
Posts: 29
Joined: Fri Sep 01, 2023 6:45 pm
Contact:

Re: [2.0.77] Heat exchanger and steam turbine operating temperature does not account for delta to ambient temperature

Post by dupraz »

What irks me is the fact that for a game design to be cohesive, you need the person in charge of game design to remain consistent, when you look at the numbers today, you can readily tell that the thought process that went into one did no follow into the next, probably because these decisions were made by different people, at different times, without much regard for prior art.

Someone, at some point, decided to make the steam engine to steam boiler ratio exactly 2-to-1 by purposely accounting for the 15 degree offset, that simply never happened for heat exchangers and steam turbines.

So now you have one tier of steam that can currently store 30 kJ per unit (would have been 27 kJ before offset), and one tier that can currently store 97 MJ (would be 100 MJ after offset).
Post Reply

Return to “Outdated/Not implemented”