General Information

This source code contains the full source for the following programs:

NWN Explorer
NWN Treasure Editor
NWN Model Compiler
NWN Script Compiler

Download

NWN Tools Source Code (ZIP file format - All sources)

NWN Tools Source Code (TAR file format - Without Explorer and Treasure Editor)

Copyright and License Information

Copyright (c) 2002, 2003 - Edward T. Smith

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.

2. Neither the name of Edward T. Smith nor the names of its contributors
   may be used to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

As you can see, this is a standard BSD style license without the advertise clause.

This Software and Bioware's Intellectual Property Rights

If you are looking for information about how Bioware renders their graphics or information about deep NWN internals, you are looking in the wrong place.

Bioware (or their lawyers) might not agree, but IMHO, none of the software contained here exposes any intellectual property Bioware might hold.  Game companies might not mind much about how they store basic model information, but when it comes to their rendering engine, they can be very protective.  Contracts can be won or lost based on the performance or looks of a rendering engine.  So exposing or even discovering intellectual property information is something that I avoid at all costs.

Non-Windows Ports

With the assistance of people lick Erydan and Sumpfork, we now have available the tools to build the NWScript compiler for non-windows operating systems such as Linux, MacOS, and FreeBSD.  This work is still in progress but we have made a significant step forward.  If you run into any problems building the compiler on other platforms, please send any code corrections to torlack@torlack.com.  However, please remember that I don't do non-Windows operating systems.  If you can't get the compiler to compile, I can't provide any support.

Older versions of GCC seem to have problems with inline functions.  To just avoid this problem all together, "AM_CXXFLAGS = -fno-default-inline" has been added to the makefiles.  This will hurt performance to a degree.

Credits

Initial Linux port of the compiler by Francois Guimond a.k.a. Erydan.
Assistance with automake/autoconf and MacOS/X port by Sumpfork

About the Source

The source is a VC7 (VS.NET) solution file.  However, all source code for the model compiler should be usable on a more standard compiler platform.  There are no "stdafx.h" or "windows.h" includes excluding the main executable.  Even there, those includes are "#ifdef" protected and only used for registry access.  However, that doesn't mean the software will build on a GCC system without modification.

NWN Explorer and NWN Treasure Editor both use ATL and WTL.  NWN Explorer also uses FMOD from http://www.fmod.org/.  NWN Script compiler uses the MSTA compiler compiler from the COCOM tool set.  The package can be downloaded from http://cocom.sourceforge.net/.

May C++ purists will have an aneurysm when they see some of the code.  To those I say, "deal with it."  (OMG, HE USED A GOTO!!!!!)

Revisions

March 12th, 2003:

April 23rd, 2003:

July 1st, 2003: