Collision masks for whole surfaces OR collision mask of hidden tiles

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Natha
Fast Inserter
Fast Inserter
Posts: 199
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Collision masks for whole surfaces OR collision mask of hidden tiles

Post by Natha »

I need to prevent placement of certain entities in certain surfaces. For now, I have a placement cancelling logic which directly mines the entity if it is prohibited there. But it is still colored green in the cursor.
Applying collision masks on these entities and some tiles wouldn't work because when using concrete or other floors, placement is (dis)allowed either on all or none surfaces.

So what I would need, to not copy all existing tiles with custom collision masks, is
a) that collision masks of hidden tiles are also applied to placement logic
or b) that whole surfaces can have a collision mask.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Collision masks for whole surfaces OR collision mask of hidden tiles

Post by FuryoftheStars »

Something along this line might be in 2.0, as you can't build certain entities on space platforms. Although this may be a simple allow in space boolean, but if that's the case I would hope we can ask them to change it.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics

Nidan
Filter Inserter
Filter Inserter
Posts: 257
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Collision masks for whole surfaces OR collision mask of hidden tiles

Post by Nidan »

You can take a look at how Space Exploration solved this, which, I believe, is done via collisions on ground tiles. Space-only building collide with all natural ground tiles, land-only buildings collide with the space platform tile. Obviously, this wont help you in case some ground tiles are used on surfaces with different building restrictions, although a bit of duplication in the data stage probably can work around that (which could get messy if you need to touch the chunk generation - or replace them afterwards in on_chunk_generated).

Natha
Fast Inserter
Fast Inserter
Posts: 199
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: Collision masks for whole surfaces OR collision mask of hidden tiles

Post by Natha »

Nidan wrote:
Sun May 12, 2024 4:13 pm
You can take a look at how Space Exploration solved this, which, I believe, is done via collisions on ground tiles. Space-only building collide with all natural ground tiles, land-only buildings collide with the space platform tile. Obviously, this wont help you in case some ground tiles are used on surfaces with different building restrictions, although a bit of duplication in the data stage probably can work around that (which could get messy if you need to touch the chunk generation - or replace them afterwards in on_chunk_generated).
Yeah I know how it is done there, but in SE you can't place concrete or other floor tiles in space which makes it a lot easier

Post Reply

Return to “Modding interface requests”