Remove Biters

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Zenith
Inserter
Inserter
Posts: 20
Joined: Mon Jan 12, 2015 10:55 am
Contact:

Remove Biters

Post by Zenith »

hi all,

I'm playing on peaceful at the moment (so biters don't attack first) but to be honest I wish I had just disabled them completely. Is there a way I can remove all bites and nests etc without effecting achievements? (I know I can run a console command to remove enemy entities and nests but I think that will disable achievements?).

Thanks in advance.

Cheers

Zenith

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: Remove Biters

Post by Odhrean »

Poorly not.
The only "cheaty" way is via Console Command which will disable all achievements when used.

Just shoot them down :)

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Remove Biters

Post by steinio »

Odhrean wrote:Poorly not.
The only "cheaty" way is via Console Command which will disable all achievements when used.

Just shoot them down :)
Partly wrong.

You can open the save file zip and edit control.lua. Just add an on tick event which kills all biters and disables expansion.
Save and delete the event again and you are fine.

Greetings, steinio.
Image

Transport Belt Repair Man

View unread Posts

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: Remove Biters

Post by Odhrean »

steinio wrote:
Odhrean wrote:Poorly not.
The only "cheaty" way is via Console Command which will disable all achievements when used.

Just shoot them down :)
Partly wrong.

You can open the save file zip and edit control.lua. Just add an on tick event which kills all biters and disables expansion.
Save and delete the event again and you are fine.

Greetings, steinio.
Wow... evry day i learn something new.
But that is very cheaty.... so it is possible to gain any achievment you want by editing the save...

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Remove Biters

Post by steinio »

Odhrean wrote:
steinio wrote:
Odhrean wrote:Poorly not.
The only "cheaty" way is via Console Command which will disable all achievements when used.

Just shoot them down :)
Partly wrong.

You can open the save file zip and edit control.lua. Just add an on tick event which kills all biters and disables expansion.
Save and delete the event again and you are fine.

Greetings, steinio.
Wow... evry day i learn something new.
But that is very cheaty.... so it is possible to gain any achievment you want by editing the save...
Haha yeees.
Image

Transport Belt Repair Man

View unread Posts

Zenith
Inserter
Inserter
Posts: 20
Joined: Mon Jan 12, 2015 10:55 am
Contact:

Re: Remove Biters

Post by Zenith »

steinio wrote:
Odhrean wrote:Poorly not.
The only "cheaty" way is via Console Command which will disable all achievements when used.

Just shoot them down :)
Partly wrong.

You can open the save file zip and edit control.lua. Just add an on tick event which kills all biters and disables expansion.
Save and delete the event again and you are fine.

Greetings, steinio.
This sounds like the kind of option I was hoping for, I could just start again with biters off but I only get a couple hours a week to play so don't want to do that.

Can you give me some more details and example code if possible? Obviously I'll backup the save first.

Thanks

Zenith
Inserter
Inserter
Posts: 20
Joined: Mon Jan 12, 2015 10:55 am
Contact:

Re: Remove Biters

Post by Zenith »

Hi all,

I've had a go at doing this myself using some code from the wiki that removes biters but I'm not having any luck.

Can anyone help please?

Thanks,

Zenith

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Remove Biters

Post by BenSeidel »

From https://wiki.factorio.com/Console

to remove all biters, spawners & worms paste this into your console

Code: Select all

/c local surface = game.player.surface
for c in surface.get_chunks() do
   for key, entity in pairs(surface.find_entities_filtered({area={{c.x * 32, c.y * 32}, {c.x * 32 + 32, c.y * 32 + 32}}, force= "enemy"})) do
       entity.destroy()
   end
 end
When you paste it into the console it will appear on one line, but will still execute correctly.

Greybeard_LXI
Fast Inserter
Fast Inserter
Posts: 122
Joined: Sun Feb 26, 2017 10:48 pm
Contact:

Re: Remove Biters

Post by Greybeard_LXI »

The code BenSeidel posted will kill all the biters and spawners in already generated chunks. When you explore more you will generate more chunks and they will contain biters. I am not sure if the pollution cloud will also generate chunks.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Remove Biters

Post by steinio »

Hey,

well i don't have a code snippet for disabling biters but based on BenSeidels post you can kill all biters in all generated chunks with a wooden chest - literally.
Open the save zip - i recommend 7zip, because you can edit files directly - or unpack it to get access to the files in the zip
Navigate to the control.lua and open it in your favourite text editor, but not MS Word
Add the following code snippet to the end of the file, save and recompress it if neccessary, have fun with wooden chests
Greetings, steinio.
Image

Transport Belt Repair Man

View unread Posts

Zenith
Inserter
Inserter
Posts: 20
Joined: Mon Jan 12, 2015 10:55 am
Contact:

Re: Remove Biters

Post by Zenith »

Hi steinio,

Great thanks, I'll give it a go and report back.

I did create a backup of my save and used the console commands to remove biters (but this means I no longer get achievements). So, I'll open up my other save file, add the code you suggested and give it a go.

Thanks for this.

Zenith

Post Reply

Return to “Gameplay Help”