It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
I've created an updated patch for the native Linux version of Neverwinter Nights. The game is very much playable on modern distros but getting it to run properly requires some work. This package is a compilation of various fixes I found around the net to give an easy out of the box experience on modern distros.

What it includes:

- Out of the box Alsa sound support.
- Out of the box videos support (these didn't play in the original Linux release).
- English Patch v1.69 (I may be able to do other languages in the future).
- Original game icon and high res versions (PNG format).
- Minor improvements in the launch script.

Installation (I have tested this only with the GOG version of the game):

- Extract the game files by installing the it using Wine or InnoUnp.

- Download the patch from my google drive: <span class="bold">English_linuxclient169_xp2_Updated_w2015_Fixes_rev5.tar.xz</span>

- Extract all the contents in your NwN game folder (overwrite / merge everything when prompted).

- Open a terminal in the game's folder and run the 3 commands in the order below (ignore any comments or error outputs by these scripts):

./fixinstall
./nwmovies_install.pl
./nwn

You're done! To launch the game run './nwn'

Known issues:

- The in-game Antialiasing setting doesn't make any effect whatever you set it to, the easiest way to fix this is to override it from your graphics card panel (tested and works on Nvidia proprietary drivers).

The game comes only in 32bit and depending on your distro some 32bit libraries may be required, some of these are:

- 32bit libSDL_1.2 (essential for the game to run).
- 32bit libopenal (required for the movies to work).

Distros tested on:

Linux Mint 17.1 64bit (MATE and Xfce editions)
Debian Testing (thanks shmerl)
Debian 8 64bit
Arch Linux x86-64 (thanks BillyMaysFan59)


Any suggestions or feedback is welcome.

-------------------------------------------

UPDATE 11-07-2015:

- Uploaded a much smaller patch, down to 7mb from 300mb (Many of the files are already included with the GOG installation and they carry the same MD5).
Post edited July 31, 2015 by Ganni1987
avatar
Ganni1987: Any suggestions or feedback is welcome.
Thanks for putting it together! It ran nicely for me (current Debian testing). I only had to install libsdl1.2debian:i386 package since the game is using 32 bit SDL 1.2.
Post edited May 28, 2015 by shmerl
Works flawlessly on a Debian Sid amd64, great work!

Well, flawlessly… There’s still one condition: the 32-bit version of the 'libtxc-dxtn-s2tc0' package must *not* be installed or the game will segfault at launch (before anything is shown).
The segfault is silent (nothing appears in the console), so you might think at first that the game is just loading something forever. I finally found out what was going on thanks to 'gdb'.

Do you know of some option I could add to the 'nwn' script to have the game "ignore" the existence of this library without the need to uninstall it? (it might be needed by some other games)

Just so we’re clear about it: the segfault is *not* due to your repacking, it happens even with the "standard" installation method described on the Bioware website.

-----

By the way, could you list the fixes you included in your archive?
I guess you started with an installation similar to the one described on the Bioware website, plus the addition of NWMovies, but I’d like to know what you added to the mix. I’ve seen the addition of a 'lib32' directory (not needed on Debian if you installed the 32-bit version of the 'libx11-6' package) and an edit of the 'nwn' script to avoid the loading of the shipped outdated SDL lib, but I wouldn’t be surprised if you applied some other fixes.

-----

Thanks for your work, I know for sure the installation of the native Linux version of NWN is anything but trivial ;)
Hey, I even remember the time before the inclusion of multiarch support on Debian, when I needed to run the game through a 32-bit chroot…
avatar
vv221: ...........
Hello,

Most of the changes I made to the package were the changes in the "nwn" script as you can see below, the inclusion of the Linux Bink Player and the NWMovies files themselves.

The original nwn script:

#!/bin/sh

# This script runs Neverwinter Nights from the current directory

export SDL_MOUSE_RELATIVE=0
export SDL_VIDEO_X11_DGAMOUSE=0

# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH

./nwmain $@
The new one:

#!/bin/sh

# This script runs Neverwinter Nights from the current directory

cd "`dirname "$0"`"

#export SDL_AUDIODRIVER=alsa
export SDL_MOUSE_RELATIVE=0
export SDL_VIDEO_X11_DGAMOUSE=0

# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH (Old Don't Use)
export LD_LIBRARY_PATH=./lib32:./miles:$LD_LIBRARY_PATH
export LD_PRELOAD=./nwmovies.so
export NWMOVIES_GRAB_HACK=1

./nwmain $@
Regarding the libX11 Library:

I have included the libx11 library because the NWMovies script exclusively searches for "libX11.so", in Linux Mint the 32bit libX11 library is present however it is only labeled as "libX11.so.6" and "libX11.so.6.3.0", as such one would have to go hoop jumping and create a symbolic link with the correct name. This would be a hassle for less experienced users.

The 'libtxc-dxtn-s2tc0' is the S3TC library used by many games, there's probably some command to ignore a specific library from loading, will have to check.


EDIT:

I uploaded a smaller patch.
Post edited July 11, 2015 by Ganni1987
avatar
Ganni1987: I have included the libx11 library because the NWMovies script exclusively searches for "libX11.so", in Linux Mint the 32bit libX11 library is present however it is only labeled as "libX11.so.6" and "libX11.so.6.3.0", as such one would have to go hoop jumping and create a symbolic link with the correct name. This would be a hassle for less experienced users.
I just noticed it, that’s something I’ll have to keep in mind when adding nwmovies support to my .exe -> .deb conversion script.
avatar
Ganni1987: The 'libtxc-dxtn-s2tc0' is the S3TC library used by many games, there's probably some command to ignore a specific library from loading, will have to check.
Please keep me informed if you find anything about this, as for now I just made the .deb package my script build incompatible with the 32-bit version of the 'libtxc-dxtn-s2tc0' package (meaning both can’t be installed at the same time), but I really don’t like this workaround.
If I find anything on my side I’ll share it here too of course.

By the way, said script can be found here:
https://www.gog.com/forum/neverwinter_nights_series/frlinux_installez_neverwinter_nights_diamond_sur_debian_et_distributions_derivees
(French only yet, but an English version is coming soon™)

Your archives are great inspirations when I’m building my .deb-building scripts, so thank you for this ;)
I can't remember where I originally got this but here's patched nwmovies that uses mpv to play the videos.
Useful for anyone that doesn't like BinkPlayer.

wget https://sites.google.com/site/gogdownloader/nwmovies-mpv.tar.gz
tar -xvzf nwmovies-mpv.tar.gz
./nwmovies_install.pl build

You can edit "nwplaymovie" script to use whatever video player you prefer. Anything that uses libavcodec should be able to play bink videos.
Did a quick test run and after installing the proper dependencies I can confirm this works on Arch Linux (x86-64).

Thanks for the fix =)
avatar
Sude: [nwmovies]
I plan to add support for a one-command installation of your nwmovies build in my installation script for NWN:
https://www.gog.com/forum/neverwinter_nights_series/linux_install_neverwinter_nights_on_debianubuntumintsteamos/post12

Do you have a web page presenting it I should link to? Or is it okay to directly link users of my script to the direct download link you posted?

Any way, the script I wrote won’t download it automatically, it’s still up to the user to download it and put it in a directory where my install script will find it.
No Internet access is a rule I imposed on myself when first drafting my scripts.
Post edited July 31, 2015 by vv221
avatar
Ganni1987: snip
Anyways you might want to add Arch Linux (x86-64) to your list of tested distros ;)
Post edited July 31, 2015 by BillyMaysFan59
avatar
Sude: [nwmovies]
avatar
vv221: I plan to add support for a one-command installation of your nwmovies build in my installation script for NWN:
https://www.gog.com/forum/neverwinter_nights_series/linux_install_neverwinter_nights_on_debianubuntumintsteamos/post12

Do you have a web page presenting it I should link to? Or is it okay to directly link users of my script to the direct download link you posted?

Any way, the script I wrote won’t download it automatically, it’s still up to the user to download it and put it in a directory where my install script will find it.
No Internet access is a rule I imposed on myself when first drafting my scripts.
I don't have a web page presenting it at the moment, I might create a simple google sites page for it later if I remember to do it.
Direct linking is fine.

