Page 1 of 1

Making foundry input and output pipes generic

Posted: Tue Apr 07, 2026 11:05 am
by 000
I am developing a mod that introduces new metallurgical recipes, crafted in a foundry. Some of these recipes have three input or output fluids. One has four input fluids (and an item output).

It seems the foundry is set up so that cannot happen. The recipes appear in the foundry recipe selection interface, but show as "cannot be crafted in this machine", with no further explanation. I had to reverse-engineer the reason by creating several test recipes until I saw the common theme in recipes that did and did not work.

The foundry has four fluid pipes, so it can theoretically handle these recipes.

Looking at the entity prototype for foundry, I see it has two pipes explicitly labelled "input" and two labelled "output".

How do I render these generic (input OR output, as needed) so my modded recipes will function?

EDIT: After considerable trial and error, I have worked out how to add four new pipes (two in and two out), to support my new recipes. For my immediate purposes, this works.

However, I would still like an answer to my question about generic in/out pipes.

Re: Making foundry input and output pipes generic

Posted: Tue Apr 07, 2026 3:46 pm
by eugenekay
You just need to extend the Foundry to include the additional 2 Input/Output fluid boxes; which it sounds like you have already done. :-) The drawback is that you are not be able to do 4 Fluid In + 2 Fluid Out without a custom pipe-graphics patch, because Foundries only have 4 "points" to connect.

Take a look at the Electromagnetic Plant Definition, in particular the fluid_boxes and especially the pipe_connections. While it does use an "input-output" flow direction, the Input and Output Fluid Boxes are still configured the same way that they are in the Foundry: with explicitly different Position parameters to prevent overlapping.