Tile Property Question

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Tile Property Question

Post by TheSAguy »

So in my mod, Bio Industries, once can breed or convert enemy biters to the players side.
One issue is that these friendly biters sometimes wonder your entire base and are a little disruptive...

I was wondering if I could create a tile that would almost act like water to these friendly biters. So they could not cross it.
The player and enemy biters could cross it like any normal terrain, but these biters with player force cannot.
This way once could create areas for them. Instead of using walls to block them.


I don't think it's possible, but thought I'd ask.

Thanks.
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Tile Property Question

Post by 321freddy »

TheSAguy wrote: these friendly biters sometimes wonder your entire base and are a little disruptive...
If by disruptive you mean that they get stuck on belts and are annoying you can make biters "collide" with belts by adding "floor-layer" to their collision mask:

Code: Select all

collision_mask = { "object-layer", "player-layer", "water-tile", "floor-layer"},
This way they can't walk over belts and won't get stuck so often on them (although they won't be able to move through most of your base then)

You could also try to issue a command to units in the base with set_command and tell them to move out of the base. Save a list of chunks that are a no-go zone for the friendly biters and give them the command to go to a chunk outside the saved ones if they enter the zone. (might impact performance a bit though)

Just some ideas of the top of my head, it is all untested, you'll have to experiment with them a bit. Good luck! ;)
Post Reply

Return to “Modding help”