edit:
I created a simple web page for it here: https://sites.google.com/site/nwmoviesmpv/
Direct linking is still ok (https://sites.google.com/site/nwmoviesmpv/nwmovies-mpv.tar.gz)
Post edited August 12, 2015 by Sude
avatar
Sude:
Next iteration of the script will link to the page instead of directly to the file.
I like to think that users of my scripts know what they are downloading ;)
I'm hoping someone here can point me in the right direction.

I had Neverwinter Nights running fine on my Linux Mint 16 32bit install. I had some problems and had to reinstall, so I copied that directory to a USB thumb drive. I then reinstalled Mint 16, copied the directory back and the game ran without a hitch.

Then I made the mistake of upgrading to Mint 17.2 64bit. After the OS install, I tried to copy the directory to my new home but this time when I launch the game I get a silent crash with no error messaging.

From this post and others it seems that the problem may be missing libSDL_1.2. When I get home I'll see about getting this installed. Will it be available in the existing repositories or is there another method of installing? Are there other missing dependencies I should plan on installing?

Thanks for any help and for some great info posted here.
avatar
mveloz: I'm hoping someone here can point me in the right direction.

I had Neverwinter Nights running fine on my Linux Mint 16 32bit install. I had some problems and had to reinstall, so I copied that directory to a USB thumb drive. I then reinstalled Mint 16, copied the directory back and the game ran without a hitch.

Then I made the mistake of upgrading to Mint 17.2 64bit. After the OS install, I tried to copy the directory to my new home but this time when I launch the game I get a silent crash with no error messaging.

From this post and others it seems that the problem may be missing libSDL_1.2. When I get home I'll see about getting this installed. Will it be available in the existing repositories or is there another method of installing? Are there other missing dependencies I should plan on installing?

Thanks for any help and for some great info posted here.
Hello, late reply sorry wasn't home much.

Are you running the game with my version of the patch or your old one? Note: my patch already comes with an up to date libSDL_1.2 library so you don't have to install it. However if you want to install it manually, you can find it in the repository.

If all else fails type "ldd ./nwmain" in terminal and it will list your missing dependancies.
Hey Ganni: thanks so much for posting this! It worked great for me to get the game working in Linux Mint 17.2 (MATE). However, I have a few issues to report in case you are familiar with any of them (UPDATED 10/11/2015):

1. I cannot start the file via .nwn (it just hangs indefinitely), but I can start the game fine via nwmain in WINE.

2. I have all dependencies installed, but none of the *.bmu music files play in the game, only the music in the movies, sound effects (including background talking in taverns and the like), and voices.

3. I do not get any sound at all until I mute/unmute the entire system with a hotkey...

A. ...after first opening any of the *.nwm modules.
B. ...when starting the game or switching to and from the game when my main desktop resolution does not match the fullscreen resolution of the game. I have no idea why having a non-matching resolution would cause the sound not to function or be muted like that and haven't been able to find anything else on this.

OS: Linux Mint 17.2 (MATE)

The output of the instructions executed in Terminal:
keeper@SSRSNZXT ~ $ cd .wine/drive_c/Neverwinter
keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./fixinstall
[sudo] password for keeper:
Checking for required files

PASSED: ambient directory exists
PASSED: data directory exists
PASSED: music directory exists
PASSED: override directory exists
PASSED: miles directory exists
PASSED: nwm directory exists
PASSED: chitin.key exists
PASSED: dialog.tlk exists
PASSED: nwmain exists

Fixing case

ambient
.............................................................................................................. ...................
data
...........................................
dmvault
..
hak
..............................................................
localvault
...............................................
music
........................................................................................................
override
...........
portraits
.............................................................................................................. .............................................................................................................. .............................................................................................................. .....................
saves/000002 - Editing Sleshk
saves/000003 - Sleshk Start
saves/000005 - Sleshk Academy Attack
saves/000006 - Sleshk Prologue End
saves/000000 - quicksave
saves/000004 - Sleshk Academy Training
saves/000001 - Auto Save

Checking for problem files

Checking for permissions

PASSED: nwn.ini is writable
PASSED: nwnplayer.ini is writable
PASSED: nwncdkey.ini is writable
PASSED: saves is writable
PASSED: localvault is writable
PASSED: tempclient is writable
PASSED: dmvault is writable
PASSED: /home/keeper/.wine/drive_c/Neverwinter is writable

