Kenshi
ambi Sep 2, 2023 @ 7:05am
how to use dev tool to remove or kill NPCs?
all the cages in eyesocket are full so i can't sell any more slaves. i pushed shift + f12 to open up the dev console so i can remove the pre-existing slave NPCs and empty the cages. but i can't figure it out what to do next. i want them either deleted or killed. what do? :(
Originally posted by ReD2222:
I found something interesting that might help you. If you SELECT an NPC, then enter Shift + F12 and then press DEL - you'll delete a unit from the game completely.
< >
Showing 1-15 of 22 comments
Shidan Sep 2, 2023 @ 7:54am 
You can't, the editor is not a debug tool, it is a world editor. It's not meant for interacting with characters, and can't kill or remove them.

You can import your save if you really want to wipe the cages. Though do note, this will also wipe you own cages, as well as reset a number of other things in the world.
https://kenshi.fandom.com/wiki/Main_Menu#Import
Cattrina Sep 2, 2023 @ 8:45am 
or, you can just use the tool to add more cages.
The author of this thread has indicated that this post answers the original topic.
ReD2222 Sep 2, 2023 @ 11:18am 
I found something interesting that might help you. If you SELECT an NPC, then enter Shift + F12 and then press DEL - you'll delete a unit from the game completely.
ReD2222 Sep 2, 2023 @ 11:20am 
Unfortunately it works once per entering F12 mode. So rinse and repeat :D
Why have an editor when you can't edit everything especially characters?
What was the idea here?
it was part of how the game was made. in game editor was only meant for building the world.
the FCS is for everything else not covered by hard coding or the editor.
so it has limitations. and what the dev allowed for us to have access to.
Shidan Sep 2, 2023 @ 6:26pm 
Originally posted by ꧋ꦙSigismundꦙ꧋:
Why have an editor when you can't edit everything especially characters?
What was the idea here?

Because it's a world editor, for placing buildings, towns, features, roads, etc. It was never intended to be used as anything but that, so it includes no features that are not related to that.

It is NOT a debug editor, used for testing and debugging things. Which would include things like removal of NPCs, item spawning, NPC spawning, etc.
What? How is characters or npc's not of the same world you would like to edit.
Editing characters is not debugging it is editing.
You are basically saying that the engine cannot support character editing because reasons unkown.
ReD2222 Sep 3, 2023 @ 1:20am 
Originally posted by ꧋ꦙSigismundꦙ꧋:
What? How is characters or npc's not of the same world you would like to edit.
Editing characters is not debugging it is editing.
You are basically saying that the engine cannot support character editing because reasons unkown.
Have you tried the method I mentioned above? Didn't it work?
carl Sep 3, 2023 @ 4:33am 
Average slaver W. Sell so much slaves the united cities slave economy doesn't even have enough capacity to hold them.
ambi Sep 3, 2023 @ 4:38am 
Originally posted by ReD2222 Rare quality user:
I found something interesting that might help you. If you SELECT an NPC, then enter Shift + F12 and then press DEL - you'll delete a unit from the game completely.

WOW! this does work! thank you!
carl Sep 3, 2023 @ 4:39am 
At that point might as well move on to another city or slave farm to sell your slaves. An awesome goal would be to sell as much slaves possible, until every city won't need any more slaves. You'll save the economy and prevent innocent drifters being enslaved! You'll be like tinfist.. but awesome...
Shidan Sep 3, 2023 @ 6:47am 
Originally posted by ꧋ꦙSigismundꦙ꧋:
What? How is characters or npc's not of the same world you would like to edit.
Editing characters is not debugging it is editing.
You are basically saying that the engine cannot support character editing because reasons unkown.

Because editing characters is all purely FCS work. Everything about a character is determined in the FCS, including its spawn locations. There is nothing for the world editor to be involved with there, nor does there need to be due to how characters work in the system.

The world editor is specifically there to do the things that can't be defined in the FCS, or would be very difficult to do without seeing the world itself, generally things that would involved placement in the world itself. So building towns mostly, or modifying and placing fog volumes, or building the road network for the pathing AI.



Originally posted by ReD2222 Rare quality user:
I found something interesting that might help you. If you SELECT an NPC, then enter Shift + F12 and then press DEL - you'll delete a unit from the game completely.

It's very interesting that this works. I'm inclined to think it's not intended, and is only happening as a bug, since it only works once per launch of the editor. But hey if it works, it works. xD
Cattrina Sep 3, 2023 @ 6:57am 
I am just wondering whether that hack actually alters a world state. I bet deleting an unique would just remove them from the scene and all in the calculations and world states they would be still alive or imprisoned whichever was their last status.
Shidan Sep 3, 2023 @ 7:01am 
Originally posted by Cattrina:
I am just wondering whether that hack actually alters a world state. I bet deleting an unique would just remove them from the scene and all in the calculations and world states they would be still alive or imprisoned whichever was their last status.

Yeah, I would wager it still sees them as perfectly fine. Much like when they haven't spawned yet and don't exist anywhere.

And I do wonder what it's possibly deleting behind the scenes to also break itself, requiring you to re-launch the editor to do it again.
< >
Showing 1-15 of 22 comments
Per page: 1530 50

Date Posted: Sep 2, 2023 @ 7:05am
Posts: 22