Page 1 of 1

[Solved] Dummy collision mask layer?

Posted: Tue Jul 28, 2015 3:42 am
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.

Re: [Help Needed] Dummy collision mask layer?

Posted: Tue Jul 28, 2015 7:29 pm
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.

Re: [Help Needed] Dummy collision mask layer?

Posted: Wed Jul 29, 2015 10:40 pm
by laige
Thank you for verification that it can't be done.