(solved) Looking for a Crate (Placeable / 3D-Model)

Hello all,

I’m searching a cube-shaped crate which has the size of a tile in the chessboard (maybe a little bit smaller). Actually I need 2, one with light and one dark texture.

I already checked CEP, Project Q, D20-modern and found nothing of this size.

Is there somewhere such a crate in a hak?

Is is possible to scale the size of a 3d model with simple tools (texteditor)? If yes, how?

sure, this is actually pretty simple, if you’re not too picky about the result. you could modify one of the standard crates and add a scale parameter to the model, which would allow you to scale the crate as you want. note that certain things won’t change [where it blows up if destroyed, where it becomes ‘active’ if the mouse hovers over it, etc.] without a bit more effort.

here is one ‘quick and dirty’ approach [i’m sure some of the modelers around here would have a better solution for you ; me, i’m all about the dirt… :wink: ].
1- find a crate you like. one way to do this would be to look in placeables.2da. suppose you choose one of the black hotu crates. in placeables.2da, you see its model is ‘PX2_F01’.
2- using the nwn explorer, locate the model whose name is the same as you found in placeables.2da and export it, then open it with a text editor. if you see a bunch of indecipherable gobbledygook, the model is compiled, so you’ll need to decompile it first. if it looks like computer-y text (but basically readable), skip to step 4.
3- decompile a compiled model using nwnmdlcomp.exe -d. this will create a .ascii file for you. throw away the original model you exported and rename the .ascii file (e.g. px2_f01.mdl.ascii) to just plain .mdl (e.g. px2_f01.mdl). you can now edit this with a text editor.
4- in the text editor, search for the first trimesh node. this is usually the one that defines the overall shape of the placeable. (in px2_f01.mdl, it’s node trimesh Box1193.)
5- you’ll notice the lines following it are indented. scroll down until you reach the first endnode, which should be flush against the left margin once again. you’ll usually see a few lines directly above it specifying position and orientation, and the px2_f01.mdl model is no exception.
6- if one of these lines is a scale, just change the number following it to something else. you’ll have to estimate. as you might guess, ‘scale 2’ multiplies everything in the preceding definition by two, so the resulting placeable will be twice as big. if there’s no scale line, insert a line such as scale 2 indented at the same level as the position and orientation lines, just above the endnode line.
7- save the model and copy it into your nwn override folder.
8- fire up the toolset and paint down the placeable corresponding to the model you’ve been working on, in order to verify that it has the size you want. if it doesn’t, go back into the editor again and fiddle around with the scale line until you get what you want, either restarting the toolset or firing up the game after each change.
9- once you’re satisfied, you can put the model into a hak that you’ll include in your module. optionally, you could compile it as well using nwnmdlcomp, remembering to rename it once again with the .ascii suffix before compiling, and compiling this time without the -d flag.

NOTE that this approach will change all placeables that use that model. if you don’t want that, you’ll have to create a new placeable based on your exported model, which is a bit more complicated.

good luck!



my thanks. I’m actually quite familiar with hacks like this, but I never understand the parameters in the nodes in detail. I only tossed out complete nodes so far. So pointing out the “Scale” and mentioning that is that easy is a great help. I’ll try it.

And yes, I like “dirty” solutions as well :slight_smile: