-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPCs getting stuck trying to path in through a closed window. #51882
Comments
Yes, this happened when I cleared a town of zombies and set my NPCs to cleanup work. Soon all four of them were jammed against windows, politely waiting for me to walk past them, through the already opened door, and open it for them. It compounded when they were set to "close the doors," stranding their partner behind them. Eventually I just set the cleaning zones to the street so I didnt have to literally open every window in a city. |
OK, my question that was here was pointless... I eventually did a checkout back in time about a month. For all I know it's been in for quite a long while but as the NPC gets better over time the problem starts to get more obvious... I don't remember having this problem with 0.E stable but then I had parts of cars 'welded' onto the side of my home base to let the light in but keep the zombies out (what you do with lots of mechanics skill and no fabrication skill while sick of zombies smashing your hard to replace windows while you sleep). There was no way for the NPCs to path through the window so they didn't do it there... I also didn't have more than 1 NPC until shortly before I was done with that game and it seems like the NPCs stuck on windows thing really only gets more obvious with more than 1 NPC. ...or using 'Sort my loot' to pool a tile's resources for easy picking through which I only recently discovered (doing it myself first). One more edit, a workaround. I played with some NPC combat and misc options that I normally don't mess with. misc options -> don't go through closed doors (b, h). The NPC doesn't get stuck forever on a closed window anymore. Also won't open doors if it needs to which ends up behaving like the player when the player is performing zone activities (O). I've been leaving the NPC with close doors off anyway so this works fine for me. As a bonus I find it a bit annoying when the NPCs open windows to get to me, now they won't, could be problematic in some situations but I think I'll get used to playing this way for now. |
Confirmed by using your save file.
|
NPC pathfinding is a little wonky in general. Don't get me wrong, I like the inclusion of NPC's & think their pathfinding is fairly decent. Personally, I have an issue where a central assigned seat in a Humvee can't be found by the NPC w/out my intervention; prob an issue w/ equal distance calcs & the algo flipflopping betw/ them. I think that a piecemeal approach to fixing these sorts of problems is likely to generate as many issues as it fixes. A general overhaul needs to be made & there are so many corner cases the problem is overwhelming. There should prob be a thread for collecting as many of these cases as possible for when a general overhaul attempt is made. Another time, my NPC got stuck betw/ a noxious gas cloud & a Z hulk despite my being able to navigate a clear path by stepping diagonally twice around the cloud. NPC was yelling, "Can't run! Have to fight!" until he got super punched onto my side of the gas. |
@LeahLuong Please report this as a separate issue instead of hijacking an existing thread - this makes it easier to keep track of troubleshooting and debugging efforts. You can link the issues together, but they should all be separate threads. Thank you.
same |
@hexagonrecursion Andrey, I think you missed the point of my post. Creating separate threads is likely to compound this issue (not this particular issue but the greater issue of NPC pathfinding in general) because whomever ends up tackling it won't have easy access to the many corner cases that pop up. I don't have much understanding of this game's code so don't feel qualified to start a centralized thread. I also don't feel like starting a separate thread for each foible I encounter w/ NPC pathfinding. I apologize for "hijacking" the thread & will make no further comment here. |
I wasn't sure if I should make a new issue out of this or just comment here but... I have two theories as to why it was smashed
Others have told me NPC pathfinding has been bugged for a long time. I'm thinking if it's been this long and there's nothing on the horizon for fixing, perhaps |
@RabblerouserGT There are other issues raised about that NPC in #54263. As you noted, faction followers have a "don't smash" order which is in effect by default & the problem likely lies w/ that specific NPC. |
Describe the bug
It seems like NPC pathfinding is allowing bi-directional use of closed windows when windows can only be opened from one side.
Steps To Reproduce
Load the first included save.
DBG_NPC_PathWindow.zip
Tell NPC to follow (C, f)
Step inside
close the door
Step down diagonal away from the door or directly down to the window then away from it, the NPC will stand near the window until it is opened.
If done right, player can open the door and NPC will still be stuck near window.
NPC unstuck (usually) when player gets close.
Alternate:
Load the second included save (same world/character btw).
DBG_NPC_PathWindow2.zip
Tell the NPC to sort the items.
The NPC will head to the window and stand there.
Player can now move freely andthe NPC will be stuck this way until instructed to stop or the player opens the window that the NPC is near.
Expected behavior
NPCs don't try to path IN through closed windows (not like there are many one way terrain types). Pathing out is apt since they can open it without smashing or prying or otherwise damaging the window. This can mean going around for another nearby door or already opened window or walking up to the player and telling them to move.
Oh and yes I've had an NPC decide to try and path through a closed window when a perfectly good open window was one more down.
Screenshots
No response
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
No Fungal Growth [no_fungal_growth]
]
Additional context
This pops up a surprising amount when I'm out exploring with 2 NPCs (I don't have more yet). Basically for one reason or another one of the NPCs decides to try coming in through a closed window and then just stands there until I intervene somehow (usually by opening the window).
The text was updated successfully, but these errors were encountered: