Kenshi
Shin Mar 10, 2021 @ 12:02pm
Finding NPC/character coordinates
I was recently looking for a way to find character coordinates in save files. As I failed to find any reasonable (fast and reliable) way to do this I started analyzing the .platoon files. I found that name of the character is easily accessible for external software. And so I made a simple Python script to find in which .platoon files the given name occurs.

Looking for some charcter? Download the script:
https://drive.google.com/file/d/1NMoOWNvjBT7wymWJULihgrab5mDreOAX/view?usp=sharing

To run the script you need Python interpreter version 3.9+ and basic knowledge of how to use command line

[manual]
0. Download and install python if you do not already have it.
1. Copy the find.py file to the platoon folder of the save in which you want to search.
2. Open command line (for Windows - cmd or PowerShell) in the same platoon folder you copied the find.py or use 'cd' command to navigate to it.
2a. Default location for Windows is C:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon so you can navigate by typing 'cd c:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon' in the cmd (replace *username* and *savename* with your windows username and save name obviously).
3. Run find.py with names provided.
3a. For Windows it is 'python find.py [names separated with spaces]'. Eg. python find.py Fuu Green Izumi
4. The program will print .platoon files that contain given names.
5. Open found files with FCS, coordinates are in INSTANCE_COLLECTION instance entry.

Notes:
Script is case sensitive (don't be surprised if it finds nothing when instead of 'Fuu' you search for 'fuu').
If name contains spaces you can enter just one part of it.

EDIT:
Here is a link for a self-contained exe which do not need any additional third-party software like Python:
https://drive.google.com/file/d/1N72bs-CpEfx8hYB0cqnWt0_-lQ_t-K9H/view?usp=sharing
It also supports the -d parameter which can be used to specify which folder you want to search. So there is no need to copy the exe to each platoon folder to search it. Just type e.g. 'KenshiCharFinder.exe -d "C:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon" Fuu Green' in the cmd/powershell in the location where the exe is saved. Everything else works the same as in the original python script.
Last edited by Shin; Mar 14, 2024 @ 1:04pm
< >
Showing 1-13 of 13 comments
Doom Jul 21, 2021 @ 11:15am 
Very useful, thanks! :steamthumbsup:
bunny de fluff Jul 21, 2021 @ 5:18pm 
Don't want to download and install py myself.
Shin Jul 22, 2021 @ 2:41pm 
Originally posted by white:
works with a command line command (grep) though but solid intern-grade effort

hey if you like code then there's this https://steamcommunity.com/sharedfiles/filedetails/?id=797652627

I will definitely have a look at this one

Originally posted by bunny de fluff:
Don't want to download and install py myself.

I'm considering making a native Windows exe for this
sereal Oct 26, 2023 @ 3:26am 
I know it's an old post and sorry for reviving. If there's a better way to find a npc i couldn't find it. My question is.. is there an efficient way to get an idea regarding location the coordinates point to in the world? I know i can select an object and press shift F12 to get the coords of that object.. but it still requires some trial and error to get a more exact idea what part of the map i need go to.
Last edited by sereal; Oct 26, 2023 @ 3:37am
bunny de fluff Oct 26, 2023 @ 5:12am 
you can teleport one of your guys to the location of one of the npc that you want if they are alive.
sereal Oct 26, 2023 @ 5:24am 
how would I accomplish that? modify the position of one of my guys to the position i want to go to in FCS and save? When looking up "teleport to coordinate or location in kenshi" it's mostly about reset squad position which doesn't really help when i don't have the 'position' i want to go to.

EDIT* didn't even see your comment. Just applied the same strategy to find cullens location to modify *my* location.
Last edited by sereal; Oct 26, 2023 @ 6:03am
sereal Oct 26, 2023 @ 6:01am 
zomg it worked. freakin inquisitor cullen derping around in the middle of nowhere in the vain zone. Thanks!

thank you for taking the time to post the link!
Last edited by sereal; Oct 26, 2023 @ 7:26am
bunny de fluff Oct 26, 2023 @ 7:27am 
glad to hear it
ErwinsArm Nov 24, 2023 @ 7:36am 
THANK YOU SO MUCH!!
Can't believe that you can't get this information without external tools, or searching hundreds of files 1by1..
Shin Nov 25, 2023 @ 1:51pm 
Originally posted by ErwinsArm:
THANK YOU SO MUCH!!
Can't believe that you can't get this information without external tools, or searching hundreds of files 1by1..
Thank you for reminding me this exists and I'm glad to hear it is still usefull for someone.
Originally posted by bunny de fluff:
Don't want to download and install py myself.
Actually, here is a link for an exe (warning: runs only on Windows 64-bit with x86 CPU):
https://www.dropbox.com/scl/fi/it8p4gb6e4ugbilbnmn30/KenshiCharFinder.zip?dl=0
Last edited by Shin; Nov 25, 2023 @ 1:56pm
RegretsInLife Nov 25, 2023 @ 4:59pm 
Originally posted by Shin:
I was recently looking for a way to find character coordinates in save files. As I failed to find any reasonable (fast and reliable) way to do this I started analyzing the .platoon files. I found that name of the character is easily accessible for external software. And so I made a simple Python script to find in which .platoon files the given name occurs.

Looking for some charcter? Download the script:
https://www.dropbox.com/s/do1jxwez0o9vhl6/kenshi_char_finder.zip?dl=0

To run the script you need Python interpreter version 3.9+ and basic knowledge of how to use command line

[manual]
0. Download and install python if you do not already have it.
1. Copy the find.py file to the platoon folder of the save in which you want to search.
2. Open command line (for Windows - cmd or PowerShell) in the same platoon folder you copied the find.py or use 'cd' command to navigate to it.
2a. Default location for Windows is C:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon so you can navigate by typing 'cd c:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon' in the cmd (replace *username* and *savename* with your windows username and save name obviously).
3. Run find.py with names provided.
3a. For Windows it is 'python find.py [names separated with spaces]'. Eg. python find.py Fuu Green Izumi
4. The program will print .platoon files that contain given names.
5. Open found files with FCS, coordinates are in INSTANCE_COLLECTION instance entry.

Notes:
Script is case sensitive (don't be surprised if it finds nothing when instead of 'Fuu' you search for 'fuu').
If name contains spaces you can enter just one part of it.

EDIT:
Here is a link for a self-contained exe which do not need any additional third-party software like Python:
https://www.dropbox.com/scl/fi/it8p4gb6e4ugbilbnmn30/KenshiCharFinder.zip?dl=0
It also supports the -d parameter which can be used to specify which folder you want to search. So there is no need to copy the exe to each platoon folder to search it. Just type e.g. 'KenshiCharFinder.exe -d "C:\users\*username*\AppData\Local\kenshi\save\*savename*\platoon" Fuu Green' in the cmd/powershell in the location where the exe is saved. Everything else works the same as in the original python script.
Very useful thanks
RegretsInLife Nov 25, 2023 @ 4:59pm 
Originally posted by bunny de fluff:
Don't want to download and install py myself.
Ok
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Mar 10, 2021 @ 12:02pm
Posts: 13