Page 1 of 1

Add temperature to Recipes

Posted: Sat Mar 27, 2021 5:13 am
by btarrant
fixed thread title — ssilk

Is it possible to add temperature to recipes. I have a boiler which requires a script to set temp to 90 so useless for power but via data would be far more efficient.

Re: temperature

Posted: Sat Mar 27, 2021 6:07 am
by Optera
Are you talking about the input temperature of the boiler or the fluid temperature?

Heat Exchangers basically do what you want, only work above 500° input temperature.

Gradual fluid temperatures however where removed mid 0.15 and are not coming back.
Now we have to create different fluid prototypes e.g. Water, Steam 500°C, Steam 800°C for the same effect.

Re: temperature

Posted: Sat Mar 27, 2021 8:19 pm
by btarrant
output temperature of a recipe.
"Now we have to create different fluid prototypes e.g. Water, Steam 500°C, Steam 800°C for the same effect."
I had a look at fluid.lua but wasn't seeing different prototypes? Wouldn't the names collide?

Re: temperature

Posted: Sun Mar 28, 2021 4:15 am
by Silari
You can set the temp of a fluid output in a recipe with the 'temperature' property, IIRC. If you use the following as the output of a recipe in an assembler or chem plant, it should give you 90C steam.

Code: Select all

{type="fluid", name="steam", amount=60, temperature=90}
Note that boilers don't use a recipe, they've got their own method of specifying output temperature with their 'target_temperature' property. Making your own boiler entity with 'target_temperature=90' would make it output 90C steam. You'd also need to adjust the energy_consumption to match how much water/steam it consumes/produces per second.


Would probably help if you said exactly what you're trying to do.

Re: temperature

Posted: Sun Mar 28, 2021 6:55 am
by btarrant
thank you will try, I used to do this "temperature=90" but it must have not worked on some version but now must do again. I don't think it's in the api docs,
cheers

Re: Add temperature to Recipes

Posted: Sun Mar 28, 2021 7:53 am
by Silari
It's in there: https://wiki.factorio.com/Types/FluidIn ... tPrototype . I confirmed it worked before I posted with a simple recipe to convert water to 90C steam in a chemplant. Worked fine.

Keep in mind if you want info on Prototypes, the wiki has those. https://lua-api.factorio.com/ is more on the scripting side of things.

Re: Add temperature to Recipes

Posted: Sun Mar 28, 2021 12:51 pm
by btarrant
Thank you