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
6 months ago
2.0
6.62K
Enemies Environment
Owner:
Pseudonymous
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
1 year, 3 months ago
Latest Version:
3.0.3 (6 months ago)
Factorio version:
2.0
Downloaded by:
6.62K users

Overview

A simple mod that deletes the nasty-ass decorative textures biters leave behind once the nests have been cleared out. It isn't fancy, it isn't pretty, it just deletes them with no fading or anything - though it does do it in a random order so it at least emulates a natural process. But with any luck you'll be away from the scene of the crime when it happens so it won't matter either way.

Any biter creep decal that isn't near a spawner, worm, or corpse thereof will be deleted.

How it works

When the mod is initialised, it scans all surfaces in the game for biter creep decoratives. It then adds them to an internal list, tracking them by texture, position, surface and other internal properties. This internal list is then kept updated by scanning new surfaces as they are created, scanning new chunks on existing surfaces as they are generated, and scanning a one-chunk-radius area around any biter that sacrifices itself to build or expand a nest. (A command exists for player-initiated scanning, but this shouldn't be necessary outside of manually placing biter decoratives in the editor.)

Once this list has been created, a configurable number of decoratives are chosen from it at random to be checked for proximity to nests. If no spawners or worms are detected within range, the decorative is marked for deletion. The mod then checks a range around the deletion candidate, removing "secondary" creep decoratives (mud streaks, patches of fungi or worms, etc) that are close by, and then removes the deletion candidate as well. Conversely, if there a nest entity is found in range, the decorative will not be deleted and the mod will simply do nothing until choosing a new decorative on the next tick it is triggered.

Please note: versions >=3.0.0 are known to have stability issues when paired with mods that can cause chunks or surfaces to be deleted. If you're intending to use such mods, consider downpatching Biter Cleanup to version 2.3.0 until the next major version (4.0.0) is released.

The method of tracking and selecting decals introduces with version 3.0.0 has turned out to be unreasonably memory intensive on large maps, causing delays in loading and saving, and also causing issues with tracked decals desyncing when parts of the map are deleted. A new version with a different method is in the works, but my schedule has become somewhat less reliable, so I can give no release estimates at this time.

Compatibility

It should check any entities that use the types "unit-spawner" or "turret" (which is how worms are classified) and which are tagged with "placeable-enemy" when looking for nests around decals. This means it shouldn't delete creep decals near modded spawners like those from Armoured Biters, and modded worms too (though I don't know of any examples). A cursory test seems to agree with that assessment but it hasn't been rigorously tested.

Mods that allow for surfaces or chunks that are home to biter decals to be deleted can cause crashes related to the tracking system desyncing. Outside of space platforms most players don't ever encounter map deletions, and space platforms can't have biter decals, which taken together is what led to this oversight. The next major version should fix this for free just by virtue of a different algorithm that doesn't rely on tracking, so I've elected to focus on finishing that release instead of patching this one. A temporary fix would be to downpatch to version 2.3.0 of this mod for the time being, if not simply uninstalling Biter Cleanup altogether. Sorry for any interruptions to the growth of your factory this has caused.