How To Run Neverwinter Nights Dedicated Server (NWN DS) As A Windows Service with FireDaemon
Introduction
To quote the NWN Instruction Manual: "
Neverwinter Nights is an epic roleplaying game that uses the 3rd Edition Dungeon & Dragons rules and is set in the Forgotten Realms".
This guide attempts to detail a method of configuring the NWN Server component by the DM in order to offer a persistent, crash-proof, auto-saving world under Windows by converting it to a service with FireDaemon.
The NWN Server is configured via the command line or .ini file. The NWN Server executable is: nwserver.exe. This file is found in your NWN installation directory. We recommend that you test all options at the Command Prompt (Start/Run/cmd.exe) prior to attempting to convert the NWN DS to a service with FireDaemon.
A complete list of NWN Server command line options can be found
here.
Configuring NWN DS
NWN Server Options take the form of:
If an option value contains spaces then it should be enclosed is double quotes. The options that you are most likely to be interested in are:
- -module "module name": Loads and runs the specified module. The module name is the name without the extension of a module file from your "nwm" or "modules" directory. Enclose the module name in double quotes if it contains spaces.
- -publicserver 0|1: Whether your server registers with GameSpy (0 = No, 1 = Yes).
- -servername "server name": Sets the name that your server will display in the mulitplayer game listing. Enclose the server name in double quotes if it contains spaces.
- -servervault 0|1: Whether server or local characters are allowed (0 = Local, 1 = Server)
- -dmpassword "password": Sets the password required by DMs to DM the game. Enclose the password in double quotes if it contains spaces.
- -autosaveinterval n: Sets the autosave interval in minutes. For a persistent server set n to greater than 0.
All of the options (with the exception of -module and -load) can also be specified in a file called nwnplayer.ini. The format of this file is the usual Windows 3.x INI file (ie. [Section] followed by name=value pairs). This file can be found in the top level NWN installation directory. Placing the options in this file improves server stability. A template sample can be found below:
Code:
[Server Options]
Server Name=
Game Port=
Max Players=
Reload Module When Empty=
GameSpy Enabled=
Game Type=
PVP Setting=
PauseAndPlay=
Disable AutoSave=
Auto Save Interval=
AllowLocalChars=
Game Region=
ServerDownTimer=
One Party Only=
Enforce Legal Characters=
ItemLevelRestrictions=
DMPassword=
ServerAdminPassword=
Suppress Base Servervault=
[Game Options]
Difficulty Level=2
CodeWord=hacktastic
Memory Level=1
Memory Access=1
[Banned IPs]
0=
[Banned Players]
0=
[Banned CD Keys]
0=
Configuring the NWN DS As A Service With FireDaemon
1. Install NWN and patch up to the latest release. For the purposes of this example, we installed NWN into C:\Program Files\NWN. Modify this path to suit your installation.
2. Install FireDaemon Pro into the directory of your choice (eg. C:\Program Files\FireDaemon). FireDaemon can be downloaded
from here.
3. Start the FireDaemon GUI
4. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Obviously adjust paths to suite your installation. Pay special attention to the Parameters list.
The Parameters field is quite long and not fully visible. The parameters that we supplied are:
Code:
-module "Chapter1" -publicserver 0 -servername "Server" -servervault 1 -dmpassword "password" -autosaveinterval 1
5. Click on the Settings tab. Set the Show Window drop down to minimised and check the Interact with Desktop checkbox.
6. Click on the Dependencies tab. Make sure the NWN service depends on the Workstation (lanmanworkstation) or other late starting service.
7. That's it! Your done. Click on the Install button. Your NWN DS will be installed as a system service and started automatically.
If you have a variety of Server settings for differing modules etc. you can either Edit your service definition (Service/Edit), create multiple NWN Server Service instances (ensure that you only run one at a time OR stipulate different Saves directories (see the NWman documentation in regard to this!) or save multiple configurations to differing XML files via the Save button on the toolbar in the New/Edit Service Definition Dialog.
Improving NWN Server Stability with NWman
Instead of running the NWN Server directly with FireDaemon, you can control it with
NWman. NWman can, in turn, be controlled by FireDaemon. To setup NWman follow the
installation instructions. After you have done that and configured your server manually (by editing nwman.cfg), you will need to create a FireDaemon service in a similar fashion to above. We used the EXE version of NWman and unpacked it into C:\Program Files\NWN\NWman.
1. Start the FireDaemon GUI and click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below.
2. Click on the Advanced tab. nwman.exe spawns nwserver.exe. Ensure that you place the NWman service in a Global Job group. This will ensure that NWman and nwserver.exe both run at the same priority and are both terminated when the service is stopped.
Now click the Install button to start NWman as a FireDaemon service. Issues ... other problems? Please post in the
Public Support Forums!