Kenshi
Unique Settlement Placements
Shidan 21 Oct, 2020 @ 10:55am
Guide: Undeleting a location from your mod
If your mod has already deleted some generic locations, and replaced them with unique variants of your own, you might run into some issues trying to update your mod to be compatible. Namely, there will likely be a few locations missing from the map, because the two mods didn't exactly line up which locations were deleted.

This post will walk through the process of removing the deletion you performed in your mod, through manual editing of the level data file.


First off, you need to open 3 files in the FCS. I personally would use separate instances of the FCS, so I can have all open at the same time, but it's not critical.

  1. A normal mod file. I usually just open rebirth.mod when checking things, though your own mod works fine too. Important thing is you can see the entry of the town you deleted.
  2. The base game's level data file. This is located in Kenshi\data\newland\leveldata\rebirth\leveldata.level
  3. You mod's level data file. This will be in Kenshi\mods\<Your Mod>\leveldata\leveldata.level


Now in the first FCS instance, you need to open the town in in question the FCS. Check its SID number shown just below the name.


In the second FCS instance, you'll need to locate the "GAMESTATE_TOWN_INSTANCE_LIST" type entry from the list. Given they all have the same name, this can look daunting, but there are way around it. Easiest one for this purpose is to type "0-townlist" in the search at the bottom of the window.

Once you have the instance list open, you'll need to locate the SID you found earlier in this list on the right. There are no tricks to locating it faster unfortunately. You just have to scroll through by hand until you spot it. Once located, make note of the instance's name.


Now in the third FCS instance, you'll need to locate the "GAMESTATE_TOWN_INSTANCE_LIST" again. Once more, searching "0-townlist" in the list will locate it quickly for you.

Once open, look for the instance name you got earlier in the second file. Given this will be a deleted entry, it should be grey in colour and towards the bottom of the list. Once you found it, right click on it, and remove it. Save the mod file, and you're done!


Here is an image giving a basic visual guide as well: https://cdn.discordapp.com/attachments/554107605434236928/768523930860126258/Undelete_town.PNG


As an alternative method to all this, if you don't care about precision. You could remove all the grey instances in the third file. This would add all the locations you deleted back to the world. Might be something that works well for your case, though it won't be ideal for everyone, hence the guide.

Let me know if there is anything you don't understand, or if something odd pops up in the process. I'll be happy to assist. :)