NWN Server Installation

From Nwnx

Contents

Author: Rorrim

Source: CoPaP Devwiki

Obtaining the Standalone Server Software

The standalone server software for Windows, Linux, and MacOS can be obtained directly from Bioware. You can download it from their web page here. Note that the remainder of this documentation will discuss installation and configuration of the Windows standalone server.

Installing the Server Software

The standalone server comes in the form of an archive compressed in the ZIP format. The first step for installation is unZIPing the file into the destination directory.

I never install application software in the same partition as my operating system. It becomes harder to secure, and there is always the chance that a runaway file that grows too large can fill up the OS partition, causing a crash or worse. Especially if you plan to store your logs and character vault locally on the server, it's a good idea to set up the dedicated server on its own partition. I created a D: drive specifically for this purpose and installed the server in the D:\ wn directory. The remaining examples will use this directory, but it can be modified if you desire.

As your server grows, you may want to host more than one module on a single physical server. I take this into account from the beginning, and install the first server instance in a directory under D:\ wn. On my own server, I use D:\ wn\\server0 for the first instance and will use D:\ wn\\server1 through D:\ wn\\serverX for additional instances.

Installation is easy. UnZIP the downloaded file into your chosen directory.

Modifications to nwnplayer.ini

The nwnplayer.ini file has several options to control the behavior of the server. By modifying it, you can change how the server runs at startup. The following is an example of the file:

[Game Options]
Difficulty Level=4

[Control Options]
[Profile]
[Server Options] MPEnabled=1 Game Port=5121 Max Players=32 MinCharLevel=1 MaxCharLevel=40 Server Name=Your Server Name DMPassword=yourdmpassword PlayerPassword=yourplayerpassword Reload Module When Empty=0 GameSpy Enabled=1 Game Type=10 PVP Setting=2 ServerDownTimer=180 One Party Only=0 Enforce Legal Characters=0 ItemLevelRestrictions=0 Suppress Base Servervault=1 CD Banned Behavior=0 Disallow Shouting=1 ShowDMJoinedMessage=0 Saving Throw Automatic Failure On 1=1 BackupSavedChars=0
[Banned Ips] 0=
[Banned Players] 0=
[Banned CD Keys] 0=

You'll probably want to make your own modifications here, especially when setting up your player and DM passwords. Note that external item level restrictions and legal character enforcement are available, so they have been disabled here.

Modifications to nwn.ini

[Alias]
HD0=.\\
OVERRIDE=.\\override
TEMP=.\\temp
MODULES=.\\modules
LOGS=.\\logs
LOCALVAULT=.\\localvault
DMVAULT=.\\dmvault
SERVERVAULT=.\\servervault
TEMPCLIENT=.\\tempclient
SAVES=.\\saves
CURRENTGAME=.\\currentgame
HAK=.\\hak
PATCH=.\\patch
NWMFiles=.\

wm

DATABASE=.\\database

[Sound Options]
[Display Options]
[Video Options]
[Config] FirstRun=0 Connection=1

If you're planning on running multiple machines, you may want to store your server vault and logs on a central machine. It's easy to do this. Set up a share, either on another Windows computer or through *nix with Samba. Create a user and assign the appropriate permissions. Then change nwn.ini to point to the share. As an example, you can use the following lines to store your logs and server vault on a remote machine named SERVER:

[Alias]
LOGS=\\\\SERVER\\logs\\logs0
SERVERVAULT=\\\\SERVER\\servervault\\vault0

This will store the server vault characters under the vault0 directory under the servervault share on SERVER and the logs under the logs0.0 (note the appended zero) under the logs share.

Optional: Using the Subnet Profiler

The subnet profiling system was added in version 1.64 of the server and is useful to measure the amount of bandwidth your server is consuming. It's also useful to plan when you might need to upgrade your connection as your server grows. To enable it, add the following to your nwn.ini' file.

[Game Options]
Enable SubNet Profiling=1

After it is enabled, a log file called SubNetProfile.log will be created in your root Neverwinter Nights directory once the game server is shut down. The file is in the following format:

******************************
Name: DELETED1
CD  : DELETED1
Time: 2930461 ms
Sent: 551113
Recv: 16891
*****
Average Send: 188/s 
Average Recv: 5/s 
******************************
Name: DELETED2
CD  : DELETED2
Time: 3679920 ms
Sent: 439192
Recv: 31089
*****
Average Send: 119/s 
Average Recv: 8/s 
******************************
Total Server Running Time: 4447702 ms
Sent: 990305
Recv: 47980
*****
Average Send: 222/s 
Average Recv: 10/s

The breakdown for the player section is:

  • Name = Player name
  • CD = Player's public CD key
  • Time = Total time the client was connected in milliseconds
  • Sent = Total bytes sent to this client
  • Recv = Total bytes received from this client
  • Average Send = Average number of bytes sent per second to this client
  • Average Recv = Average number of bytes received per second from this client

The breakdown for the server section is:

  • Total Server Running Time = Total server running time in milliseconds
  • Sent = Total bytes sent by the server
  • Recv = Total bytes received from the clients
  • Average Send = Average number of bytes sent per second by the server
  • Average Recv = Average number of bytes received per second by the server
Personal tools