You are ready to run Neverwinter Nights.

keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./nwmovies_install.pl
NOTICE: Examining sound configuration for some clues...
NOTICE: Take this output with a grain of salt..

NOTICE: It appears none of your PCM playback devices supports
NOTICE: more than one simultaneous channel.
NOTICE: You may need to look into software mixing, via dmix, or ESD/ARTSD.
keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./nwn
NOTICE: NWMovies(./nwmain): Version: 20090223.080954
NOTICE: Looking up symbols in libSDL.....
NOTICE: NWMovies: Using libSDL via RTLD_NEXT.
NOTICE: SDL Library determined to be: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0
NOTICE: NWMovies: SDL_WM_GrabInput() address: f74f7710
NOTICE: NWMovies: SDL_GetVideoSurface() address: f74f5c10
NOTICE: NWMovies: SDL_WM_ToggleFullScreen() address: f74f8ab0
NOTICE: NWMovies: SDL_PollEvent() address: f74d6430
NOTICE: NWMovies: SDL_WM_IconifyWindow() address: f74f8a80
NOTICE: NWMovies: Patch 0 Address: 0x08077a9d
NOTICE: NWMovies: Patch 1 Address: 0x08077ab1
NOTICE: NWMovies: Patch 2 Address: 0x0815b5f7
NOTICE: NWMovies: Patch 3 Address: 0x0815b611
NOTICE: NWMovies: Patch 4 Address: 0x0807796f
NOTICE: NWMovies: Patch 5 Address: 0x08207835
NOTICE: NWMovies: Patch 6 Address: 0x08207858
NOTICE: NWMovies: PrePatch0: 8b 80 78 02 00 00 5d c3
NOTICE: NWMovies: PrePatch1: 8b 80 7c 02 00 00 5d c3
NOTICE: NWMovies: PrePatch2: e8 68 c5 f1 ff 83 ec 08
NOTICE: NWMovies: PrePatch3: 169+: eb 59 90 83
NOTICE: NWMovies: PostPatch0: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch1: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch2: 90 90 90 90 90 83 ec 08
NOTICE: NWMovies: PostPatch3: 169+: 90 90 90 83
NOTICE: NWMovies: PrePatch4: 56 8d 5d e8 53
NOTICE: NWMovies: PostPatch4: e9 20 d4 6b ef
NOTICE: NWMovies: MoviesPrePatch: 6a 00 53 bf 00 00 00 3f e8 72 4f 2a 00 8b 43 60 8b 10 c7 04 24 00 00 80 3f 57 57 57 50 ff 52 44 83 c4 1c
NOTICE: NWMovies: MoviesPostPatch: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
NOTICE: NWMovies: Initialized.
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
[TERMINAL HANGS AT THIS POINT AND BECOMES UNRESPONSIVE]
Post edited October 11, 2015 by AterValeo
avatar
AterValeo: Hey Ganni: thanks so much for posting this! It worked great for me to get the game working in Linux Mint 17.2 (MATE). However, I have a few issues to report in case you are familiar with any of them (UPDATED 10/11/2015):

1. I cannot start the file via .nwn (it just hangs indefinitely), but I can start the game fine via nwmain in WINE.

2. I have all dependencies installed, but none of the *.bmu music files play in the game, only the music in the movies, sound effects (including background talking in taverns and the like), and voices.

3. I do not get any sound at all until I mute/unmute the entire system with a hotkey...

A. ...after first opening any of the *.nwm modules.
B. ...when starting the game or switching to and from the game when my main desktop resolution does not match the fullscreen resolution of the game. I have no idea why having a non-matching resolution would cause the sound not to function or be muted like that and haven't been able to find anything else on this.

OS: Linux Mint 17.2 (MATE)

The output of the instructions executed in Terminal:
keeper@SSRSNZXT ~ $ cd .wine/drive_c/Neverwinter
keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./fixinstall
[sudo] password for keeper:
Checking for required files

