Fluid energy source
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Fluid energy source
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?
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?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid fuels
No comments?
Re: Fluid fuels
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.
Re: Fluid fuels
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.
Re: Fluid fuels
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.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.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Fluid fuels
What if a given locomotive/boiler prototype could only use either solid or fluid fuels?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.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid fuels
You're the boss... but what I was thinking basically would have been...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 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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid fuels
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.eradicator wrote:What if a given locomotive/boiler prototype could only use either solid or fluid fuels?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.
So that a fluid-fuel locomotive has no inventory and thus the refuling method doesn't need to account for it and vice versa?
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Fluid fuels
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.bobingabout wrote: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.eradicator wrote:What if a given locomotive/boiler prototype could only use either solid or fluid fuels?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.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Fluid fuels
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
and similarly for steam engine it would be simplified to:
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
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.}
Code: Select all
energy_input = {type = "fluid", etc.}
energy_output = {type = "electric", etc.}
I will keep this in the back of my mind for some point
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Fluid energy source
@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.
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.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid energy source
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.
But still, locomotives are limited by having a burner= tag rather than an energy_source tag.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid energy source
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.
Re: Fluid energy source
Count my vote in favor of this.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid energy source
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.
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.
Re: Fluid energy source
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.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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid energy source
Or the ability to configure those bonuses, if they exist, how strong they are, etc.Reika wrote:ideally without other reactor behaviors like adjacency bonuses.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Fluid energy source
bobingabout wrote:Or the ability to configure those bonuses, if they exist, how strong they are, etc.Reika wrote:ideally without other reactor behaviors like adjacency bonuses.
Code: Select all
neighbour_bonus = 1, --set to 0 to turn off?
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Fluid energy source
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.eradicator wrote:bobingabout wrote:Or the ability to configure those bonuses, if they exist, how strong they are, etc.Reika wrote:ideally without other reactor behaviors like adjacency bonuses.@bob:Code: Select all
neighbour_bonus = 1, --set to 0 to turn off?
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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid energy source
I'm not going to repeat myself, so I'll just quote instead: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.
And yes, I like to avoid scripting for the previously mentioned reasons... compatibility issues... game performance, etc.bobingabout wrote:... that doesn't actually have an input ... I'm not saying it's useless, just limited ...