Page 1 of 1
not_colliding_with_itself does not appear to function under certain conditions
Posted: Fri May 08, 2026 11:41 pm
by killzoms
used Collision mask that collides with a different Entity with a duplicate collision mask
Code: Select all
collision_mask = {
layers = {
player = true,
car = true,
train = true,
is_object = true,
layer_52 = true
},
consider_tile_transitions = true,
not_colliding_with_itself = true
}
The exact example where this comes into play is with the [Mobile Factory](
https://mods.factorio.com/mod/Mobile_Factory_zoms/) mod, at the moment I have removed the Player collision layer(not ideal) and added the water_tile layer, this of course causes it to collide with Belts which is no fun and does not allow crossing shallow water(as expected)
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sat May 09, 2026 4:01 am
by boskid
So what are the conditions where it does not work?
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sat May 09, 2026 9:00 pm
by killzoms
When attempting to place the MF Deploy entity that has the same collision mask as the Mobile Factory entity, having the player collision mask layer enabled causes not_colliding_with_itself to not function.
Code that copies the collision mask is
Code: Select all
local MobileFactory = data.raw.car.MobileFactory
local MFDeploy = data.raw["simple-entity-with-owner"].MFDeploy
MFDeploy.collision_mask = table.deepcopy(MobileFactory.collision_mask)
while code that declares the collision mask is
Code: Select all
mf.collision_mask = {
layers = {
player = true,
car = true,
train = true,
is_object = true,
layer_52 = true
},
consider_tile_transitions = true,
not_colliding_with_itself = true
}
with mf being a copy of the tank
if the player collision layer is not enabled then not_colliding_with_itself functions as described. I suppose I should mention this is all done in Factorio's latest steam update
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sun May 10, 2026 1:15 am
by boskid
So let me summarize your findings: you have two collision masks that have non equal set of layers (one has player layer while other one does not) and you are claiming that
not_colliding_with_itself which requires equal set of layers is not working. Do you see your problem?
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sun May 10, 2026 2:10 am
by killzoms
boskid, The collision masks are equal, the collision mask of MF Deploy is set directly with a deepcopy of the collision mask of Mobile Factory.
Player is set on both. The only reason I mentioned Player is because I tested with player set and without it set on both since MF Deploy's collision mask is just a copy of Mobile factory's collision mask.
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sun May 10, 2026 2:18 am
by boskid
Can you show the relevant collision masks as they are seen by the game in prototype explorer (ctrl+shift+e while in game then navigate to related prototypes and show their collision masks)?
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sun May 10, 2026 2:35 am
by killzoms
Here are the relevant collision masks. Where did Vehicle come from?
Re: not_colliding_with_itself does not appear to function under certain conditions
Posted: Sun May 10, 2026 2:48 am
by killzoms
I see. Alien Biomes changes the collision mask layers on all cars if they have the player layer.
Disregard this topic, Did not realize a mod adding additional biomes would additionally modify all CarPrototypes.