PASSED: ambient directory exists
PASSED: data directory exists
PASSED: music directory exists
PASSED: override directory exists
PASSED: miles directory exists
PASSED: nwm directory exists
PASSED: chitin.key exists
PASSED: dialog.tlk exists
PASSED: nwmain exists

Fixing case

ambient
.............................................................................................................. ...................
data
...........................................
dmvault
..
hak
..............................................................
localvault
...............................................
music
........................................................................................................
override
...........
portraits
.............................................................................................................. .............................................................................................................. .............................................................................................................. .....................
saves/000002 - Editing Sleshk
saves/000003 - Sleshk Start
saves/000005 - Sleshk Academy Attack
saves/000006 - Sleshk Prologue End
saves/000000 - quicksave
saves/000004 - Sleshk Academy Training
saves/000001 - Auto Save

Checking for problem files

Checking for permissions

PASSED: nwn.ini is writable
PASSED: nwnplayer.ini is writable
PASSED: nwncdkey.ini is writable
PASSED: saves is writable
PASSED: localvault is writable
PASSED: tempclient is writable
PASSED: dmvault is writable
PASSED: /home/keeper/.wine/drive_c/Neverwinter is writable

You are ready to run Neverwinter Nights.

keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./nwmovies_install.pl
NOTICE: Examining sound configuration for some clues...
NOTICE: Take this output with a grain of salt..

NOTICE: It appears none of your PCM playback devices supports
NOTICE: more than one simultaneous channel.
NOTICE: You may need to look into software mixing, via dmix, or ESD/ARTSD.
keeper@SSRSNZXT ~/.wine/drive_c/Neverwinter $ sudo ./nwn
NOTICE: NWMovies(./nwmain): Version: 20090223.080954
NOTICE: Looking up symbols in libSDL.....
NOTICE: NWMovies: Using libSDL via RTLD_NEXT.
NOTICE: SDL Library determined to be: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0
NOTICE: NWMovies: SDL_WM_GrabInput() address: f74f7710
NOTICE: NWMovies: SDL_GetVideoSurface() address: f74f5c10
NOTICE: NWMovies: SDL_WM_ToggleFullScreen() address: f74f8ab0
NOTICE: NWMovies: SDL_PollEvent() address: f74d6430
NOTICE: NWMovies: SDL_WM_IconifyWindow() address: f74f8a80
NOTICE: NWMovies: Patch 0 Address: 0x08077a9d
NOTICE: NWMovies: Patch 1 Address: 0x08077ab1
NOTICE: NWMovies: Patch 2 Address: 0x0815b5f7
NOTICE: NWMovies: Patch 3 Address: 0x0815b611
NOTICE: NWMovies: Patch 4 Address: 0x0807796f
NOTICE: NWMovies: Patch 5 Address: 0x08207835
NOTICE: NWMovies: Patch 6 Address: 0x08207858
NOTICE: NWMovies: PrePatch0: 8b 80 78 02 00 00 5d c3
NOTICE: NWMovies: PrePatch1: 8b 80 7c 02 00 00 5d c3
NOTICE: NWMovies: PrePatch2: e8 68 c5 f1 ff 83 ec 08
NOTICE: NWMovies: PrePatch3: 169+: eb 59 90 83
NOTICE: NWMovies: PostPatch0: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch1: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch2: 90 90 90 90 90 83 ec 08
NOTICE: NWMovies: PostPatch3: 169+: 90 90 90 83
NOTICE: NWMovies: PrePatch4: 56 8d 5d e8 53
NOTICE: NWMovies: PostPatch4: e9 20 d4 6b ef
NOTICE: NWMovies: MoviesPrePatch: 6a 00 53 bf 00 00 00 3f e8 72 4f 2a 00 8b 43 60 8b 10 c7 04 24 00 00 80 3f 57 57 57 50 ff 52 44 83 c4 1c
NOTICE: NWMovies: MoviesPostPatch: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
NOTICE: NWMovies: Initialized.
Home directory not accessible: Permission denied
Home directory not accessible: Permission denied
[TERMINAL HANGS AT THIS POINT AND BECOMES UNRESPONSIVE]
Hello, can't say I encountered any of these issues. A few things I noticed from your log: You're running those commands with sudo, that's not needed, Try to run it without.

What GPU and drivers are you using?