[0.14.14] collision_box on pipe-to-ground

Bugs that are actually features.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[0.14.14] collision_box on pipe-to-ground

Post by aubergine18 »

If the collision_box on a pipe-to-ground prototype is set less than { {-0.1,-0.1}, {0.1,0.1} } (for example, {{0,0},{0,0}}) then the following error is generated:

Code: Select all

Error while loading entity prototype "wood-under-pipe" (pipe-to-ground):
Invalid pipe connections specification for offset {0.0000000000, -1.0000000000}.
The collision box size shouldn't break the pipe connections?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14627
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by Rseding91 »

What are you trying to do?

The error is one we put in place because there's internal logic used in the pipe connection that can't be calculated correctly when the bounding box is zero size but knowing what you're trying to do might give an idea if it should be allowed through some other means.
If you want to get ahold of me I'm almost always on Discord.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by aubergine18 »

Guess what the ends of my bridges are :) As added bonus, if two bridges are connected together their ramps (pipe covers) disappear making it look like a continuous bridge which is rather pleasing to the eye.

Image

I've since managed to shrink the collision box by randomly changing the prototypes, I think it was setting tile_width or something like that, or maybe removing the crashed space ship I was temporarily using as a collision guide, or it might have been when I changed the way the initial entity (an offshore-pump) gets turned in to a pipe-to-ground, can't quite remember - it's been many iterations since the OP.

I just found it odd that the collision box generated an error on a seemingly unrelated aspect of the prototype.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by kovarex »

The proper solution of this would be to make the collision mask of PipeToGround settable in the prototype. The collision box should stay the same, but the player wouldn't collide with that (which is the goal I guess).
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by aubergine18 »

Yup. Is the collision mask settable for pipe-to-ground? There's not really any documentation on prototypes so I'm never quite sure what will work where, or even how the collision mask system works (there's different types of layer, mask, etc, and I don't know for sure how they all correlate).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by kovarex »

aubergine18 wrote:Yup. Is the collision mask settable for pipe-to-ground? There's not really any documentation on prototypes so I'm never quite sure what will work where, or even how the collision mask system works (there's different types of layer, mask, etc, and I don't know for sure how they all correlate).
It is not currently settable, we might have to think about some system that is generic enough to work with all of the entities. (So default collision mask is used unless specified otherwise).
The prototype documentation is planned for 0.15
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by kovarex »

Actually, you can specify the "collision_mask" already.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by aubergine18 »

I was trying to get list of available values for collision masks last night - is there a list somewhere? I tried scraping data.raw but got somewhat confused trying to determine what were masks and what were layers and how they interrelate if at all?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.14.14] collision_box on pipe-to-ground

Post by kovarex »

Most of the info here is correct (apart the doodat layer) and some missing values.
https://wiki.factorio.com/index.php?tit ... lisionMask
Post Reply

Return to “Not a bug”