Hot metals


A furnace doesn't just output cold usable results. You need to wait for them to cool down.

Content
16 days ago
2.0
1.70K
Factorio: Space Age Icon Space Age Mod
Manufacturing

i Surface-based cooling? (Lua included)

9 days ago
(updated 9 days ago)

First off, I want to say that I love this mod! It's awesome that the metal doesn't start spoiling until it's removed from the furnace.

I'm not sure if it's possible, but could each surface multiply the cooling by an amount? Longer cooling times on Vulcanus (which adds an inherent challenge and further dissuades foundries directly feeding each other), shorter on Fulgora and Aquilo, etc. Space should take considerably longer due to the lack of atmosphere.

If you want a lookup table, realistic times considering air convection, ground convection, and radiation, but scaled down to be 20 s on Nauvis, would look something like:
Vulcanus: 21 s (50 s on platform)
Nauvis: 20 s (39 s on platform)
Gleba: 17 s (35 s on platform)
Fulgora: 18 s (31 s on platform)
Aquilo: 16 s (29 s on platform)
These are technically just for iron plates, but it's a start. You can also just make up numbers that suit the gameplay if accuracy isn't important to you; that's not a bad idea. Just make sure that this remains true:

Vulcanus Platform > Nauvis Platform > Gleba Platform > Fulgora Platform > Aquilo Platform > Vulcanus > Nauvis > Fulgora > Gleba > Aquilo

(Yes, Fulgora takes longer than Gleba; it has a very thin atmosphere!)

However, I would recommend parameterizing this to help with mod compatibility, like with custom planets. You can make it a function of each planet's Solar Power (Vulcanus is 4, Nauvis is 1...) and Pressure (Vulcanis is 4000, Nauvis is 1000...). For a very rough estimate, you could do:
X * [ S * 10 / max( P^(1/3), 1 ) ]^0.25
where S is the Solar Power, P is the Pressure, and X is whatever you want the default on Nauvis to be. It's...rough, and it results in Gleba taking longer than Fulgora, but it'll be dynamic.

If you REALLY want accuracy, though, you can use this script: https://gist.github.com/KupferudelWolf/f9ef6fa2c0cd4ab233593d81c8abb53e
I based it on Newton's law of cooling and Churchill and Chu's correlation for horizontal plates. It takes into account air convection, ground convection, and radiation. The numbers in the table are directly from this script (multiplied by ~0.344). There are a few caveats, though:
- Definitely run this on startup; it's not too taxing, but it does involve an integral, so I wouldn't run it every frame, hahah. Just interpolate the time value between planets for moving platforms.
- Some values are guesses. I guess the plates to be 0.5 m x 0.5 m x 0.001 m. (The thinness makes them cool relatively fast.) That's roughly 4800 plates in a cubic meter. 0.25 m x 0.25 m x 0.003 m would work too by that metric, but you'll get MUCH larger base numbers (about 400 seconds on Nauvis; divide it by 20, maybe). I chose not to base it on in-game weight (100 plates = 1 ton) for...a variety of reasons.
- Some values in there are currently based on an iron plate lying on hard soil, with an air atmosphere when present. Factorio obviously doesn't give information about atmosphere or soil composition. Vulcanus surely has far more greenhouse gasses than Nauvis, and Aquilo has an icy surface, so this will inherently be inaccurate for them (unless you want to fix it; you'll also have to account for whether the plate is on a belt, which isn't worth it imho).
- The iron values (averaged specific heat, averaged density, and melting point at STP) can be changed if you're willing to change them for each material for extra Realism™, though.
- I may have also made mistakes. I haven't physically gone to Nauvis with a 1538 °C plate of iron to test the numbers. I'm not a smelter or anything. 58 seconds for a 1 mm thin plate to cool from melting to 150 °C sounds right to me, but I don't know.

Whether you choose to use any of this or just do your own thing, I do hope to see variable cooling times as a feature!

9 days ago
(updated 9 days ago)

whoops, accidently left this comment... ;;

9 days ago

There is one big problem with this: An item can only have one spoil time. It cannot be configured per surface. The obvious workaround would be to create a copy of each hot item for each planet. So you would have a hot-iron-nauvis, hot-iron-plate-space, hot-iron-plate-vulcanus, etc. But a recipe can only output one of those. You would need to copy all recipes producing hot metals as well. Each restricted to a certain surface property. That would clutter all kinds of UIs with massive amounts of items and recipes.

Or script it all with this https://mods.factorio.com/mod/runtime-spoilage-library with an insta-spoil initial hot metal that spoil directly into the correct surface specific item that then spoils again according to your math. The problem with that would be UPS. Scripting big scale things doesn't perform well.

So my conclusion: The idea is cool (hehe) and I would love it. But the downsides are not worth the extra coolness in my opinion.

I might do some testing anyway because coding it is easy.

8 days ago

Oh no!

Hmm... is there any attribute associated with the item that you can assign to it? I know quality impacts cooling time with a multiplier. Could the item gain a custom property designating a multiplier as well? I'm not too familiar with Factorio modding in particular.

New response