Kenshi
Modding Question
I'm thinking about modelling some buildings, I was just wondering how do you create and apply collision to imported objects as well as nav mesh?
Last edited by Potato Head; Apr 3, 2018 @ 8:20am
< >
Showing 1-5 of 5 comments
oi__io Apr 3, 2018 @ 9:03am 
I think that's uncharted territories for most of Kenshi modders.

I remember seeing a number of modded structures, machineries and interactable object in the workshop but the ones that I've seen are mostly repurposing vanilla mesh with custom functionality.

All that I've seen so far is a basic mod when it comes to structures or furnitures. If you're planning on making a building with interactable doors and stairs, I guess you're going to be our pioneer.

If you managed to get it working, I hope you'll consider on writing a guide so that others can learn from your experience. :D
Potato Head Apr 3, 2018 @ 10:08am 
Cheers for the reply, unfortunately if the game editor can't support it then I'm pretty sure my dumb ass won't be able to figure it out. I'll probably go the route of seeing if I can use the data from other buildings and replace the meshes with similar sized ones of my own.
Last edited by Potato Head; Apr 3, 2018 @ 12:52pm
bspawn Apr 3, 2018 @ 2:46pm 
Collission meshes for buidings and items are defined in xml files, refered to in the FCS. Those are converted to .bin files when first loading the game with the new collision file.

In most cases the collision mesh is defined as a box:

<NxBoxShapeDesc dimensions="3 9.5 2.5">
<localPose>1 0 0 0 1 0 0 0 1 0 0 2.5</localPose>

In some cases (i have seen this with buildings) it is a complex shape presumably derived from a mesh created in a 3D editor, and looks like this:

<NxConvexMeshDesc id="ConvexMesh_0" userProperties="">
<cookedDataSize>892</cookedDataSize>
<cookedData>4E5853014356584D030000000000000049434

I do not know how to create the "cookedData".

To learn how to use xml collision files and 'NxBoxShapeDesc', you'll have to investigate and experiment. Use the FCS to find xml references, make a test mod, copy and edit xml files.
someone Apr 4, 2018 @ 7:22am 
The blender plugin can export collision files.
Add rigid bodies to some objects in blender, select box, capsule, convex hull or mesh for the collision shapes and export with file>export>kenshi collision.
You can use this tool to preview mesh and collision files: https://www.lofigames.com/phpBB3/download/file.php?id=5920
Potato Head Apr 4, 2018 @ 11:04am 
Thank you so much, I can't wait to get at it.
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Apr 3, 2018 @ 8:04am
Posts: 5