View Full Version : Custom placeable walkmesh tutorial

02-08-2009, 08:13 AM
Tutorial created in response to: http://www.lucasforums.com/showthread.php?p=2586115

Questions about this tutorial can be asked at: http://www.lucasforums.com/showthread.php?t=195842

Back when Team Jawa was running we had experimented with walkmeshes and apparently no one has explained how to make a new placeable walkmesh. Well, almost a year later, here it is :D

Since I'm only covering the walkmesh I will be recreating a walkmesh for an existing placeable, so I need not embarrass myself with my terrible modeling skills :p

First of all I am going to extract the model that I am altering the placeable for, though you won't need to do this since you will have your own model that you have made; so the placeable I am going to be editing is "plc_bed1". And here it is:
I didn't bother with the textures.

Now first step is to add a dummy at 0,0,0 and call it "walk_parent".
So we go Create > Helpers > Dummy; click and drag, the size of the dummy doesn't matter. Then change the coordinates to 0,0,0 (center) and name it "walk_parent". Finally we go Modify > AuroraPlaceable > Check "Placeable [PWK]"; you will also notice "Door [DWK]", this is because you follow the same principal for door walkmeshes, though I won't be going in to how to make those.

Second, we need to create the walkmesh its self. Now normally the walkmesh for the bed would be just a rectangle and recreating a rectangular walkmesh is pointless and you can accuse me of just using the old one :p So this walkmesh is going to be circular, so we can be agreed there is a fair difference. :p
So this is the walkmesh: a flat plane. I used Create > Shapes > Circle > (Right click) > Convert to Editable Mesh. But it doesn't matter how to make it, so long as it is an Editable Mesh. Name this mesh "PWK".

Now we need to go into Modify, with the walkmesh selected, and choose under Selection, "Face" or "Polygon" anything that allows you to select faces.
Select all the faces and under Surface Properties > Material, Set "Set ID" to 7. This means "Non-Walk" so for all the faces selected, the PC will not be able to walk over them; So the circle is "un-walk-on-able".

So now all we need to do is link it all together. Link the mesh "PWK" to the dummy "walk_parent", and the dummy to the AuroraBase.
EDIT: BTW, using the link tool, you need to select the walkmesh, click-drag and you should have a line from the object to the cursor, release the mouse over the dummy and it should bind the walkmesh to the dummy. Make sure you don't do this the otherway round, and its the same for the dummy to the AuroraBase.

Then hit export and you should find, in addition to your model file, a ".pwk" file. However, before we just throw these in the override we need to finish the walkmesh (pwk) file. First of all you need to find another random placeable walkmesh from KotOR (Using KotOR Tool) we need to go through: BIFs > models.bif > Placeable Object Walkmesh; and I'm going to be using "plc_chair1" as this is clearly different to "plc_bed1".
(I put a few spaces in that screenshot for the purposes of the screenshot, don't do the same :p)
Save as ASCII and that box that appears, just use default, it doesn't matter anyway.

We need to extract some data from this pwk and put it in our own pwk. So open up them both in notepad and in the random pwk (The one that is NOT yours) find the line beginning "multimaterial 20" and copy all of the indented.

Finally in KotOR Tool, Tools > Open PWK/DWK Editor; Then File > Open ASCII PWK... (BTW don't hit CTRL + O because this is for Binary PWK's and you'll get errors) Then simply save as Binary PWK and put it (And your compiled custom model of course) into the override.

Then, assuming you have made your changes to "placeables.2da", run the game and have a look.

Here is the results of my custom walkmesh for the "plc_bed1" placeable.
The PC is hitting the new and larger walkmesh.

Well I hope this is of help to those who want to create their own own placeables. :)