How can I make an assembly machine which Produces Heat while crafting

Place to get help with not working mods / modding interface.
oobanooba
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Nov 21, 2024 4:17 pm
Contact:

How can I make an assembly machine which Produces Heat while crafting

Post by oobanooba »

I wanted to create an assembly machine which produced heat when crafting. (Ideally, only when placed on space platforms) The idea being that you have to keep your machines under a certain temperature for them to work. Sort of like a reverse Aquilo. And that waste heat would have to be removed via radiators, or be recycled back into energy (respecting conservation of energy, of course)

Generator entities like heating towers have the sort of behaviour I would like, where they can consume an energy source and produce heat proportionate to the energy consumed. And can be told to stop working at a maximum temperature (like heat exchangers) but they don't support crafting recipes.

Is there a way I can get the behaviour I'm looking for?

I'm fairly new to modding, so forgive me if I'm missing something super obvious.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 137
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How can I make an assembly machine which Produces Heat while crafting

Post by Osmo »

What people do in such cases is fake it by having multiple entites, such as, for example, an assembling machine that produces some fluid when working, and that fluid is then used as a fuel to a reactor which produces heat. If there will be no place to move away the heat, the fluid will also not be consumed and eventually the machine will stop.
To do that, you need to, at runtime, listen for when an assembling machine is created and destroyed, and create/destroy the other hidden entity and, in this example, link their fluidboxes by using linked pipe connections.
oobanooba
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Nov 21, 2024 4:17 pm
Contact:

Re: How can I make an assembly machine which Produces Heat while crafting

Post by oobanooba »

Thanks for the reply, I'll look into compound entities and see what I can do.
Post Reply

Return to “Modding help”