Kenshi
Storage Sheds
zartury  [developer] Jan 30, 2022 @ 6:10am
Troubleshooting with gates that don't work (allow people to walk through) or people freezing near the shed (job or otherwise)
A troubleshooting workguide to help you fix the issue - the issue relates to pathfinding
Last edited by zartury; Jan 30, 2022 @ 6:24am
< >
Showing 1-5 of 5 comments
zartury  [developer] Jan 30, 2022 @ 6:18am 
If you have issues with the gates not working, in relation to having used this mod (say if you have built more than 1 shed and the problem arises), here is the process, from easiest to most complex:

1. Open and close the gate. Check if the issue is fixed, if not, proceed to step 2.

2. If issue persists, save your file and reload the save. Check if the issue is fixed, if not, proceed to step 3.

3. If issue persist, apply Shift-Ctrl-F11 to gain access to map editing tools, and click on something similar to "regenerate the navmesh". Then save your file and reload the save. Check if the issue is fixed, if not, proceed to step 4.

4. If none of the solutions worked, you must first make a different save and then delete one shed at a time until you discover the culprit. Reload the save and then delete that culprit. If none of the sheds are the culprit, it can be another building you made or even the gate placement itself that could be the issue.
Last edited by zartury; Jan 30, 2022 @ 6:30am
zartury  [developer] Jan 30, 2022 @ 6:21am 
The primary issue for this mod is similar to vanilla buildings - too many buildings impact the pathfinding in the game. In most cases, steps 1 through 3 will be most common. But step 4 can be expected if you lay down too many buildings together and leave little space between. Also ideal to never lay down the sheds on the main pathways within the game, as this can lead to big pathfinding issues later on (activating the Shift-Ctrl-F11 should show those pathways).
Tizferatu Dec 17, 2022 @ 12:41am 
GenMod's storage sheds have the same exact issue regarding gates. For whatever reason, the implementation both your mod and GenMod have with sheds somehow causes gates to bug out and "ghost" whenever the area is reloaded (either via save loading or leaving and returning to the area).

This might be the case with any mod that tries to turn a building into a storage.

This same situation happens in vanilla when importing while the gates are closed (they have to be toggled up and down once on re-import), but after doing that (in vanilla) it's fixed for the duration of that import.

But with storage sheds (doesn't matter if yours or GenMods, or presumably any other mod that uses the small shack model for the storage shed) it becomes a recurring issue.

Makes me wonder if there's some weird hard coding somewhere in the depths of the building and base code that expects the small shack model to always be a building and causes a swallowed exception or something when the base area is loaded which ends up causes the navmesh to somehow ignore the gate door.
zartury  [developer] Dec 17, 2022 @ 6:03am 
Well, has been a while since I have played Kenshi, but from my experience way before then, you would have gate issues if you laid down to many buildings in a given area (would make things alot worse if you laid them close to the gate itself too). Would be common for characters to get stuck in the strangest of places. Most likely it is the hard coding to the foundation of the building that may be the cause for the gate issue (it is far deeper underground). That or some new update that came out that messed the mod up permanently - not sure. I have examined it several times in 2019/2020 when this issue kept on being reported but I could not identify how to fix it.

But overall, the pathfinding in this game has been a sore point to this game since way back when I first played it in 2014. Most likely this problem will be fixed in Kenshi 2, whenever it comes out or they allow the building treatment as storage to be more seamless.
Tizferatu Dec 17, 2022 @ 11:47am 
Yeah, what you're describing is a separate issue that also causes similar things to happen (but in that case can involve walls, buildings, and other things that should collide to fail).

There's also "building across a road" that causes similar issues as well.

In the case I posted about, my testing there were no buildings too close to each other. I made sure each building had enough room for a large animal (gorillo and crimper) to move between. Deleting sheds (I had 3, spaced out) immediately resolved the gate issue. Ironically I replaced the sheds in their exact positions with actual small shacks with storage inside of them, no issue.

It reliably happens whenever the area is at least partially reloaded (either moving far enough away and coming back, switching to another team for a bit and switching back, reloading the game, importing).

It's why I think what's causing this is an error happening in the area loading code - it's seemingly stopping execution of whatever code checks the state of gates and cuts the navmesh at the gate if closed.

How/why sheds from two different mods are causing that error to surface is the really weird part. It's why I suspect some weird hard coding down in the bowls of base loading code. Because otherwise it shouldn't really care/error regardless of what model is used (unless maybe the models themselves are somehow flawed, but that seems unlikely to happen across two different mods).

Hopefully in Kenshi 2 they open a lot more actual code implementations to modders, but with UE that'd require going the route like Ark and a few other games did of creating a full out dev kit tied in to UE. Hard to say if they'll go that far or if it'll just be FCS with all its limitations.
< >
Showing 1-5 of 5 comments
Per page: 1530 50