NeverWinter Nights Toolset

Contents

NWN/SOU 1.68 Toolset under Linux

NOTICE: This document was written under the following premises:

  • Kubuntu 6.10
    That's what I'm running, so that's what I'm documenting.
  • English
    That's what I speak, so that's what I'm documenting. :-) I'm reasonably certain most other languages can be done w/ minimal difficulty.
  • High network bandwidth.
    I expect you've downloaded the Linux game resources, the clients, various patches, and the NWN Windows Critical Rebuild patch.
  • Lots of disk space to burn.
    I install the toolset in a different directory then your game. There are difficulties installing the NWN Critical Rebuild patch to a Linux installation, so to keep it safe, I suggest installation in a separate directory. There are steps at the end to minimize disk space utilization, via symbolic links.
  • I am documenting what I have, which is NWN+SOU+HOU.
    You should be able to change that to what you have, if you change the patches appropriately later on. Please contact me if you've significant difficulty.
  • I presume you've the game working already.
  • If you are building Wine from source, you will also need a working development environment.
    ie; Compiler, development headers, etc..
    Wine source compilation, will also require FontForge, and FontForge indirectly requires a copy of the FreeType source code, you end up compiling all three source packages.
  • After much time, native WineHQ Wine supports the toolset out of the box.
    It finally requires no special patches (Yippie!) but we still need a few native Windows DLLs (Boo!).

Requirements

  1. Wine
  2. If you are building via Source, you will need the two dependencies of Wine. (FreeType2, and FontForge)
  3. Linux NWN 1.29 Resources: http://nwn.bioware.com/downloads/linuxclient.html#lininstall
  4. Linux Clients: http://nwn.bioware.com/downloads/linuxclient.html
  5. Linux Patches:
  6. i6comp: http://home.woh.rr.com/nwmovies/i6comp.zip
  7. NWN Windows 1.68 Critical Rebuild Patch:
  8. A Windows 98 DLL:
    1. Note: Yes, the commctrl.dll on dll-files does say its Swedish.
  9. IE 6 SP1:
  10. cabextract
    • It should be part of your distribution, use synaptic/apt-get to install "cabextract"
    • If cabextract is not part of your distribution, the source is available here: http://www.cabextract.org.uk/ Build it, and place the resulting executable inside your path.

Building & Configuring WineHQ

  • You should not need to be "root" for any of these instructions.
  • If you are using a pre-built version of Wine it 'MUST' be at least version 0.9.47 or later.
  • We will be using the following directories:
$HOME/.nwwine ← Wine configuration directory.
~nwn/nwedit ← Directory under the NWN game directory. It will be used to hold the Windows toolset executables, as well as Wine if you build Wine from source.

If you are building Wine from source, we build Wine off in its own self contained area, so as not to conflict with any distribution installed versions of Wine

  • This document is designed to literally be:
Download, and then (primarily) cut and paste the commands. If its not cut/paste, please send me an email, and I'll try to fix the document. The only known places where it isn't cut and paste is when setting the NWN, CDROM environment variables, as well as writing the little startup shell scripts at the very end. You will have to set them manually, and edit the scripts, as is appropriate for your system.
  • If you are building Wine from source, you will be building 3 different source packages, and sometimes the freetype/fontforge stuff is problematic. Please attempt to pay attention to the configure output for anything that indicates an error. The configure output will also be one of the first things I ask for if you ask my help with any build issues.

Environment Setup

Note all these environment commands presume bash. If your a csh user, you'll need to convert them to setenv commands appropriately, and probably not cut/paste the commands.
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
This environment variable is not entirely cut and paste, as it points to the NWN installation directory. Mine is inside of my $HOME directory, yours may vary. Please change it as appropriate.
NWN=<path to NWN installation>; export NWN
mkdir $NWN/nwedit
mkdir $NWN/nwedit/downloads
If you are following the instructions to build Wine from source, you will also need to set the following two variables, and create a directory to hold Wine.
PATH=$NWN/nwedit/wine/bin:$PATH; export PATH
LD_LIBRARY_PATH=$NWN/nwedit/wine/lib; export LD_LIBRARY_PATH
mkdir $NWN/nwedit/wine
And finally set a CDROM variable to specify where your CD-ROM drives are mounted at. Normally mine mounts under /media/cdrom0, yours may be different.
CDROM=/media/cdrom0; export CDROM

