Page 1 of 1

Generator and scale_fluid_usage

Posted: Sun Mar 07, 2021 3:58 am
by PFQNiet
I have a generator entity and I would like it to consume fluid at a constant rate regardless of power consumption on the network.

I thought `scale_fluid_usage = false` would do that, but apparently not. The property didn't seem to have any effect and eventually my test setup became fully backed up on fluid and fuel, at which point the generator stopped consuming fluid altogether as there were no more power consumers on the network.

I could use a Lua-driven combination of storage tank + electric energy interface to manually consume fluid, but I think we can all agree that's not a great idea. It is an option though, and if done properly with spreading updates out across ticks, it should be performant enough for all but the biggest bases.

But I just wanted to know if I should be using `scale_fluid_usage` since the name and documentation seem to imply that setting this to false will in fact cause it to consume fluid constantly.

Re: Generator and scale_fluid_usage

Posted: Sun Mar 07, 2021 4:37 am
by DaveMcW
Apparently the guy who added scale_fluid_usage is no longer working with Wube, and no one knows what it is supposed to do. See 88263

Re: Generator and scale_fluid_usage

Posted: Sun Mar 07, 2021 4:51 am
by PFQNiet
I've just noticed that it defaults to `false` anyway so no wonder nothing changed when I manually set it to `false`!

So I may need to go with a script-driven entity if I want to do this... That's awkward, but manageable.

Re: Generator and scale_fluid_usage

Posted: Sun Mar 07, 2021 10:10 am
by Bilka
The purpose of setting scale_fluid_usage to true is to turn off this behaviour:
https://wiki.factorio.com/Steam_engine wrote:Steam that has a higher temperature than the maximum temperature of the steam engine (165°C) is consumed at the normal rate (30 units/s), and does not yield more electricity. This means the energy that was put into the steam to heat it to a higher temperature is wasted.
From what I can see, you cannot turn off the scaling of fluid usage with energy demand.

Re: Generator and scale_fluid_usage

Posted: Sun Mar 07, 2021 11:23 am
by PFQNiet
Oh I see, it's to do with fluid temperatures. Gotcha.

So it's looking like I'll need to go with script-driven. Which... is actually fine, since I have another entity that is already script-driven and I've optimised quite well. Unless someone has an idea for how to do it with built-in entities, I'll go ahead and work on that.