[1.1.92] Biters fail to pathfind around obstacles on chunk boundaries

Post your bugs and problems so we can fix them.
Post Reply
Lexsagna
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Sep 26, 2023 12:41 am
Contact:

[1.1.92] Biters fail to pathfind around obstacles on chunk boundaries

Post by Lexsagna »

While attempting to design some walls for my deathworld, I've come across some inconsistencies in the biter pathfinding. I'm attempting to exploit the pathfinding in order to guide the biters into funnels where turrets can more efficiently attack them, but their pathfinding is strangely inconsistent across chunk borders, making my designs somewhat position-dependent, which is annoying when trying to plan a wall to defend a mining outpost on a resource patch which may or may not be chunk-aligned. If the funnel is not on a chunk border, they move into it no problem. But if it has a wall on a chunk border, they do not care and just tunnel right through.

For demonstration, I have the following setup, in a brand new entirely-vanilla sandbox game, playing from the editor:
Image
A single gun turret, with a thick, beefy wall on one side, and a weak wall of pipes on the others.

Now, as expected, the biters will pathfind around the difficult-to-breach wall in favor of attacking the much weaker pipes to get to the turret instead. This makes sense, and is exactly the behavior I would expect. (I am using the "show-paths" debug option to display the biters' paths)
Image

But watch what happens as I move this setup closer to the chunk border.
With one tile of space, it once again works as expected, the biters pathfind around the wall just fine.
Image

But once the wall touches the chunk border, while some biters still go around, some biters decide to just go *through* the wall instead. There is no reason for them to waste time chewing through a tough, hardy wall when it would be much faster to just run around instead like their friends do.
Image

This behavior continues as I move the wall through the chunk border:
Image
Image
Image

And it isn't until the wall is all the way through the chunk border that the biters will actually consistently start going *around* it again.
Image

I have noticed this sort of "aggressive towards things at the chunk border" many times while trying to design effective walls. If I don't make sure it's spaced out from the edge of the chunk, they'll eventually destroy my obstacles every time, rather than nicely walking around. For a practical setup, here's my starter iron mine design I've been futzing around with (chunk borders displayed with the ChunkyChunks mod, the green circles are from the Bottleneck mod):
Image

If I spawn a horde of biters to attack from the Southwest, they nicely funnel through the pipe maze, giving the turrets ample time to shoot them all. After the attack, there's rarely a single scratch on any of the pipes.
Image

But when I spawn some biters to attack from the [radially-symmetric] Northeast, they go on a devestating rampage and chew right through the pipes every time.
Image

It's the exact same pipe maze, the entire base is just two identical rotated copies of the same blueprint, but these behaviors at chunk borders mean that it's dependent on where exactly the resource patch lies, and thus where the chunk borders fall in the pipe maze, as to whether or not it is effective or just a huge waste of resources and time.

I've included my log, as well as the vanilla demonstration save (biter_pathfinding.zip) and my slightly-modded deathworld mine testing save (walltesting-deathworld-setup.zip).
Attachments
walltesting-deathworld-setup.zip
"Practical" test environment of a starter iron mine on a deathworld
(5.98 MiB) Downloaded 27 times
biter_pathfinding.zip
Vanilla test environment on which I demonstrated the behavior
(2.66 MiB) Downloaded 26 times
factorio-current.log
Log file
(7.69 KiB) Downloaded 23 times

Post Reply

Return to “Bug Reports”