Pipelayer

by therax

Freely route pipes underground, turning corners and running long distances, with intuitive costs.

Content
3 years ago
0.16 - 1.1
10.6K
Logistics

b Crash on bots placing pipes

4 years ago

https://i.imgur.com/OvwH5dQ.jpg
The other bug, which may or may not be related to this one, is that underground connectors don't remember their rotation in blueprints and always switch to default one on placing ghosts.

4 years ago

Can you please post the save game with the BP you are using?

4 years ago

https://www.mediafire.com/file/i64yrhx0elxd8tk/Krastorio2-SE_test.zip/file
It works fine with pipelayer and nothing else loaded, so a mod conflict.

4 years ago

The problem is with Space Exploration. In order to work properly with blueprints, Pipelayer sometimes needs to create 2 ghosts in the same space, one for the underground pipe, and one for whatever is on the surface above the pipe. Pipelayer has special entities that don't collide with anything else to make this possible.

Space Exploration changes the collision mask of every pipe and pipe-to-ground to make them impossible to place in space, except for its own special space pipes. This changes my special pipes so now they collide with everything else that SE doesn't want to be placed in space, including crafting machines and normal pipes.

Unfortunately SE does this in a way that is impossible for me to override. I'll ask Earandel if it's possible to change this for the future.

4 years ago
(updated 4 years ago)

Are you sure it's impossible? Did you try setting it to nil or doing table.remove?
Edit: pretty sure that SE is supposed to have a function to exclude entities from the collision change. If not in this version, then with the next major update.

4 years ago

I’ve looked at the SE code. If collision_mask is nil, it’s treated as the default, which is what most buildings use. SE runs its code to modify collision masks very late in the mod loading process using data-final-fixes, and there is no exception list. I’ve asked for one though.

4 years ago

The next version of Space Exploration will have a way around this.
se_allow_in_space = se_allow_in_space or {}
se_allow_in_space["my-pipe-name"] = true
Add anywhere before Space Exploration's data-final-fixes step.

4 years ago

While we are at it, would it be possible to add pipelayer functionality in space? Of course, it would need to cost space pipes and only function if there's scaffolding above them for balance.

4 years ago

If pipe layer has a 'surface enitity' that can have its placement restricted, then it should be easy enough.

4 years ago
(updated 4 years ago)

So, I got around to fixing it myself and the solution doesn't even need SE 0.3. Just add SE to pipelayer's optional dependency and run

data.raw["pipe"]["pipelayer-bpproxy-pipe"].collision_mask ={}
data.raw["pipe-to-ground"]["pipelayer-bpproxy-pipe-to-ground"].collision_mask ={}
data.raw["storage-tank"]["pipelayer-bpproxy-pipelayer-connector"].collision_mask ={}
data.raw["storage-tank"]["pipelayer-bpproxy-pipelayer-output-connector"].collision_mask ={}

in data-final fixes. And for allowing pipelayer in space add

data.raw["storage-tank"]["pipelayer-connector"].se_allow_in_space = true

to data-updates
and change line 17 of BaseEditor to

return zone and (zone.type == "planet" or zone.type == "moon" or zone.type == "orbit" or zone.type == "asteroid-belt" or zone.type == "asteroid-field" or zone.type == "anomaly")

The balance with normal pipes being allowed in that editor is another issue, but it works without errors. Btw, do editor surfaces add to the save file size?

4 years ago

Probably, but if you keep it small it should be fine.
You can set a size limit in the surface generator tool.

4 years ago

Could you try v0.4.3?

New response