Biter Cleanup


Continuously removes biter creep decoratives that aren't near a biter nest (or the mound of corpses left behind after destroying one). Performance impact should be pretty low but can be reduced further by adjusting settings if necessary.

Tweaks
15 days ago
2.0
7.09K
Enemies Environment

b Biter Cleanup +RSO

16 days ago

Since I'm playing in Japanese, my factorio-current.log file will also reflect that.
In previous versions of Biter Cleanup, crashes did not occur.
In a Biter Cleanup (4.1.0) + Resource Spawner Overhaul(7.0.23) environment,
the game crashed with the following error:

19259.288 Error MainLoop.cpp:1468: Exception at tick 734491: Resource Spawner Overhaul (7.0.23)のMODが回復不能なエラーを発生させました。
MOD作成者にこのエラーを報告してください。

Error while running event rso-mod::on_surface_created (ID 70)
Biter Cleanup (4.1.0)のMODが回復不能なエラーを発生させました。
MOD作成者にこのエラーを報告してください。

Error while running event biter-cleanup::on_chunk_generated (ID 16)
biter-cleanup/control.lua:522: attempt to index field '?' (a nil value)
stack traceback:
biter-cleanup/control.lua:522: in function <biter-cleanup/control.lua:516>
stack traceback:
[C]: in function 'force_generate_chunk_requests'
rso-mod/control.lua:1079: in function 'spawn_starting_resources'
rso-mod/control.lua:2052: in function <rso-mod/control.lua:2040>
19282.893 Info AppManager.cpp:353: Deleting active scenario.
19286.849 Quitting: user-quit.
19287.778 Steam API shutdown.
19287.783 Goodbye

16 days ago

Ah, I see the issue - this appears to be an oversight on my part, I forgot to check if the surface was still valid during certain cleanup stages. I should be able to push a fix for this later today. Sorry for the inconvenience.

In the meantime, as a temporary measure, you should be able to delete the surface by either
- temporarily uninstalling Biter Cleanup while the deletion takes place (and reinstalling afterwards if you're so inclined) - be aware that just disabling won't work because disabling the mod might not reset the mod's storage table
- increasing the operation interval to reduce the odds of a cleanup being ongoing while the deletion takes place
- just trying again and hoping the timing shakes out differently

15 days ago

I've just pushed a version with a fix for what I think the issue is - please let me know if the issue persists after updating to 4.1.1.

(I also apologise for technically being 1 minute late on my promise of publishing "later today", as it did technically pass midnight while I was prepping this for upload. I hope you can forgive me this transgression.)

15 days ago

I installed Biter Cleanup (4.1.1) + Resource Spawner Overhaul (7.0.23) + Krastorio 2 Spaced Out (1.6.18) and restarted the game from the beginning, but it crashed the moment I launched the rocket.
(I forgot to mention Krastorio 2 Spaced Out.)

17574.956 Error MainLoop.cpp:1468: Exception at tick 625688: Resource Spawner Overhaul (7.0.23)のMODが回復不能なエラーを発生させました。
MOD作成者にこのエラーを報告してください。

Error while running event rso-mod::on_surface_created (ID 70)
Biter Cleanup (4.1.1)のMODが回復不能なエラーを発生させました。
MOD作成者にこのエラーを報告してください。

Error while running event biter-cleanup::on_chunk_generated (ID 16)
biter-cleanup/control.lua:548: attempt to index field '?' (a nil value)
stack traceback:
biter-cleanup/control.lua:548: in function <biter-cleanup/control.lua:542>
stack traceback:
[C]: in function 'force_generate_chunk_requests'
rso-mod/control.lua:1079: in function 'spawn_starting_resources'
rso-mod/control.lua:2052: in function <rso-mod/control.lua:2040>
17595.149 Info AppManager.cpp:353: Deleting active scenario.
17597.197 Quitting: user-quit.
17597.608 Steam API shutdown.
17597.612 Goodbye

15 days ago
(updated 15 days ago)

The cause of this one was actually somewhat difficult to track down - it's actually completely unrelated to the first crash you reported, and is because of a really obscure issue that technically isn't even a problem with this mod.

It turned out that something Resource Spawner Overhaul was doing was causing other mods' events to fire in a really unusual order - RSO was calling this mod's function for handling new chunks, before this mod was even told that the surface those chunks were generating on even existed. Normally the "on_surface_created" event fires first, and then the "on_chunk_generated" events after, but because RSO received the "on_surface_created" event first, it then forced other chunks to generate, and consequently fired the "on_chunk_generated" handlers of those other mods before the game fired their "on_surface_created" handlers. Because this mod keeps a list of all chunks that exist on each surface, that weird event order led this mod to try and register chunks to a list that hadn't been created yet.

I've added an edge case so that if the surface isn't known yet, it will just do nothing and wait for the "on_surface_created" event to fire, which will then handle all the chunk registration. That should fix this issue and a couple of potential related issues as well that would technically be possible by similar mechanisms.

The version with the fix has now been published. Thank you for the error reports, and as ever, if you encounter any more crashes please let me know.

12 days ago

Ver. 4.1.2 worked without crashing, and I was able to play to the end.
Thank you for the fix.

New response