Downloads

  • Download all the required stuff into the $NWN/nwedit/downloads directory.
    This includes, resources, patches, i6comp, the critical rebuild patch, and the two Windows 98 DLL's, ie6setup.exe. If you are building Wine from source, you will also need WineHQ, fontforge, and freetype.
  • Once everything is downloaded, a 'ls' of the downloads directory should look like so:
  1. A total of 15, (or 18) files (if you downloaded everything, and were planning on installing all expansions.)
  2. You may forgo any files specific to any expansions you are not intending to install.
  3. If you are not building Wine from source, the freetype-2.3.5.tar.bz2, freetype-2.3.5.tar.bz2, and wine-0.9.56.tar.bz2 files can be ignored.
uholld1@crusader:~/nwn/nwedit/downloads$ ls -l
total 2002304
-rw------- 1 uholld1 users      94444 2007-11-16 17:15 commctrl.zip
-rw-r--r-- 1 uholld1 users  130569338 2007-11-16 17:20 English_linuxclient168_orig.tar.gz
-rw-r--r-- 1 uholld1 users  134673662 2007-11-16 17:21 English_linuxclient168_xp1.tar.gz
-rw-r--r-- 1 uholld1 users  120144829 2007-11-16 17:24 English_linuxclient168_xp2.tar.gz
-rw-r--r-- 1 uholld1 users    4264337 2007-11-16 17:14 fontforge_full-20071002.tar.bz2
-rw-r--r-- 1 uholld1 users    1279861 2007-11-16 17:14 freetype-2.3.5.tar.bz2
-rw-r--r-- 1 uholld1 users      55399 2007-11-16 17:25 i6comp.zip
-rw-r--r-- 1 uholld1 users     491768 2007-11-16 17:15 ie6setup.exe
-rw-r--r-- 1 uholld1 users   71917130 2007-11-16 17:20 linuxclientupdate129to162eng.tar.gz
-rw-r--r-- 1 uholld1 users   11288000 2007-11-16 17:24 linuxhotuclientupdate161to162eng.tar.gz
-rw-r--r-- 1 uholld1 users   69658433 2007-11-16 17:20 linuxsouclientupdate130to162eng.tar.gz
-rw------- 1 uholld1 users    5504342 2007-11-16 17:19 nwclient129.tar.gz
-rw------- 1 uholld1 users   39611339 2007-11-16 17:22 nwclienthotu.tar.gz
-rw-r--r-- 1 uholld1 users   73726379 2007-11-16 17:25 NWNEnglish1.68HotUUpdate.exe
-rw-r--r-- 1 uholld1 users   79786278 2007-11-16 17:25 NWNEnglish1.68OrigUpdate.exe
-rw-r--r-- 1 uholld1 users   76022042 2007-11-16 17:25 NWNEnglish1.68SoUUpdate.exe
-rw------- 1 uholld1 users 1212356127 2007-11-16 17:17 nwresources129.tar.gz
-rw-r--r-- 1 uholld1 users   13184259 2008-02-22 11:05 wine-0.9.56.tar.bz2
uholld1@crusader:~/nwn/nwedit/downloads$ ls | wc
     18      18     477

Decide where to go next

  • If you are building Wine source, continue on with the 'Build Freetype' step.
  • If you are using a pre-built/distribution install of Wine, go to the step labeled 'Configure WineHQ Windows Environment'

Build Freetype 2.3.5

cd $NWN/nwedit/downloads
bzip2 -d -c freetype-2.3.5.tar.bz2 | tar xvof -
cd freetype-2.3.5
./configure --prefix $NWN/nwedit/wine
make
make install
cd ..

Build fontforge 20071002

