Asset loader plugin for Neverwinter Nights (1&2)

If you feel like you want to make an addition to jMonkeyEngine SDK, don't hesitate to contact the jme team regardless of your knowledge in NetBeans platform development. For new plugins, the basic project creation and layout of the plugin can always be handled by a core developer and you can go on from there fleshing out the plugin.

I am spanking new to java, but have programmed in many languages since the early '80s. Currently I am curator of the Neverwinter Vault, a repository of over 40,000 projects related to the Aurora toolset and NwN game engine.

As a first step to updating the toolset and engine, I intend to create an asset loader/editor/exporter in jME that handles all the various NwN filetypes, including the models (mdl, mdb) anims ( gr2 - probably have to just replace those skeletons… silly proprietary formats :-P), textures (NwN DDS format is slightly non-standard), etc…

As I’m starting from scratch (though I have both Ruby & c++ libraries to port from), I’d really like to write these as a plugin from the start, with smooth integration into the SDK the goal.

Specifically, I’d like to allow anyone to browse, catalog & import NwN assets and export them to the SDK supported formats (j3o, Ogre3D, blend).

So, as referenced in that very encouraging bit I quoted at the top, could I get some help setting up the plugin project and figuring out jME cvs?

Edit: And of course, I’d welcome collaboration :slight_smile:

2 Likes

NWN1 and NWN2 are completely different engines. Very, very different, so there is no point of tacking them at same time.

Please take a look at
https://www.assembla.com/code/vmat/subversion/nodes/92/trunk/src/main/java/net/virtualmat/nwn
and
https://www.assembla.com/code/vmat/subversion/nodes/92/trunk/src/main/java/net/virtualmat/bif

This is quite complete support for NWN1 character/placeable models. There are some issues with particles (things like linked particles are not working right) and no support for danglymesh (it is rendered as static), but rest works. There is no support for walkmeshes or game definition files.

You can note in
https://www.assembla.com/code/vmat/subversion/nodes/92/trunk/src/main/java/net/virtualmat/nwn/NwnAssetLocator.java
that if you want to load binary model directly from bif file, you will need model decompiler (nwnmdlcomp.exe) in your natives dir.

Regarding NWN2 - I looked into that, but it is quite complex and without good documentation regarding animations. I decided to do Skyrim/Oblivion instead…

I’m not sure how runnable it is outside of vmat context - if you have problems with that, let me know, I’ll try to help.

1 Like

Goodies! New links :slight_smile:

Thank you!

NWN1 and NWN2 are completely different engines. Very, very different, so there is no point of tacking them at same time.
The engines are quite different, but the assets are not all that different. Further, the NwN2 formats are very much closer to the blend/ogre/j3o than the parts-based models of nwn.

Specifically, I believe it is going to be a lot easier loading NwN2 MDBs than some of the NwN1’s MDLs (specifically the player supermodels). In addition, of course, the NwN2 terrain/tile/placeables model is almost dead-on for jME3, though I’d like to do a couple tricks with the tiles… but I want to load them first :slight_smile:

The exception, of course are the NwN2 Granny2 skeletons. Which have aggravated me for years. I have 3DS Max 2013 and I can’t do a blasted thing with NwN2 animations :frowning: Expotron only worked with Max 6-8. sigh Anyway, looks like you already know all that :slight_smile:

So just color me an optimist with a tiny bit of inside knowledge =)
First step is to get assets loaded into a modern, open source toolset. I’ll build something to use them in later.

that if you want to load binary model directly from bif file, you will need model decompiler (nwnmdlcomp.exe) in your natives dir.
This is one of the things I want to address, making extensive use of all of Torlack's great work on the file formats.

My initial goal is to create NwExplorer Reborn functionality with a more complete library of loaders.

I also do not intend to tackle danglymesh any time soon :stuck_out_tongue: I may later, when I feel more competent with java, though.

I’d gladly and gratefully accept any help offered :slight_smile:

For now, I just would like to set up a plugin project properly so something I do wrong at the beginning doesn’t send me to the chemist down the road for a jumbobottle of aspirin :stuck_out_tongue:

Please note that all the code above is completely free for use (let’s call it public domain or any other permissive license you want), so you are free to take it away and do whatever you want with it. Of course, patches/changes are welcome, as long as you won’t attach anything GPL-like to it - in such case, you will need to just copy/paste from me.

