Linux Install Guide (Ubuntu)

Hints and Guidelines, How To's on Registration, Activation, NWN, etc.

Moderators: Active DMs, Forum Moderators

Post Reply
furryn
Posts: 95
Joined: Sat Apr 04, 2015 10:01 am

Linux Install Guide (Ubuntu)

Post by furryn » Tue Jun 09, 2015 6:01 am

Hi there, fellow Linux users!

I've decided to compose my own guide steal bits and pieces from around the web, to show you what i've found the best way to get to running NwN under Linux, This guide will not include how to view the movies, for that you'll need to go look elsewhere (Until i update this guide to make that available as well, i almost play this game exclusively multiplayer, so it'll be added when i play single player)

Just a final note: I've not been able to make NwN run natively in linux, in any version based on Ubuntu 14.04 64 bit(13.10 worked fine, so does 15.04) this includes Elementary OS Freya. and it goes for both nVidia setup, and intel/nvidia setup with bumblebee and primusrun.

First: Dependencies. Old game old dependencies. I seemed to manage with:

Code: Select all

sudo apt-get install libsdl1.2debian:i386
Second: Where do you wish to install the game? /opt/games/NwN as an example, would make it reachable system wide, but that might not be the intention. i usually install in /home/user/Games/NwN

Code: Select all

mkdir ~/Games/NwN
most of the time We'll be working from in here, so you might as well go ahead and set the directory:

Code: Select all

cd ~/Games/NwN
Third: You'll need the game files which for many reasons (primarily legal ones) i can't provide. However, I'll show you how to get them if you have the media.

Method A) From Disc (Diamond Edition) (taken from http://ubuntuforums.org/showthread.php?t=2082534)
1. Extract data

Code: Select all

unzip /media/cdrom/Data_Shared.zip
unzip /media/cdrom/Data_linux.zip

2. Extract expansion Zip overwriting all

Code: Select all

unzip -o /media/cdrom/data/XP1.zip

unzip -o /media/cdrom/data/XP2.zip

3. Download nwclientgold.tar.gz and extract (overwriting all)

Code: Select all

wget http://nwdownloads.bioware.com/neverwinternights/linux/gold/nwclientgold.tar.gz

tar -xzf ~/nwclientgold.tar.gz

4. Download nwclienthotu.tar.gz and extract (overwriting all)

Code: Select all

wget http://nwdownloads.bioware.com/neverwinternights/linux/161/nwclienthotu.tar.gz

tar -xzf ~/nwclienthotu.tar.gz

5. Then Download the Patch and Extract it

Code: Select all

wget http://na.llnet.bioware.cdn.ea.com/u/f/eagames/bioware/neverwinternights/updates/linux/169/English_linuxclient169_xp2.tar.gz

tar -xzf ~/English_linuxclient169_xp2.tar.gz

Method B) With GoG and Play on Linux (this is the method i use, i find it the easiest)
1. Install PoL
- go to https://www.playonlinux.com/en/download.html
- Pick your version, and install it (this case mine is Ubuntu, i'm using Trusty, because they don't have Vived)

Code: Select all

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_trusty.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

2. Download the files
- Go to gog.com
- Navigate to my games
- Download all three game parts (1MB, 1.5GB, 0.9GB)

