Page 1 of 1

Prevent biters from attacking something

Posted: Mon Oct 26, 2015 11:25 pm
by TheSAguy
Is there a way to make biters totally not attack something?
I'd like them to totally ignore rail.

Thanks.

Re: Prevent biters from attacking something

Posted: Tue Oct 27, 2015 3:17 pm
by Rseding91
If you mark the entity as indestructible they won't attack it. https://forums.factorio.com/wiki/inde ... structible

Re: Prevent biters from attacking something

Posted: Wed Oct 28, 2015 4:39 pm
by TheSAguy
I added the below, but did not seem to work. It also did not crash though :)

Code: Select all

	data.raw["straight-rail"]["straight-rail"].destructible = false
	data.raw["curved-rail"]["curved-rail"].destructible = false
What is the correct syntax?

Re: Prevent biters from attacking something

Posted: Wed Oct 28, 2015 4:51 pm
by Adil
It's not prototype field, it's entity field. You need to do that when they are built.
Other way to try would be to remove "player-creation" from the prototype flags in definition or rails.

Re: Prevent biters from attacking something

Posted: Fri Oct 30, 2015 4:16 am
by Afforess
TheSAguy wrote:Is there a way to make biters totally not attack something?
I'd like them to totally ignore rail.

Thanks.
I think you want to create a new force, (by default there are 3 forces, player, neutral, biter) and assign the rail entities to the new force. Alternatively, assign the rails to the neutral force. Biters should ignore entities not part of the player force.

Note: I have not tested this, I only speculate forces will work (as delineating ownership is their purpose)

Re: Prevent biters from attacking something

Posted: Fri Oct 30, 2015 10:32 am
by prg
Afforess wrote:
TheSAguy wrote:Is there a way to make biters totally not attack something?
I'd like them to totally ignore rail.

Thanks.
I think you want to create a new force, (by default there are 3 forces, player, neutral, biter) and assign the rail entities to the new force. Alternatively, assign the rails to the neutral force. Biters should ignore entities not part of the player force.

Note: I have not tested this, I only speculate forces will work (as delineating ownership is their purpose)
Biters will still chew their way through neutral/non-player entities to get to their target. So this might work for rail because that won't be in the way, but not for other structures that might block the biter's path.

Re: Prevent biters from attacking something

Posted: Fri Oct 30, 2015 2:54 pm
by Afforess
prg wrote: Biters will still chew their way through neutral/non-player entities to get to their target. So this might work for rail because that won't be in the way, but not for other structures that might block the biter's path.
Huh, is that actually an actual "chewing" behavior? I always thought biters just damaged structures that they passed too closely to.

Re: Prevent biters from attacking something

Posted: Fri Oct 30, 2015 3:28 pm
by Oxyd
Afforess wrote:
prg wrote: Biters will still chew their way through neutral/non-player entities to get to their target. So this might work for rail because that won't be in the way, but not for other structures that might block the biter's path.
Huh, is that actually an actual "chewing" behavior? I always thought biters just damaged structures that they passed too closely to.
They have to actually attack something if they want to damage it, yes. They don't tear down walls by just looking at them funny.