Regarding the explorer, these are my attempts from 11 years ago
http://nwn-j3d.sourceforge.net/loader.screenshots.php

It was quite useful for previewing animations and model composition, but not much else (no bif/hak support back then). These days I treat NWN only as a resource for ready-to-use models - I would be quite scared to actually play the game again :wink:

Edit:
Here is a bit of code for writing hak files
http://nwn-j3d.cvs.sourceforge.net/viewvc/nwn-j3d/nwn/src/net/sf/nwn/hak/HakpakRep.java?revision=1.14&content-type=text%2Fplain
if you are into that.

2 Likes

Thank you!

And now I remember you :slight_smile:

Coolness, I’m off to read more of the NDM-filetype docs and start scanning through what you’ve done with (if I can wrap my head around it) compares to Elven’s & Skywing’s code.

This thread makes me very nostalgic. I still miss the old Bioware forums ‘back in the day’. Seeing Torlack’s name makes me especially wistful. Almost makes me want to finally port/fix my modpacker tools for NWN2 use just to get my head back in it again.

Good times.

No need to miss anything :slight_smile:

Both NwN2 & NwN1 still have active, creative communities.

In fact, this month’s Custom Content Challenge ties into the 50th anniversary of Dr Who, so there’s an always expanding, never quite predictable, collection of community contributions.

Almost makes a person want to revisit old friends and see what’s been happening, eh?

@abies: Thank you again :slight_smile: Although I intend to transition to jME Assetpacks as part of the overhaul, in the meantime, asset management will definitely need to rebuild haks and mods. And tlks. :stuck_out_tongue: Possibly bifs.

I check into social.bioware from time to time just to see what’s up. When I started writing my own game, I just don’t have much time for drilling back into custom content for some other game. I still get e-mails every now and then about the tools I wrote, though.

1 Like

digs a little bit
Ah! You did Z-Dialog, too!
That also features in our plans for the overhaul…

Hope you don’t mind :slight_smile:

The two parts I’m least comfortable with are the JIT script engine and the conversation editor. I have plans for both, but neither of which I actually need to worry about until I get the asset manager, er, loader built :slight_smile:

@foxhavendesigns said: *digs a little bit* Ah! You did Z-Dialog, too! That also features in our plans for the overhaul...

Hope you don’t mind :slight_smile:

The two parts I’m least comfortable with are the JIT script engine and the conversation editor. I have plans for both, but neither of which I actually need to worry about until I get the asset manager, er, loader built :slight_smile:

Z-Dialog had some multiplayer bugs that I never got around to fixing but someone put out a ZZ-Dialog or something that fixed them.

Here were my humble NWN1 contributions:
http://nwntools.sourceforge.net/

1 Like

So, finally getting the time to return to this, I’ve used the new Plugin Wizard (thank you!) to set up the nwn-asset-loader module suite and the first module nwn-asset-loader-mdl (which will handle the MDL model format).
In the SDk it looks like:

As in the OP, I’m looking for advice in the how I set up the project with the plan of this being a contributed plugin when I have something solid.
Are there any glaring (or subtle!) mistakes in the set up so far? I’d really like to get the set up clean before I start making the spaghetti :stuck_out_tongue:

Now to figure out Github and linking this thing to that… :slight_smile:

So, as referenced in that very encouraging bit I quoted at the top, could I get some help setting up the plugin project and figuring out jME cvs?
Not trying to be a pest, but figured I'd ask again and maybe drop a couple names that seem pertinent: @jayfella with his fantastic plugin wizard and @nehon who is mentoring a SoC plugin and so might feel a bit frisky with the advice ;-)

I know (or knew, a long time ago) how to code, but I’m kinda wandering around in a daze with how to set this baby up as a SDK plugin :-/

For the record, I have read the jME plugin development article, the jME custom file loader article and the netbeans File type integration Tutorial. Even understand (most) of the concepts and thingies… But I can’t seem to translate that into how I should set up my project that will eventually contain a whole suite of asset loaders.

I am intimately knowledgeable about the structure of (most) of the file types I want to import/export and at least basically understand the j3o format. But I’m really having trouble with set up of the project itself.

So… Third time’s the charm?

Edit: Oh. A link might help… you can look at my big empty lot where I’m hoping to build Mr. Blanding’s house :wink: The Repo on Github