P.U.M.P.

by Xcone

P.U.M.P. (Prevent Unwanted Manual Pump-placement) adds a selection-tool with which you can select oil wells, and then plans the layout of pumpjacks and pipes for you.

Utilities
10 days ago
0.18 - 2.0
53.3K
Mining Fluids Blueprints
Owner:
Xcone
Source:
https://github.com/Xcone/factorio_pump
Homepage:
N/A
License:
MIT
Created:
4 years ago
Latest Version:
2.1.8 (10 days ago)
Factorio version:
0.18 - 2.0
Downloaded by:
53.3K users

How to use

  • Press the P.U.M.P. button on the the short-cut bar to activate the selection tool.
  • With the P.U.M.P. selection tool in hand; drag-select the oil, sulfuric acid, or other liquid resources.
  • Choose which buildings to plan with.

    If you have other mods installed that add additional pumps, pipes, or power poles, P.U.M.P. should include those in the menu.

Space Age

P.U.M.P. has been updated for Space Age and supports the new fluid resources. It also features extra options for quality-items, as well as which tile to use to cover the ice on Aquilo.

Why P.U.M.P. ?

Fluids and pipes are fun and all. But the more complex layout can be blueprinted and copied. Unfortunately, due to the random nature of how oil wells are found on the map, you're left with a significant chunk of manual labor for each oil field you claim. After a while placing pumpjacks gets old...

P.U.M.P. (Prevent Unwanted Manual Pump-placement) adds a selection-tool with which you can select oil wells (or other liquid resources from mods), and then plans the layout of pumpjacks, pipes and electric-poles for you.

If you want P.U.M.P. to insert modules as well. Install Module Inserter Extended and configure which modules you want. If you already have Module Inserter Extended but don't want P.U.M.P. to insert modules, you can disable it in the settings.

Don't want the menu every time?

You can untick the checkbox at the bottom of the menu.
- P.U.M.P. will remember the previous chosen options and use those.
- It will still offer the menu if new options are available since last usage.
- You can also hold SHIFT while making a selection to one-time show the menu again.
- The checkbox can also be ticked again from the game's mod-settings menu.

Compatibility with other mods

P.U.M.P. should work with any fluid resource, for which a pump/miner is available that has a pipe output. So far it can do so without any specific mod exceptions.

If P.U.M.P. does not work with a particular mod, and you think that it should, please let me know. If I can adjust P.U.M.P. in a way that won't require mod-specific exception I probably will take the effort.

Some self-imposed limitations are:
- Miners/pumps need to be square;
- Pipes must be 1x1 in size, and must have similarly named "-to-ground" option for the underground segments;
- Power poles must either be 1x1 or 2x2 in size;

This is so, to keep the math/code simpler initially. If there's demand, I'll look into expanding the logic to support more exotic shapes and sizes.

Planning routine

The goal is that stretches of pipes are mostly straight (and subjectively tidy), unless it'd cause a weird detour:

The mod tries to find a good place for a main-pipe (trunk), and from the trunk some branches are planned. The trunk and branches make up a main network of long straight pipes spanning the whole field to which all pumps may connect. If the field is dense, the main pipe network may tunnel underneath pumps.

Pumps are then attempted to be connected in 3 different ways, in order:
1. Connect to already planned pipes within a few tiles range (either the main network or another pump); in curvy fashion if needed.
2. Connect in a straight line towards the aforementioned main network; tunneling under other pumps if needed.
3. Step 1 and 2 are attempted for all pumps. If at the end some are not connected, A* pathfinding is used to connect the remaining pumps to nearest pipes (basically step 1 again, but with a larger search range).

There's a legacy planner still available via settings. It also works via a trunk and branches. But the difference is that branches would keep adding branches, and those branches would branch too, until all pumps could reach a branch in a straight line. No tunneling was used in the planning, though. So this could lead to an abundance of branches make unnecessarily long pipes. And in dense field the creation of branches would also sometimes fail as no straight line from the current branch to the edge of the field could be guaranteed without the tunnels.

Found a bug?

Please provide a save-file with which the issue can be reproduced. This is a great help to sync all mods as you have them, as well as giving me a playground to test potential fixes with.