Page 1 of 2
Fluid energy source
Posted: Mon Nov 13, 2017 11:59 am
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?
Re: Fluid fuels
Posted: Fri Nov 17, 2017 2:57 pm
by bobingabout
No comments?
Re: Fluid fuels
Posted: Fri Nov 17, 2017 3:33 pm
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.
Re: Fluid fuels
Posted: Fri Nov 17, 2017 3:39 pm
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.
Re: Fluid fuels
Posted: Fri Nov 17, 2017 4:45 pm
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.
Re: Fluid fuels
Posted: Sat Nov 18, 2017 1:05 am
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?
Re: Fluid fuels
Posted: Mon Nov 20, 2017 9:25 am
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?
Re: Fluid fuels
Posted: Mon Nov 20, 2017 9:26 am
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.
Re: Fluid fuels
Posted: Mon Nov 20, 2017 6:16 pm
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.
Re: Fluid fuels
Posted: Tue Nov 21, 2017 10:21 pm
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
Re: Fluid energy source
Posted: Tue Nov 21, 2017 11:17 pm
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.
Re: Fluid energy source
Posted: Wed Nov 22, 2017 9:06 am
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.
Re: Fluid energy source
Posted: Tue Dec 05, 2017 9:17 am
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.
Re: Fluid energy source
Posted: Mon Jan 15, 2018 9:56 pm
by Reika
Count my vote in favor of this.
Re: Fluid energy source
Posted: Tue Jan 16, 2018 9:33 am
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.
Re: Fluid energy source
Posted: Wed Jan 17, 2018 5:32 am
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.
Re: Fluid energy source
Posted: Wed Jan 17, 2018 9:04 am
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.
Re: Fluid energy source
Posted: Wed Jan 17, 2018 4:11 pm
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.
Re: Fluid energy source
Posted: Wed Jan 17, 2018 8:20 pm
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.
Re: Fluid energy source
Posted: Thu Jan 18, 2018 9:48 am
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.