Page 1 of 1
Need help to connect an entity with pipes
Posted: Sat Jan 20, 2018 9:45 pm
by GalactusX31
As the title says, I need information and if it could be, a small example of how to connect an entity with pipes, pumps or other entities that allow it.
I also need information on how to read the type of liquid or gas that passes / contains a pipe or entity.
If for example, I have an entity and its dimensions are 3x3 tiles (or 1x1 ... XxX), how do I define the inputs and outputs of fluids or gases?
I have searched for information on the wiki and in the forum, but the information is ambiguous, it does not say where or how it should be structured.
I am very new in factorio, and I am not very familiar with the structure of the mods, but I am learning little by little, and I need to start with a solid base, thank you for your time.
Re: Need help to connect an entity with pipes
Posted: Sat Jan 20, 2018 10:34 pm
by eradicator
This post has a nice image of where fluid box connections can be placed. And the rest of that thread might also be somewhat helpful.
Re: Need help to connect an entity with pipes
Posted: Sat Jan 20, 2018 11:51 pm
by GalactusX31
thanks for the quick response, but I still need a small example, it does not need to be something very extensive or complex, just add 1 or 2 inputs and outputs to a 3x3 tiles entity; I have looked for reference information watching the programming of several mods, but each person has their own "style" when doing the mods, which is why it is confusing.
I need, an example for idiots ... you know, this goes in data.lua, this in control.lua ... thanks again for your atention
Re: Need help to connect an entity with pipes
Posted: Sat Jan 20, 2018 11:55 pm
by darkfrei
GalactusX31 wrote:but I still need a small example, it does not need to be something very extensive or complex, just add 1 or 2 inputs and outputs to a 3x3 tiles entity
Did you saw chemical plant by vanilla chemical plant?
Factorio\data\base\prototypes\entity\entities.lua
Code: Select all
fluid_boxes =
{
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {-1, -2} }}
},
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {1, -2} }}
},
{
production_type = "output",
pipe_covers = pipecoverspictures(),
base_level = 1,
pipe_connections = {{ position = {-1, 2} }}
},
{
production_type = "output",
pipe_covers = pipecoverspictures(),
base_level = 1,
pipe_connections = {{ position = {1, 2} }}
}
}
Re: Need help to connect an entity with pipes
Posted: Sun Jan 21, 2018 7:55 am
by GalactusX31
Thanks again for the info, but I need to know "how to do it", not only to know that there is the function of adding connection points for pipes, I need to know how to do it with an example, my apologies if I ask too much
Re: Need help to connect an entity with pipes
Posted: Sun Jan 21, 2018 8:10 am
by darkfrei
GalactusX31 wrote:Thanks again for the info, but I need to know "how to do it", not only to know that there is the function of adding connection points for pipes, I need to know how to do it with an example, my apologies if I ask too much
This mod
https://mods.factorio.com/mod/OmniPumpjacks adds connection points for old prototypes. But you are must read entities.lua before.
And please use Notepad++ for it.