bzip2 -d -c fontforge_full-20071002.tar.bz2 | tar xvof -
cd fontforge-20071002
./configure --prefix=$NWN/nwedit/wine --with-freetype-src=../freetype-2.3.5
make 
make install
cd ..

The python error during make install is ignorable.

Build WineHQ 0.9.56

  • Please attempt to read the configure output.
  • Particularly, you should not see any errors about fontforge missing, if your PATH, and LD_LIBRARY_PATH are correct from previous steps.
  • Also attempt to examine the OpenGL detection, looking for the entries referring to GL/gl.h GL/glx.h GL/glext.h GL/glu.h, and -lGL
bzip2 -d -c wine-0.9.56.tar.bz2 | tar xvof -
cd wine-0.9.56
./configure --prefix=$NWN/nwedit/wine --enable-opengl
make depend && make
make install
cd ..

Configure WineHQ Windows Environment

  • Set the appropriate environment variables, and finish configuring Wine.
Your WINEPREFIX, and optionally, PATH, and LD_LIBRARY_PATH variables should be still set as they were previously while building source.
Please be certain your PATH variable is set appropriately to find the correct version of Wine. Use the 'which wine' command and see which version it finds. If you are building Wine from source, it should be in $NWN/nwedit/wine/bin/wine. If you are using a distribution installed version of Wine, it is most likely /usr/bin/wine, however, it could be elsewhere.

Create the Wine Prefix Directory

mkdir $WINEPREFIX
wineprefixcreate

Create the false NWN NWToolset Installation Drive

Add a N: drive to point to the NWN/NWEdit installation.
ln -s $NWN/nwedit $HOME/.nwwine/dosdevices/n:

Note: Note that it references nwedit as under $NWN.

Update the Registry with all necessary keys

  • Save the below lines in a temporary file (bioware.reg)
[HKEY_LOCAL_MACHINE\Software]
[HKEY_LOCAL_MACHINE\Software\BioWare]
[HKEY_LOCAL_MACHINE\Software\BioWare\NWN]
[HKEY_LOCAL_MACHINE\Software\BioWare\NWN\Neverwinter]
"Location"="N:\\"
[HKEY_LOCAL_MACHINE\Software\Microsoft]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\nwmain.exe]
@="N:\\nwmain.exe"
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
"comctl32"="native, builtin"
"commctrl"="native, builtin"
"mlang"="native, builtin"
[HKEY_CURRENT_USER\Software\\Wine]
"Version"="win98"
  • Load bioware.reg into the registry.
regedit bioware.reg

Unpack IE6 SP1

Download IE6 via the download only method.
wine ie6setup.exe /c:"ie6wzd.exe /d /s:""N:\ie6setup.exe"""
  • Accept the License agreement.
  • On the download options screen,
  1. Accept the default for "Folder to download installation files:" ( C:\Windows Update Setup Files )
  2. In the "Type of system to install on:" Windows 98 should be the only entry check marked.
  • Click Next. You will have approximately 20Mb to download. Occasionally the download fails and you receive a error stating you have a damaged installation, and you need to clear your cache. Simply try running ie6setup.exe again. I seldom have to do it more than twice.
  • Click 'Ok' when ie6setup has told you it has completed the download of "Windows Update"
Extract the appropriate DLL's from IE6 SP1

Note: The WARNING; possible 6752 extra bytes at end of file is normal, and can be ignored.

cd $NWN/nwedit
cabextract $HOME/.nwwine/drive_c/"Windows Update Setup Files"/IE_S*.CAB --directory $HOME/.nwwine/drive_c/"Windows Update Setup Files"/
cabextract $HOME/.nwwine/drive_c/"Windows Update Setup Files"/SETUPW95.CAB --directory $HOME/.nwwine/drive_c/"Windows Update Setup Files"/
cabextract $HOME/.nwwine/drive_c/"Windows Update Setup Files"/IE_1.CAB --directory $HOME/.nwwine/drive_c/"Windows Update Setup Files"/
cp $HOME/.nwwine/drive_c/"Windows Update Setup Files"/MLANG.DLL ./mlang.dll
cp $HOME/.nwwine/drive_c/"Windows Update Setup Files"/comctl32.dll ./comctl32.dll