3. Install NwN in PoL
- Open PoL (alternatively, click this link: [url]playonlinux://www.playonlinux.com/repository/download.php?id=1099[/url])
- Go to software and tick No-CD Needed (this will let it show you games such as those from GOG)
- Find GOG.Com - Neverwinter Nights Diamond Edition
- Choose install, when it asks if you want to download the files, don't. Navigate instead to the exe file you just downloaded.
- Let it install...

4. Copy Game Files

Code: Select all

cp ~/PlayOnLinux/NeverwinterNights/DosDevices/drive_c/GoG Games/Neverwinter Nights Diamond Edition/* ~/Games/NwN/

Make it run:

1. Download this file:
- https://docs.google.com/file/d/0B5kNyXl ... edit?pli=1 (look for the small arrow at the top of the screen that'll allow download, it can be hard to spot)

2. Extract and copy
- Extract the folder to the game directory:

Code: Select all

tar -xzf ~/Downloads/NWN\ Diamond\ GOG\ Linux.tar.gz

- Copy the files from the folder, to the game directory

Code: Select all

cp -r NWN\ Diamond\ GOG\ Linux/* ../*

3. Fixinstall
- Run

Code: Select all

./fixinstall
If you get something about missing permissions, do:

Code: Select all

chmod 755 ~/Games/NwN

4. Download the masterserver workaround, by our own Fireboar (to actually use it, read on)

Code: Select all

wget http://arelith.com/tools/masterserver
		
chmod +x masterserver
the chmod is simply to set execution rights
Fireboar wrote: - Edit /etc/hosts as explained above (sudo gedit /etc/hosts for example) and add "nwmaster.bioware.com" onto the end of the line for 127.0.0.1. For example,

127.0.0.1 localhost nwmaster.bioware.com

- Profit!

5. nwn file edit
Open the file with your text editor, something simple like gedit preferrably:

Code: Select all

gedit nwn

mine looks like this:

Code: Select all

#!/bin/sh

# This script runs Neverwinter Nights from the current directory

export SDL_MOUSE_RELATIVE=0
export SDL_VIDEO_X11_DGAMOUSE=0

rm miles
ln -s miles_linux miles

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

export SDL_AUDIODRIVER=pulse

./masterserver &
./nwmain $@
killall masterserver



rm miles
ln -s miles_win miles

Small walk through of the changes that has been made to this file:

a) Line 13
- Original: export LD_LIBRARY_PATH=./lib:./miles:"$LD_LIBRARY_PATH"
- Change:

Code: Select all

./lib:
removed from the line, reason: else audio will not function

b) Line 15
- Inserted:

Code: Select all

export SDL_AUDIODRIVER=pulse
this is also for sound to work. Back when nwn was developed i don't think pulse was around, so it needs to be told to use that.

c) Line 17, 18, 19
- inserted:

Code: Select all

./masterserver &
and

Code: Select all

killall masterserver
this is to actually use Fireboars workaround for the masterserver wait.

6. Optimization
Now you are technically able to run the Game, However, you might experience all kinds of oddities and "bugs". This can be due to the game being 32-bit, made for running on a single CPU, and not all
of your fancy hyperthreading - modern stuff! Luckily this can be fixed simply by editing nwnplayer.ini

Code: Select all

Client CPU Affinity=1
Then there's the matter of Memory. Standard, NwN will take up 64 MB of memory, and most of us can spare far, far more. It can take up to 4 GB but i usually run it on 3GB
nwn.wikia.com wrote: Increasing this number may improve performance, but likely only up to a certain point.
Note that you'll likely have to insert this string yourself. you could insert it right under the above line.

Code: Select all

Max Memory Usage=3072
7. CD Keys

lastly: CD keys. If none is specified the linux client will ask you for them on startup, but it's much easier to just add them in the file.

Code: Select all

gedit nwncdkey.ini
key1= is your nwn key
key2= is sotu and
key3= is hotu.

save and exit.

8. Actually playing... Finally?! Really?!
yes.

Code: Select all

./nwn

I wished to add in how to create a shortcut. Unfortunately i seem to be unable to get one to work, myself. I've had one before, i just can't seem to make the:

Code: Select all

Exec=/home/user/Games/NwN/nwn
Execute properly, so i usually just do:

Code: Select all

cd ~/Games/NwN

./nwn
to run the game.

if you run into trouble, or have something that needs adding to the guide. let me know.
I'll try to keep it updated for future releases of ubuntu, This install was made on 15.04
- The need to utter the words "I'm not stupid" implies the opposite.
How do i know? Well, obviously because I'm not stupid.

Post Reply