BeltRouter


This mod allows you to route belts and pipes automatically: 1. Put the starting belt and ending belt on ground first, 2. then select the starting belt with ctrl+right-click and 3. select a ending belt with ctrl+left-click. 4. Boom, belt ghosts are created!

Utilities
3 years ago
1.0 - 1.1
28.2K
Owner:
seancheey
Source:
https://github.com/Seancheey/Factorio...
Homepage:
https://github.com/Seancheey/Factorio...
License:
MIT
Created:
4 years ago
Latest Version:
1.5.2 (3 years ago)
Factorio version:
1.0 - 1.1
Downloaded by:
28.2K users

Belt Router

This QoL mod helps you path find belt routes from starting point (ctrl + right click) to ending point (ctrl + left click/shift + ctrl + left click) and creates a trail of belt ghosts.

Routing demo (click me if gif doesn't show up):

Waypoint Mode demo (click me if gif doesn't show up):

Key bindings

  • "ctrl + right click" on starting belt to mark as transport line's starting point (click again to deselect)

  • "ctrl + left click" on ending belt will connect the 1st selected starting point, while telling path finder to prefer underground belts

  • "ctrl + shift + left click" on ending belt will only allow above ground belts to exists

  • "ctrl + alt + left click" on ending belt will only use underground belt if necessary (= if underground can save enough distance)

  • "ctrl + Q" to toggle waypoint mode. Under this mode, you can simply select one or more starting points, then place belts/pipes directly on ground continually. Each placed belt/pipe will be set as next starting point directly.

  • "ctrl + shift + T" to terminate path finding.

Above key bindings can always be changed via Settings -> Controls -> Mods -> Belt Router

Additional Notes

  • You can also select multiple belts at the same time by holding ctrl and click each of the starting belts.

  • You can also increase path finding speed/increase path finding max reach/change path finding greediness by going to Mod settings -> Per player -> Belt Router

  • You can also route pipes with same operation.

  • Note that while most of the mod belts are supported, not many mod pipes are supported and trying to route them may create unexpected behavior. If you want a specific mod belt/pipe to be supported, please add a new thread in Discussion section.

Final words

Thanks everyone for supporting this mod during the beta preview! I can hardly see glitches and most of the functions are now completed after half month of effort. Finally, there are not that many places to improve, and this also means that I'm not going to work that much on this mod anymore. However, I'm still going to maintain this mod in the foreseeable future, so any idea/improvement are still greatly welcomed as always and I'll reply ASAP.

Future improvements:

  • TODO: Use JPS-A* algorithm for faster path finding speed

Special thanks to @ChrislyBear for fixing bug about building belts may collides with entity ghosts, @F0x06, @RusselRaZe and @Xiomax, @AmericanPatriot for bug reporting, @slippycheeze, @Qon for UI/algorithm suggestions, @Xterminator for making a great video about this mod !

I've spent hours implementing A* algorithm and Dijkstra algorithm for path finding. If you find this mod helpful, please give this project a star on my github page :)