Page 1 of 1
[0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 1:32 am
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?
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 3:05 am
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.
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 3:45 am
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.
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.
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 10:30 am
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).
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 3:33 pm
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).
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 4:50 pm
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
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 6:22 pm
by kovarex
Actually, you can specify the "collision_mask" already.
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 6:27 pm
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?
Re: [0.14.14] collision_box on pipe-to-ground
Posted: Tue Oct 18, 2016 9:30 pm
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