Neverwinter nights

Neverwinter Nights is a proprietary (evil) rpg game by BioWare, released in 2002. For a lot of people it is the sole reason to buy a computer in the first place, and in my humble opinion, it is atrocious that the installation of the game isn't covered in the handbook, because it is an every bit as vital piece of your operating system as that "kernel" and "partitioning" stuff. This guide will take you through the installation of this glorious piece of art.

Packages available

 * games-rpg/nwn (The client).
 * games-rpg/nwn-data (The data).
 * nwn-ded (Dedicated server).
 * nwmovies (Hack to play the cinematics inside of the game)
 * nwn-cep (Community expansion pack).
 * nwn-penultima (A module).
 * nwn-penultima-rerolled (A module).

You will have to install nwn and nwn-data to get nwn running. Depending on what you want to install, you'll need to investigate the USE-flags and locales of nwn-data.

USE- and locale-flags
You define the USE- and locale-flags in /etc/portage/package.use.

Replace the flags with whatever you deem appropriate.

Explanation of the USE-flags
hou Installs Hordes of the Underdark. NOTE: There are no public mirrors for this, so you'll need the cdinstall USE-flag!

sou installs Shadows of Undrentide. NOTE: There are no public mirrors for this, so you'll need the cdinstall USE-flag!

cdinstall If you intend to install with the CD (much quicker than downloading everything off the net), you'll want this flag.

nowin If you do not have nwn installed anywhere else/can't get the data of some other installation, you'll need this flag.

videos Installs the cinematics. This is pretty useless without installing the nwmovies package, because if you only install the cinematics, you'll have to view them outside of the game with BinkPlayer, which is kind of useless. What you most likely want is to view the cinematics inside of the game. So if you're grabbing this, grab the nwmovies package as well.

Explanation of locales
Locales defines which language you will install the game in. the available locales are de (German), en (English), es (Spanish), fr (French) and it (Italian).

Installation
Now, install Neverwinter Nights.

Or, you can install the "whole package".

If you are using the cdinstall USE-flag, you will have to insert the CD containing Neverwinter Nights, then mount it.

When the time for installation of the expansion pack(s) come, you will have to umount the original CD, and mount the expansion pack(s) CD(s). If you have a DVD containing all games, like the Diamond edition package, you will only have to mount this DVD, and everything will be installed off it.

Your installation should go smoothly. When it is complete you'll have to run a script that checks that all the required files are there, sets permissions, etc. NOTE: Must be run as root!

Now, all you have to do to run the game is add yourself to the "games" group. If you're already in it, skip this. If not, do it.

Replace "user" with your username. Now everything should be a-okay. So run the game.

It will start up like you expect it too, and then it prompts for cd-keys. Get out your manual(s), and type them in. You should now have a working Neverwinter Nights installation with the appropriate expansion packs and premium modules.

Window manager gets overrided
Your window manager might be overrided by the game. I use openbox, and this as well as most other full screen opengl applications that aren't run via an external application such as Wine, more often than not refuse my wm to control the application. This not only means that I can't minimize, maximize, resize, move or close the window with my defined key-bindings - but it also means that xbindkeys are ignored, and that I thus cannot change the volume, unless I change it in-game.

The game has the hiccups
If you are on a multi-core CPU system, you might be experiencing the hiccups. But thankfully, the fix should be easy. Open the game's configuration file with your favourite text editor.

NOTE! The file structure will vary between different languages and so forth! In here you'll want to add an option to tell the game to only use one CPU.

[Game Options] Client CPU Affinity=0

Openbox
The Openbox wm uses a single configuration file for this stuff. Edit it with your favourite text editor. vim ~/.config/openbox/rc.xml

In this file you need to locate the keyboard section. in it, you put your keybind.

  nwn

W-n means Windows/Super-button + n-key. Change it to whatever you deem appropriate. C means ctrl and A means alt. After inserting a keybind of your choice to the configuration, you must reconfigure your Openbox environment. openbox --reconfigure