[Solved] Dummy collision mask layer?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
laige
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Oct 13, 2014 8:11 pm
Contact:

[Solved] Dummy collision mask layer?

Post by laige »

Hi
Is it possible to make a dummy collision mask. What I need is a fake collision mask layer.

I am making a mod that is making use of the new floor-layer. The problem is the effect is extended to all the other floors (concrete and stone brick). My floor is a "dock" meant to be placed over water tiles but not ground tiles. I got the water tiles to accept having floors buildt on them with the following code.

Code: Select all

data.raw["tile"]["water"].collision_mask = { "floor-layer"}
data.raw["tile"]["deepwater"].collision_mask = { "floor-layer"}

Yet now the stone brick and concrete can do the same. Additionally I need to stop the dock tile from be placed on land.
I think if I made a dummy collision mask layer nearly completely similar of the floors layer yet modified to my ends. I could make this work. Problem is I can't find any references to how to make a dummy layer, nor any dev code that creates layers to begin with.

If anyone knows how to do this, or can think of a simpler way to make this mod pls post.
Last edited by laige on Wed Jul 29, 2015 10:40 pm, edited 1 time in total.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [Help Needed] Dummy collision mask layer?

Post by Rahjital »

Collision layers can't be created. You need to use a layer that will be unlikely to be at your given position, like resource-layer.

Note that changing collision mask of water can have some unforeseen consequences.

User avatar
laige
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Oct 13, 2014 8:11 pm
Contact:

Re: [Help Needed] Dummy collision mask layer?

Post by laige »

Thank you for verification that it can't be done.

Post Reply

Return to “Modding help”