Fluid energy source

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Fluid energy source

Post by bobingabout »

This is no small request, but I have been wanting to be able to use a fluid as a fuel for a long time now.

With the addition of the heatpipe system, and the modification to burner fuel to add categories, I've been thinking on how possible it would be.

There are 2 key components to this to consider.
1. Fuel values on fluids.
2. Fuel fluid box on entities.

In theory, a combination of what you did with heat pipes, and items as fuel would work with this. Fuel value tag would be a minimum, and fuel category would also be useful, so you can make a distinction for example between (petroleum) gas, or oil, and potentially oil types (petroleum vs diesel)

A fluid box on the locomotive would be on my wish list, interfacable in game like a fluid wagon, but for this example, I'm going to stick with boiler and furnace(which hopefully also covers assembling machines).

Like the heat pipe (or any other pipe connection... input, output, steam input/output etc), there would need to be a dedicated pipe connection for this, and also a fluid box for it. Now in theory this can simply replace the item fuel box in the GUI too.


So now that I've talked about it a bit... how possible is this?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid fuels

Post by bobingabout »

No comments?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
tad
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 17, 2017 3:31 pm
Contact:

Re: Fluid fuels

Post by tad »

Why not just add the ability for Steam (Liquids) to power a locomotive so long as the second carriage is a liquid carry, removing the requirement of additional blocks but enabling a new feature for something already present in the game.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14601
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Fluid fuels

Post by Rseding91 »

At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
If you want to get ahold of me I'm almost always on Discord.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Fluid fuels

Post by darkfrei »

Rseding91 wrote:At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
Add possibility to insert to the steam locomotive coal and barrels of water (two items). For diesel locomotive needs heavy oil barrels and must produce empty barrels back.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Fluid fuels

Post by eradicator »

Rseding91 wrote:At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
What if a given locomotive/boiler prototype could only use either solid or fluid fuels?
So that a fluid-fuel locomotive has no inventory and thus the refuling method doesn't need to account for it and vice versa?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid fuels

Post by bobingabout »

Rseding91 wrote:At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
You're the boss... but what I was thinking basically would have been...

Add flags to the fluid type for fuel value and fuel category (Which would be ignored when not in a fuel fluid box)
And a new energy_source type of fluid (alongside electric, burner and heat)
The need to define a fluid_box object inside the energy_source object. (type = "heat" simply asks for connections)

However, being enlightened by Klonan... I can understand that the fluid box filtering to only allow fuels of a type that have a fuel value, and the correct fuel category would be the part that would negatively impact the performance of the game.

In theory, when you don't have the energy_source set to fluid, it shouldn't look for a fuel fluid box, and shouldn't affect performance (Just like heat pipes don't)

What if the fluid box simply had a filter = "petroleum-gas" set on it? Klonan already did some work on fluid boxes to have a filter for a specific fluid, if this was the case, it would function in a similar way to the flamethrower turret.