Extract, and install the necessary native commctrl.dll

cd $NWN/nwedit
unzip -L downloads/commctrl.zip commctrl.dll

Install NWN

  • If you are not using NWN Gold, or Platinum, Unpack the NWN Resources in $NWN/nwedit. Please be certain to note the series of mv/mv/rmdir at the end of the gzip, as it is necessary to avoid a file/directory conflict later on.
cd $NWN/nwedit
gzip -d -c downloads/nwresources129.tar.gz | tar xvof -
mv nwn nwn.tmp
mv nwn.tmp/* .
rmdir nwn.tmp

Note: The 1.62 patches will be required due to the missing fixinstall script that has not been supplied since 1.62.

  • Choose the appropriate entry in the next section based upon which expansions you're intending to install.

Plain NWN with No Expansions


  • Install the base client, and update to the latest NWN patch.
rm override/*
gzip -d -c downloads/nwclient129.tar.gz | tar xvof -
gzip -d -c downloads/linuxclientupdate129to162eng.tar.gz | tar xvof -
gzip -d -c downloads/English_linuxclient168_orig.tar.gz | tar xvof -
./fixinstall

For NWN+SOU


  • Install the base client
rm override/*
gzip -d -c downloads/nwclient129.tar.gz | tar xvof -
  • Insert the SOU CD, and unpack the SOU zip files.
unzip -o $CDROM/Data_Shared.zip
unzip -o $CDROM/Language_data.zip
unzip -o $CDROM/Language_update.zip
unzip -o $CDROM/Data_Linux.zip
rm -f patch.key data/patch.bif
rm -f override/*
  • Apply the SOU 1.62 patch.
gzip -d -c downloads/linuxsouclientupdate130to162eng.tar.gz | tar xvof -
./fixinstall
  • Apply the SOU 1.68 patch.
rm override/*
gzip -d -c downloads/English_linuxclient168_xp1.tar.gz | tar xvof -
./fixinstall

For NWN+GOLD.


  • To be written yet.

For NWN+HOU


  • Install the base 1.29 Linux client binaries.
rm override/*
gzip -d -c downloads/nwclient129.tar.gz | tar xvof -
  • Unpack the HOU zip files.
unzip -o $CDROM/Data_Shared.zip
unzip -o $CDROM/Language_data.zip
unzip -o $CDROM/Language_update.zip
  • Remove any old patch information.
rm -f patch.key data/patch.bif
rm -f override/*
  • Install the HOU 1.61 client.
gzip -d -c downloads/nwclienthotu.tar.gz | tar xvof -
./fixinstall
  • Update the HOU 1.61 client to 1.62.
gzip -d -c downloads/linuxhotuclientupdate161to162eng.tar.gz | tar xvof -
./fixinstall
  • And finally update from HOU 1.62 to 1.68
rm override/*
gzip -d -c downloads/English_linuxclient168_xp2.tar.gz | tar xvof -
./fixinstall

For NWN+SOU+HOU


  • Install the base 1.29 Linux client binaries.
rm override/*
gzip -d -c downloads/nwclient129.tar.gz | tar xvof -
  • Insert the SOU CD, and unpack the SOU Zip files.
unzip -o $CDROM/Data_Shared.zip
unzip -o $CDROM/Language_data.zip
unzip -o $CDROM/Language_update.zip
unzip -o $CDROM/Data_Linux.zip
  • Insert the HOU CD, and unpack the HOU Zip files.
unzip -o $CDROM/Data_Shared.zip
unzip -o $CDROM/Language_data.zip
unzip -o $CDROM/Language_update.zip
  • Install the SOU 1.62 patch.
The Bioware supplied documentation do not currently specify these directions, however, discussions with other Linux users, leads me to believe its necessary.
If the SOU 1.62 patch is not applied, then how do you obtain the latest XP1*.nwm modules?
gzip -d -c downloads/linuxsouclientupdate130to162eng.tar.gz | tar xvof -
./fixinstall
  • Apply the SOU 1.68 patch.
rm -f override/*
gzip -d -c downloads/English_linuxclient168_xp1.tar.gz | tar xvof -
./fixinstall
  • Remove any old patch information.
rm -f patch.key data/patch.bif xp1patch.key data/xp1patch.bif
rm -f override/*
  • Install the HOU 1.61 client.
gzip -d -c downloads/nwclienthotu.tar.gz | tar xvof -
./fixinstall
  • Update the HOU 1.61 client to 1.62.
rm -f override/*
gzip -d -c downloads/linuxhotuclientupdate161to162eng.tar.gz | tar xvof -
./fixinstall
  • And finally update from HOU 1.62 to 1.68
rm -f override/*
gzip -d -c downloads/English_linuxclient168_xp2.tar.gz | tar xvof -
./fixinstall

For NWN Platinum (4CD)


  • Start with disk #2, and extract NWN base Data
unzip -o $CDROM/disk2.zip
  • And from Disk 3. Extract VoiceSets/Movies/Old Linux Binaries.
unzip -o $CDROM/disk3.zip
unzip -o $CDROM/language_data.zip
unzip -o $CDROM/Data_Linux.zip -x lib/libSDL-1.2.so.0 -x miles/libmss.so.6 miles/libmss.so
ln -s libSDL-1.2.so.0.0.5 lib/libSDL-1.2.so.0
ln -s libmss.so.6.5.2 miles/libmss.so.6
ln -s libmss.so.6.5.2 miles/libmss.so
  • And from Disk 4. Extract Music/SOU Data/SOU Movies/SOU VoiceSets
unzip -o $CDROM/disk4.zip
unzip -o $CDROM/xp1.zip
unzip -o $CDROM/xp1_data.zip
  • And finally from the Play disk, extract HOU Data/HOU Movies/dialog.tlk
unzip -o $CDROM/Language_data.zip
unzip -o $CDROM/Data_Shared.zip
unzip -o $CDROM/Language_update.zip
  • You'll need to patch Platinum up to 1.68, as curiously, the supplied linux binaries are 1.30.
  • Install the SOU 1.62 patch.
The Bioware supplied documentation do not currently specify these directions, however, discussions with other Linux users, leads me to believe its necessary.
If the SOU 1.62 patch is not applied, then how do you obtain the latest XP1*.nwm modules?
gzip -d -c downloads/linuxsouclientupdate130to162eng.tar.gz | tar xvof -
./fixinstall
  • Apply the SOU 1.68 patch.
rm override/*
gzip -d -c downloads/English_linuxclient168_xp1.tar.gz | tar xvof -
./fixinstall
  • Remove any old patch information.
rm -f patch.key data/patch.bif xp1patch.key data/xp1patch.bif
rm -f override/*
  • Install the HOU 1.61 client.
gzip -d -c downloads/nwclienthotu.tar.gz | tar xvof -
./fixinstall
  • Update the HOU 1.61 client to 1.62.
rm -f override/*
gzip -d -c downloads/linuxhotuclientupdate161to162eng.tar.gz | tar xvof -
./fixinstall
  • And finally update from HOU 1.62 to 1.68
rm override/*
gzip -d -c downloads/English_linuxclient168_xp2.tar.gz | tar xvof -
./fixinstall

For NWN Platinum (DVD)


  • To be written yet.

Testing your NWN Installation

  • Stop here, and play for a little bit. Everyone knows you really want to.  :-)
rm nwn.ini
rm nwnplayer.ini
cp ../nwncdkey.ini .
cp ../nwn.ini .
cp ../nwnplayer.ini .
./nwn
Besides, it's a good test to make certain everything unpacked correctly.

Installing the Windows NWN Toolset Binaries

  • Unpack i6comp into $NWN/nwedit
unzip downloads/i6comp.zip

Extracting the Windows 1.29 Toolset Binaries

  • Extract the Windows EXE/DLL's from your CDs. The EXE/DLL's must come from the latest expansion pack you have. NWN, or SOU, or HOU, in that order.
You must also choose the correct Critical rebuild patch based upon which expansions you have. See the table below to identify which CD, and Critical Rebuild patch to use.
NWN Only: ←Use the NWN Installation Disk #1 and then use the NWNEnglish1.68OrigUpdate.exe Critical Rebuild patch
NWN+SOU: ←Use the SOU Installation Disk, and then use the NWNEnglish1.68SoUUpdate.exe Critical Rebuild patch
NWN+HOU: ←Use the HOU Installation Disk, and then use the NWNEnglish1.68HotUUpdate.exe Critical Rebuild patch
NWN+SOU+HOU: ←Use the HOU Installation Disk, and then use the NWNEnglish1.68HotUUpdate.exe Critical Rebuild patch
NWN Platinum: ←Use the Play disk, and then use the NWNEnglish1.68HotUUpdate.exe Critical Rebuild patch

One symptom of a failure to do this correctly is a lack of sound in the toolset.

wine i6comp e $CDROM/data1.cab nwmain.exe
wine i6comp e $CDROM/data1.cab nwn.exe
wine i6comp e $CDROM/data1.cab nwconfig.exe
wine i6comp e $CDROM/data1.cab nwloader.exe
wine i6comp e $CDROM/data1.cab nwserver.exe
wine i6comp e $CDROM/data1.cab nwtoolset.exe
wine i6comp e $CDROM/data1.cab nwupdate.exe
wine i6comp e $CDROM/data1.cab Mss32.dll

The Windows Miles Sound Drivers

cd miles
wine ../i6comp e $CDROM/data1.cab Mss\*

Optional utilities

cd ..
mkdir utils
cd utils
wine ../i6comp x $CDROM/data1.cab nwhak.exe
wine ../i6comp x $CDROM/data1.cab nwhak.ini
cd ..
There are other utilities on the SOU/HOU CD's that can be extracted w/ i6comp if you care to look for them. The above is just the one that was on the first NWN CD, and I'm guessing is vaguely useful.

Updating the Windows NWN Toolset Binaries to 1.68 & Final Installation

Install the 1.68 NWN Critical Rebuild patch.

Please use the table above to be certain you use the correct Critical Rebuild patch for the expansion pack(s) you have installed.

(NWN) NWNEnglish1.68OrigUpdate.exe
wine downloads/NWNEnglish1.68OrigUpdate.exe
(SOU) NWNEnglish1.68SoUUpdate.exe
wine downloads/NWNEnglish1.68SoUUpdate.exe
(HOU) NWNEnglish1.68HotUUpdate.exe
wine downloads/NWNEnglish1.68HotUUpdate.exe
Say yes to the do you wish to update type question, obviously.
Also, say yes to the override -> override_bak question - If it asks

Executing the Toolset, NWN, and the Script Debugger

Execute the Toolset

  • Create a shell script to set all the appropriate Wine variables, and then to finally run the toolset. The below should be appropriate if you are using a pre-built version of wine. Save it as say nwtoolset.sh in the $NWN/nwedit directory.

    If you wish to store this script, or any of the others in another directory, such as $HOME/bin, please add a "cd <path to $NWN/nwedit>" command before the wine commands. You will need to do this on all of the suggested scripts below.
#!/bin/sh
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine nwtoolset.exe

If you built Wine from source, use the following shell script, edited appropriately.

#!/bin/sh
NWN=~nwn/		# Path to your NWN directory
export NWN
cd $NWN/nwedit
PATH=$NWN/nwedit/wine/bin:$PATH; export PATH
LD_LIBRARY_PATH=$NWN/nwedit/wine/lib; export LD_LIBRARY_PATH
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine nwtoolset.exe
  • Set permissions appropriately
chmod 755 ./nwtoolset.sh
  • Run the shell script.
./nwtoolset.sh

You may now check that the version number under 'Help->About' says v1.68

Known Issues with the Toolset

  • The fixme's, and depth warning at Toolset startup are fairly normal, and are ignorable.
  • If you receive errors upon loading pre-existing area's that state 'is not a floating point value', try changing your LANG, and LC_ALL variables to C and see if that helps
  • If you see blank, or empty 'ghost' entries, which cause Access Violations over in the left hand Module Contents panel, that is usually a sign of an error during the installation of the three native windows DLL's, or importing the bioware registry entries.
  • The 3D preview window occasionally goes flickers strange colors while a dialog is popped up over it or while using the arrow buttons to move around the view screen. This should correct itself as soon as the dialog is closed, or the button use is stopped.
  • Executing NWN from inside the toolset will execute the Windows version of NWN. This should be ok, albeit not with optimal performance.

Execution of NWN

  • You must use the Windows nwmain.exe to use the script debugger. While the native Linux client does seem to initially talk to DebugServer.exe, it doesn't actually allow you to step through the scripts.
  • You should be able to run nwmain.exe with a similar script as below: (Remember to chmod 755 the script to put the appropriate permissions on it, and to add a cd command if the script is not saved in $NWN/nwedit. ) Again, use the 2nd script if you built your own version of Wine, being certain to set the NWN variable at the beginning of the script.
#!/bin/sh
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine nwmain.exe
  • If you built your own version of Wine:
#!/bin/sh
NWN=~nwn/		# Path to your NWN directory
export NWN
cd $NWN/nwedit
PATH=$NWN/nwedit/wine/bin:$PATH; export PATH
LD_LIBRARY_PATH=$NWN/nwedit/wine/lib; export LD_LIBRARY_PATH
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine nwmain.exe
  • Presuming your intent is to run the Script Debugger, you will need to modify your nwn.ini script to enable windowed mode.
  • Windowed mode is enabled by simply changing the [Display Options] section in nwn.ini as follows:
[Display Options]
FullScreen=0
AllowWindowedMode=1
Width=800
Height=600
  • Note: Due to what appears to be a bug (either in the NVidia drivers, or Wine, I'm uncertain which) you may need to also change/add the following option to your nwn.ini file. (If nwmain.exe crashes with a unhandled page fault, you're running into this bug.) I don't know why, but this keeps nwmain.exe from crashing.
[Video Options]
AntiAliasing Mode=1

Execution of the Script Debugger

  • You will also need one to run the DebugServer.exe for the actual script debugger. Again, edit, and use the 2nd script if you built your own version of Wine from source. Also, don't forget to add a cd command if necessary.
#!/bin/sh
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine utils/DebugServer.exe
#!/bin/sh 
NWN=~nwn/		# Path to your NWN directory
export NWN
cd $NWN/nwedit
PATH=$NWN/nwedit/wine/bin:$PATH; export PATH
LD_LIBRARY_PATH=$NWN/nwedit/wine/lib; export LD_LIBRARY_PATH
WINEPREFIX=$HOME/.nwwine; export WINEPREFIX
wine nwmain.exe

Final Cleanup

  • You can either stop now, and use the toolset, or there's a few cleanup things you can do, should you wish to preserve diskspace.
  • Presuming you installed the toolset in a subdirectory below your NWN directory, as per these directions, you may:
rm -rf ambient; ln -s ../ambient .
rm -rf data; ln -s ../data .
rm -rf docs; ln -s ../docs .
rm -rf hak; ln -s ../hak .
rm -rf lib; ln -s ../lib .
rm -rf logs; ln -s ../logs .
rm -rf modules; ln -s ../modules .
rm -rf movies; ln -s ../movies .
rm -rf music; ln -s ../music .
rm -rf nwm; ln -s ../nwm .
rm -rf override; ln -s ../override .
rm -rf portraits; ln -s ../portraits .
rm -rf scripttemplates; ln -s ../scripttemplates .
rm -rf texturepacks; ln -s ../texturepacks .
rm -rf SDL-1.2.5 
rm -rf override_bak Override_Bak
rm -rf source
  • You may (or may not) wish to delete downloads directory. If you decide to, be aware that some of it is rather large, and would be painful to have to download again.

Questions, comments, etc -> Me. (Either via the below email, or via the Bioware NWN Linux Client forum)

Corrections, and additions to this text happily made. Flames just as happily ignored.

David (david.w.holland@gmail.com)
02/28/2008