Need help to connect an entity with pipes

Place to get help with not working mods / modding interface.
Post Reply
User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Need help to connect an entity with pipes

Post 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.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Need help to connect an entity with pipes

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Re: Need help to connect an entity with pipes

Post 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

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Need help to connect an entity with pipes

Post 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} }}
      }
    }

User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Re: Need help to connect an entity with pipes

Post 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

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Need help to connect an entity with pipes

Post 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.

Post Reply

Return to “Modding help”