NWmax Plus - Binary mdl file not decompiled! Why?

Hi guys! I had a need to edit the original tic01_e01_01 castle bedroom set. I used the latest version of NWN Explorer 1.8.1 to export the model and wok. But when I try to open it with the NWmax Plus plugin, I get a decompilation error, as if Explorer had exported it incorrectly! What to do? I really need to edit this set.

You can export binary models from explorer by clicking on ASCII at the bottom of the viewer window, then click on the menu tab at the top of the top of the window “resources>export text”. After you have exported the model, change the file type from .ascii to .mdl.

In case you still have issues, here’s a link for the decompiled model:

Also, you do not need to export the wok, as all that info is also stored in the mdl file and NWMax Plus will create a new wok on export.

1 Like

It works! Thanks bro, you saved my project! :slightly_smiling_face:

I got another problem! I deleted several objects of the model, namely the wooden beams above the bed. When trying to export, the plugin writes such an error. If you look at the View Sanity Check Results, you can see several Bad Edge. How can this be fixed? Why can’t I just delete model objects?

Welcome to the wonderful world of BioWare walkmeshes. Your sanity check is erroring out on the walkmesh because of where some of the verts are located.

You’ll notice some of the verts say stuff like 500.001, 499.999, etc. These verts need to be edged to 500. You can also automate these fixes with a program called CleanModels.


Read the instructions carefully, as CM3 has a lot of parameters that, if not set properly, can cause you headaches.

You won’t see any specific parameters for wok, except for changing material, but CM3 will automatically reset the wok when the mdl is processed.

1 Like

Very wonderful! Thanks for the detailed answer, I will try to do it with him))

If you still can’t get it to work, lemme know.

1 Like

Fixed model (with the bed top rail removed) if you need it.

1 Like

Look at the rotation of the walkmesh. It probably isn’t 0. If that is the case, click on the hierachy tab, select “affect pivot only” and set the rotation of the walkmesh to 0. Unselect “affect pivot only” and go to the utilities tab (hammer symbol). Select “Reset Xform” and “Reset selected”. Back to the modify tab you’ll see an “XForm” modifier above the “Aurora Walkmesh” modifier. Drag it down so it is between the Walkmesh modifier and “editable mesh”, right click it and select “collapse to”. If a warning pops up answer “yes”. Now the model will still export with a failed sanity check, but the next time you import it the vertices will be in the right place because the walkmesh is no longer rotated and it will export fine.
About a third to half of the original Bioware models will fail the sanity checks because they didn’t follow their own guidlines and walkmeshes are rotated, have holes or tears or in the worst cases two faces that are exactly the same which will make the exported model useless because of aabb split problems.

1 Like

Yup, bad orientation on the wok - along with a LOT more errors - CM3 export log:

tic01_e01_01.mdl loaded.
  tic01_e01_01a not at tile origin - renamed to cm3_repair_1
  new dummy node tic01_e01_01a created
  node cm3_repair_1 re-parented to tic01_e01_01a
  in emitter candle_fx24, "opacity" interpreted as "alpha"
  in emitter candle_fx23, "opacity" interpreted as "alpha"
  emitter candle_fx24 assigned birthratekey 0 in tiledefault animation
  emitter candle_fx23 assigned birthratekey 0 in tiledefault animation
  aabb node plane1369 set to render 0
  aabb node plane1369 set to shadow 0
  unused bitmap stone in aabb plane1369 set to NULL
  set ambient to 0 0 0 in 6 black objects
  set diffuse to 0 0 0 in 6 black objects
  decimal snap applied to node positions and mesh vertices
  null faces deleted from [box5566]
  repaired 2 degenerate face(s) in trimesh node mesh3366
  unused tverts in unrendered node plane1369 deleted
  out of range tvert(s) in face(s) of plane1369 set to zero
  unused tverts deleted from [box5566]
  tverts snapped to 1/512
  tverts welded in 12 objects
  renormalized tverts in 12 objects
  forced aabb node plane1369 to null orientation
  7 edges of aabb node plane1369 snapped to tile
  aabb data rebuilt
  repivoted line930 by [-1.2700000, 0.0900000, 0.8500000]
  repivoted mesh3366 by [1.2800000, -0.8200000, 1.1800000]
  repivoted box5566 by [-0.8700000, -0.0100000, 0.4300000]
  *** bad pivot on box5567 placed at bottom centre
  repivoted box9413 by [-0.0400000, -2.2300000, 0.1100000]
  repivoted box9415 by [2.4800000, -0.0400000, 0.1100000]
  repivoted box9416 by [2.4800000, -0.0400000, 0.1100000]
  repivoted box5570 by [-0.0400000, -0.8100000, 1.4500000]
  repivoted box5569 by [-0.0400000, 0.8000000, 1.4500000]
  *** bad pivot on line43 placed at bottom centre
  warning - model tic01_e01_01 contains data that will be ignored by the NWN engine [lightningsubdiv] 
  warning - model tic01_e01_01 contains data that NWMax 0.8b cannot handle [blurlength,sizeend_y,sizestart_y,threshold] 
  Fixes made = 1218
tic01_e01_01.mdl written.
tic01_e01_01.wok written
1 Like

Thanks! CleanModels3 did a great job! The new version of this program 3.5.2d does not destroy the wok model! I removed the annoying beams above the bed and added to my hack. Everything works.

1 Like

Hello, maybe it can be useful.

1 Like