Temperature dependant recipes?

Place to get help with not working mods / modding interface.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Temperature dependant recipes?

Post by bobingabout »

I've got looked into this before, but is it possible to have a recipe that demands the temperature of a fluid be a certain temperature? So, for example, Steam, rather than water? (Steam is just Water with a temperature above 100 degrees)
Or define temperature on the result, so you could have a recipe that makes steam?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Temperature dependant recipes?

Post by Aeternus »

From the recipy for the Steam Engine, defined in Entities.lua:

Code: Select all

 {
    type = "generator",
    name = "steam-engine",
    icon = "__base__/graphics/icons/steam-engine.png",
    flags = {"placeable-neutral","player-creation"},
    minable = {mining_time = 1, result = "steam-engine"},
    max_health = 400,
    corpse = "big-remnants",
    dying_explosion = "medium-explosion",
    effectivity = 1,
    fluid_usage_per_tick = 0.5,
    maximum_temperature = 165,
**snip**
    fluid_input =
    {
      name = "water",
      amount = 0.0,
      minimum_temperature = 100.0
    }
Suggests you can set a minimum temperature for water to be used in recipies, along with a maximum that the particular entity will be able to handle. I assume that the temperature properties apply to each fluid as part of their data model - so yea, I think you can use the temperature property in your recipies. Boilers/heat exchangers simply take a fluid plus fuel and output a fluid with a higher temperature.

[Edit] And if you want to create boilers that have a different max temperature, there's the "target_temperature" value in the boiler. Dunno what you're planning to do with this...
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Temperature dependant recipes?

Post by bobingabout »

I knew about those tags, but just thought they were part of specific boiler/steam engine logic.

what I actually want to do is a recipe, like in an assembling machine. In this case it could be taking Lithia water in, and giving Lithium Chloride and water with a high temperature out to make it steam.

The other one was a condenser recipe that would take steam and create pure water (change the water type from "water"/"lithia-water" to "pure-water"), but since I specifically want steam, it needs to be temperature dependant.

These would all be done in an assembling machine or furnace type entity. (Furnace and Assembling machine are pretty much the same internally, the only difference is that furnace automatically chooses the recipe based on the ingredient you put in, where assembling machine requires you specify the recipe)
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Temperature dependant recipes?

Post by Klonan »

Yes it is possible, you just need to specify a minimum or maximum temperature in the recipe,

However this information about the temperature isn't shown to the player anywhere, so it will just show that the recipe needs water, but not that it needs water at 100 degrees

Also we will be changing steam to its own fluid very soon, to solve everything with circuit network, virtual signals, usage in recipes etc.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Temperature dependant recipes?

Post by bobingabout »

Klonan wrote:Yes it is possible, you just need to specify a minimum or maximum temperature in the recipe,

However this information about the temperature isn't shown to the player anywhere, so it will just show that the recipe needs water, but not that it needs water at 100 degrees

Also we will be changing steam to its own fluid very soon, to solve everything with circuit network, virtual signals, usage in recipes etc.
Steam being it's own fluid would make things easier to do. But thanks for that information, very useful to know.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Temperature dependant recipes?

Post by Aeternus »

How will Steam and Water intermingle? I can see a potential problem with the Heat Exchanger, which can take steam heated from standard boilers for the neat 1.8MW + 4MW sum to fully utilize a Turbine. If those fluids are different, how will the Heat Exchange work with existing low energy steam and Water, especially if you've got a system that switches between the two based on load and/or nuclear fuel availability?

[Edit] Also, the energy on the fluids from heating, will that become available to the structure doing the recipy, much like a steam engine - and reduce power draw? I'm kinda curious where that heat energy goes, if anywhere...
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Temperature dependant recipes?

Post by bobingabout »

Just keep in mind when making steam it's own fluids... Allow for boiler inputs to be an ARRAY!!! So that I can add different kinds of water (Water, Lithia water, Salt water, Pure water) to be able to become steam.
You can then, as pointed out by Aeternus, have Water and Steam on the array of the heat exchanger by default.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: Temperature dependant recipes?

Post by Fatmice »

Aeternus wrote:How will Steam and Water intermingle? I can see a potential problem with the Heat Exchanger, which can take steam heated from standard boilers for the neat 1.8MW + 4MW sum to fully utilize a Turbine. If those fluids are different, how will the Heat Exchange work with existing low energy steam and Water, especially if you've got a system that switches between the two based on load and/or nuclear fuel availability?

[Edit] Also, the energy on the fluids from heating, will that become available to the structure doing the recipy, much like a steam engine - and reduce power draw? I'm kinda curious where that heat energy goes, if anywhere...
The two fluid likely won't mix such that the boiler and heat exchanger will work on one type at a time.

Currently, liquid_input property does not accept an array of fluid types... So I guess they will make liquid_input={{name="water", amount=0, minimum_temperature=15},{name="steam", amount=0, minimum_temperature=100}}

I doubt they will transparently allow removing heat from the input source to power the entity. The only entity that removes heat from its input is the generator type and they destroy the input. Assembler type can use heat as an energy source but I've yet to try and make one hookup to a heat pipe.
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Post Reply

Return to “Modding help”