Page 1 of 1

Steam Engine max temp based on fluid.water

Posted: Tue Mar 24, 2015 8:09 am
by bobingabout
Very minor issue here, because it only effects modding.

There apears to be problems when trying to heat fluids (that arn't water) to power steam engines that the maximum heat capacity of a fluid seems to be based on the Maximum temperature of fluid.water, rather than the max temperature of the fluid currently being used.

Re: Steam Engine max temp based on fluid.water

Posted: Tue Mar 24, 2015 8:52 am
by jockeril
as I was reading this I thought of a solution - how about overriding the vanilla steam engine with one of your own - can you do that ?

If you can do that you can even use the image of the original S.E.

Re: Steam Engine max temp based on fluid.water

Posted: Tue Mar 24, 2015 6:37 pm
by bobingabout
the issue is something Hardcoded, something that you can't fix by modding. We already know it is hardcoded to a reference in the water fluid, therefore to fix the problem, you need to edit the water fluid.

the current modding solution is to replace the existing water fluid generated by the offshore pump with a clone, and replace all instances of it in recipes with the clone, effectively replacing the existing instance of the water fluid with a clone. Then you are free to do whatever you want with the original water fluid without effecting game play. Then you set max temp to something insane, like a billion. Steam engines will then work correctly with any fluid up to a temperature of a billion.


more practically, the max temp limit doesn't need to be hardcoded at all, since it has already been coded to be impossible to heat a fluid beyond the max temp of the fluid.

But yeah, my original point still stands, should be a fairly simple thing for the devs to fix, but the issue is so minor, they might not even think it's worth the couple of minutes it would take to fix it, in favor of something else that actualy effects most people's gameplay.

Re: Steam Engine max temp based on fluid.water

Posted: Tue Mar 24, 2015 10:17 pm
by Rseding91
bobingabout wrote:the issue is something Hardcoded, something that you can't fix by modding. We already know it is hardcoded to a reference in the water fluid, therefore to fix the problem, you need to edit the water fluid.

the current modding solution is to replace the existing water fluid generated by the offshore pump with a clone, and replace all instances of it in recipes with the clone, effectively replacing the existing instance of the water fluid with a clone. Then you are free to do whatever you want with the original water fluid without effecting game play. Then you set max temp to something insane, like a billion. Steam engines will then work correctly with any fluid up to a temperature of a billion.


more practically, the max temp limit doesn't need to be hardcoded at all, since it has already been coded to be impossible to heat a fluid beyond the max temp of the fluid.

But yeah, my original point still stands, should be a fairly simple thing for the devs to fix, but the issue is so minor, they might not even think it's worth the couple of minutes it would take to fix it, in favor of something else that actualy effects most people's gameplay.
Maximum temperature of a fluid is not hard coded - it's defined in the prototype. You can heat any fluid up to the maximum temperature defined in the prototype for the fluid and a steam engine will produce more power from higher temperature fluids.

However, and here's where the real bug exists: if you don't set a "buffer_capacity" in the Steam Engine's "energy_source" prototype it automatically sets one using the maximum power output that water can produce and a Steam Engine cannot produce more than the "buffer_capacity" per game tick.

To summarize: Steam Engine's need to dynamically resize their "buffer_capacity" based off the fluid that's being used to power them.

Re: Steam Engine max temp based on fluid.water

Posted: Fri Mar 27, 2015 4:22 pm
by kovarex
Rseding91 wrote:
bobingabout wrote:the issue is something Hardcoded, something that you can't fix by modding. We already know it is hardcoded to a reference in the water fluid, therefore to fix the problem, you need to edit the water fluid.

the current modding solution is to replace the existing water fluid generated by the offshore pump with a clone, and replace all instances of it in recipes with the clone, effectively replacing the existing instance of the water fluid with a clone. Then you are free to do whatever you want with the original water fluid without effecting game play. Then you set max temp to something insane, like a billion. Steam engines will then work correctly with any fluid up to a temperature of a billion.


more practically, the max temp limit doesn't need to be hardcoded at all, since it has already been coded to be impossible to heat a fluid beyond the max temp of the fluid.

But yeah, my original point still stands, should be a fairly simple thing for the devs to fix, but the issue is so minor, they might not even think it's worth the couple of minutes it would take to fix it, in favor of something else that actualy effects most people's gameplay.
Maximum temperature of a fluid is not hard coded - it's defined in the prototype. You can heat any fluid up to the maximum temperature defined in the prototype for the fluid and a steam engine will produce more power from higher temperature fluids.

However, and here's where the real bug exists: if you don't set a "buffer_capacity" in the Steam Engine's "energy_source" prototype it automatically sets one using the maximum power output that water can produce and a Steam Engine cannot produce more than the "buffer_capacity" per game tick.

To summarize: Steam Engine's need to dynamically resize their "buffer_capacity" based off the fluid that's being used to power them.
Exactly, the difference between default and max is just used as an heuristic of the buffer capacity, so the cleanest way is to update the buffer_capacity of the generator.

Moving to not a bug.