In fact, thinking about it(Not going to delete what I've already typed), add an energy_source type = fluid and fluid_box, then do what you did for the flamethrower turret, have the entity decide how much energy is produced from the provided fuel. (I know, it means no to Locomotives, as they have a burner= tag now, not an energy_source = tag, but would still let me do it on boilers, mining drills and assembling machines, basically anything that can currently use electric/burner/heat as a fuel source)

It's not my ideal method of doing things, but the infrastructure to do this should already exist (Because of the flamethrower)

How does that sound as a proposal?
Last edited by bobingabout on Mon Nov 20, 2017 10:06 am, edited 4 times in total.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid fuels

Post by bobingabout »

eradicator wrote:
Rseding91 wrote:At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
What if a given locomotive/boiler prototype could only use either solid or fluid fuels?
So that a fluid-fuel locomotive has no inventory and thus the refuling method doesn't need to account for it and vice versa?
The problem with a This or That method, is it has to constantly check for both, so is more impacting on performance than hard demanding a specific fuel type.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Fluid fuels

Post by eradicator »

bobingabout wrote:
eradicator wrote:
Rseding91 wrote:At the moment I can't think of any way to implement such a request that wouldn't negatively impact the game performance even when not used.
What if a given locomotive/boiler prototype could only use either solid or fluid fuels?
So that a fluid-fuel locomotive has no inventory and thus the refuling method doesn't need to account for it and vice versa?
The problem with a This or That method, is it has to constantly check for both, so is more impacting on performance than hard demanding a specific fuel type.
Well, you'd probably have to fork off the prototypes then. Into something like "locomotive-with-fluid-fuel", "boiler-with-fluid-fuel". I agree that's not a really nice solution. But it should remove the performance impact? (At the cost of two additional potentially unused prototypes.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Fluid fuels

Post by Klonan »

I've been thinking, and there is a proper way to do this, but it would require refactoring a large part of how steam engines and boilers work

Basically the fluidbox definition would be moved from the current place in boiler and steam engine, and added as a new energy source, which is how burner/electric/heat works

Then for instance the boiler would specify just

Code: Select all

energy_input = {type = "burner", etc.}
energy_output = "{type = "fluid", etc.}
and similarly for steam engine it would be simplified to:

Code: Select all

energy_input = {type = "fluid", etc.}
energy_output = {type = "electric", etc.}
In this way, it would be theoretically possible to add fluid energy sources to most entities, inserters, crafting machines, turrets, etc.

I will keep this in the back of my mind for some point
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Fluid energy source

Post by eradicator »

@Klonan:
That sounds like it would fullfill a lot more wishes than was originally asked for.
So a big +10 on that. I'll be starting my personal 0.18 Hypetrain right away. :twisted:
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid energy source

Post by bobingabout »

Klonan's idea sounds wonderful on so many levels. In theory if you can specify the energy type for a most entities, including what boilers and generators input/output, it opens up a huge array of possibilities, such as a small generator (like diesel electric generators, etc.)

But still, locomotives are limited by having a burner= tag rather than an energy_source tag.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid energy source

Post by bobingabout »

I want to be patient, and not spam and all that, but at the same time I'm itching to hear more feedback about this.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Fluid energy source

Post by Reika »

Count my vote in favor of this.
Image
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid energy source

Post by bobingabout »

We are actually half way there at the moment. Fluids can have fuel values.

However, at the moment, the only thing that can use a fluid fuel is the steam engine. They added a tag to make it use fluid fuel value instead of fluid temperature to generate electricity.

It does open some doors, such as making an entity that burns oils directly to make power, but that's about it.


Other doors I'd like to see open is making it a full power source option, similar to how defining a heat power source adds heat pipe connection boxes, a fluid power source would add a fluid box, but then anything that can already have a dynamic power source, like assembling machines, mining drills and boilers could burn fluid fuels.


Not related to the current topic:
From the other perspective, we only have 1 entity that generates heat (reactor, which uses a burner fuel source, meaning it can only burn items to make heat), and 2 entities to make power (solar panels with their special logic, and generators that only consume fluids), which leaves more holes on how to make power too.

I know, there's the electric interface thingy, but unless I'm wrong, that doesn't actually have an input, it just produces electricity for free. It can also consume energy too. I'm not saying it's useless, just limited, something equivalent to the solar panels.


It would be nice to have an entity with an input power source(including the whole list; burner, fluid, heat and electricity), and output power source (probably just heat and electricity), also including efficiency tags, so you can define loss.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Fluid energy source

Post by Reika »

bobingabout wrote:Not related to the current topic:
From the other perspective, we only have 1 entity that generates heat (reactor, which uses a burner fuel source, meaning it can only burn items to make heat), and 2 entities to make power (solar panels with their special logic, and generators that only consume fluids), which leaves more holes on how to make power too.

I know, there's the electric interface thingy, but unless I'm wrong, that doesn't actually have an input, it just produces electricity for free. It can also consume energy too. I'm not saying it's useless, just limited, something equivalent to the solar panels.


It would be nice to have an entity with an input power source(including the whole list; burner, fluid, heat and electricity), and output power source (probably just heat and electricity), also including efficiency tags, so you can define loss.
I would like this too - the ability for a non-burner entity to generate heat - ideally without other reactor behaviors like adjacency bonuses - would allow me to overhaul my geothermal power system in a more realistic manner, something not currently possible without extensive scripting and many undesirable side-effects.
Image
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid energy source

Post by bobingabout »

Reika wrote:ideally without other reactor behaviors like adjacency bonuses.
Or the ability to configure those bonuses, if they exist, how strong they are, etc.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Fluid energy source

Post by eradicator »

bobingabout wrote:
Reika wrote:ideally without other reactor behaviors like adjacency bonuses.
Or the ability to configure those bonuses, if they exist, how strong they are, etc.

Code: Select all

neighbour_bonus = 1, --set to 0 to turn off?
@bob:
The energy interface is actually quite useful (though got less useful do to some performance related changes in 0.16 >_>_>_>_>) for scripted consumption. For production it's still nice with "free" energy sources (wind, water), but yea, not for continuous consumption, but that's what the boiler/engine prototype should do.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Fluid energy source

Post by Reika »

eradicator wrote:
bobingabout wrote:
Reika wrote:ideally without other reactor behaviors like adjacency bonuses.
Or the ability to configure those bonuses, if they exist, how strong they are, etc.

Code: Select all

neighbour_bonus = 1, --set to 0 to turn off?
@bob:
The energy interface is actually quite useful (though got less useful do to some performance related changes in 0.16 >_>_>_>_>) for scripted consumption. For production it's still nice with "free" energy sources (wind, water), but yea, not for continuous consumption, but that's what the boiler/engine prototype should do.
You can accomplish near anything with compound entities and scripted interfaces, but bobingabout has repeatedly stated that he(?) wishes to avoid script-based solutions, and given the ugliness of compound entities and some of the side effects (such as spurious indicator icons, undesirable mod interactions, or performance losses), I only use them as a last resort as well.
Image
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Fluid energy source

Post by bobingabout »

eradicator wrote:@bob:
The energy interface is actually quite useful (though got less useful do to some performance related changes in 0.16 >_>_>_>_>) for scripted consumption. For production it's still nice with "free" energy sources (wind, water), but yea, not for continuous consumption, but that's what the boiler/engine prototype should do.
I'm not going to repeat myself, so I'll just quote instead:
bobingabout wrote:... that doesn't actually have an input ... I'm not saying it's useless, just limited ...
And yes, I like to avoid scripting for the previously mentioned reasons... compatibility issues... game performance, etc.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Implemented mod requests”