[0.17.1536] Pawns cannot construct diagonally, but will trap walls in corners

Started by ymc, May 14, 2017, 04:17:16 PM

Previous topic - Next topic

ymc

Pawns don't construct diagonally, and display "no path" when you try to force them. However, they appear to do both walls (not the corner) first by choice rather than follow the closest tile rule.

For instance, if they start at one end of a wall, they will keep moving along that wall. They seem to skip the corner, and move to the next wall, leaving [X] pictured below as having materials but 0 work done on it. When you're doing double-walls for insulation, or adding a pretty wall to a cave, then you have to tear down a wall to get to it. If it's a standalone structure outside, it's less of an issue, but still annoying.

        pawn █ █   
             █ █
start        █ █
████████████[X]█
████████████████


It's important to note that this "Nope, I cannot reach that corner" rule does not apply to conduit.

I have attached a save where this happens, but it's happened to me in multiple colonies.

[attachment deleted by admin due to age]

ymc

Quick update with screenshot. Pawns can mine diagonally.

[attachment deleted by admin due to age]

Calahan

Thanks you for the (thorough) bug report.

This sounds like the return, in some instances it seems (but not all?), of a bug that had (now "has" again) been around for quite a while, and was indicated as fixed for A17. https://ludeon.com/mantis/view.php?id=2386 (I recognise this bug well as it was one of the first ones I ever reported).

Pawns not being able to build diagonally (corner-touch) is WAD (or at least that's my understanding), but this can lead to some rather annoying and unwanted wall building outcomes. Exactly like the one you've highlighted. So personally it would be good to see some sort of tweak to the orientation priority* system (for construction jobs), so that Pawns would do corner-touch building jobs before cardinal touch ones, and so avoid the annoying outcomes.

* I call it this, but I do not know what the proper term for it is. It refers to the order in which a Pawn will carry out each job when surrounded by 8 identical jobs, and usually goes South, W, E, N, SW, NW, SE, NW (although I've noticed inconsistencies in this order since A14).

ymc

Ahh, that other post is quite enlightening. I've just scanned all the places it's happened / not happened and I'd bet it is the same bug. The conduit I was speaking of could actually be reached from the other side of the wall, so this allowed the pawn to work on it because "they could get to it", not just because they could reach it.

Will test.



EDIT: Damn, looks like a couple things going on. Looks like mining, constructing conduit, and de-constructing can work diagonally. Mining only works if you can reach it from a valid direction. De-construction and conduits just seem to work diagonally regardless of any other rules. Construction of walls never works diagonally even if you can reach it from another valid angle.

[attachment deleted by admin due to age]

ymc

Darn, my statement that they won't construct diagonally just got blown away. So I came at it as though the wall construction already had materials, but it doesn't seem to matter. I can build walls on the outside corners diagonally, just never the inside corner diagonally. It's either pathing blocked or the pawn goes the long way around.


        pawn █ █   
             █ █
start        █ █
████████████[X]█
████████████████



         pawn
██████████████[]
████████████████
             █ █   
             █ █
             █ █




EDIT: Thought maybe it was related to double walls or natural stone. It's not. Grrrr ...

[attachment deleted by admin due to age]

ison

Okay, so the current rules are as follows:

You can access a cell from a diagonal cell if either the cell has a roof holder in it (this is so you can repair walls diagonally) or any of the 2 cardinal-adjacent cells is walkable (this is so you can interact with things diagonally if you could reach them anyway by walking one more cell).

The only exception are mineables, which had a bug, which I just fixed. They didn't follow this rule.

The problem is that a thing can be either reachable or unreachable for all work types. So if we allow repairing conduits diagonally then as a consequence it's also possible to deconstruct things diagonally. I think it's fine for now.

I've changed the rule to this:

You can access a cell from a diagonal cell if either the cell has a roof holder (but not if it's a natural rock) in it or it has an unfinished roof holder (blueprints don't count) or any of the 2 cardinal-adjacent cells is walkable.

This should fix the first problem. Thanks.