Generator and scale_fluid_usage

Place to get help with not working mods / modding interface.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Generator and scale_fluid_usage

Post 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.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Generator and scale_fluid_usage

Post 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

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Generator and scale_fluid_usage

Post 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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Generator and scale_fluid_usage

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Generator and scale_fluid_usage

Post 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.

Post Reply

Return to “Modding help”