NWServer is the executable server application for Neverwinter Nights. Setting up a server for quick playing is reasonably easy - and can even be done using a GUI - but for anything even slightly more complicated you'll want to review the Game Options and maybe use NWNX.

Location - packaged executables

NWServer is packaged with the base game install. The various different NWServer executables can be found in the Neverwinter Nights main install directory, at:

\Neverwinter Nights\bin\linux-x86
\Neverwinter Nights\bin\macos
\Neverwinter Nights\bin\win32

Location - latest executables (online)

The latest version of NWServer executables are available via an official post on the Beamdog forums: https://forums.beamdog.com/discussion/67157/server-download-packages-and-docker-support

Official docker images are available here: https://hub.docker.com/r/beamdog/nwserver/

The NWNX NWServer executable (along with the other NWNX binaries) is available here: https://github.com/nwnxee/unified

A guide to setting up a Linux NWN server with NWNX-enabled NWServer is available here: https://github.com/Daztek/NWNX-WSL


Running NWServer

In Windows you can run a GUI version of the server application simply by running nwserver.exe, found in 

\Neverwinter Nights\bin\win32

A helpful resource for the Windows GUI version can be found here: http://neverwinternights.info/dedicatedserver.htm (NOTE: that page refers to the old nwnplayer.ini file, which has now been replaced by settings.tml)
nwserver.exe can also be run from the command line.

In Linux, you can simply run nwserver from the command line as an executable:

./nwserver

Running NWServer - settings and command line options

Some settings for NWServer are included in settings.tml. Check that page for full details of what the available settings do.

However you can also define settings for your server as commands when you load nwserver.

The command -help gives the full command list for NWServer. These used on starting the server will override settings.tml values.

OptionDefault ValueValid ValuesExample UsageNotes
moduleNone - is required
-module "Name of module"Name can be in quotes if spaces are used. Don't add the extension.
nwsyncurlBlank/not used
-nwsyncurl https://example.com/nwsyncYou can specify a nwsync URL which overrides the "requires specific hakpacks" - in fact a server module can run from files in /development or /override folders with this flag on (but by default will follow the hakpacks it needs to load)
userdirectory

Got from game directory


-userdirectory "D:\nwnserver\stuff"

-userdirectory "/nwn/home/"

Specify the location of your nwn user directory (contains /hak folder etc) if not default
maxclients244
-maxclients 64
minlevel11-minlevel 1Only set to more than 1 in a server that allows local vault characters
maxlevel4040-maxlevel 40Lower will limit clients and the server from levelling past the given level. Only can use higher than 40 with NWNX and it's extensions.
pauseandplay0

0 = game can only be paused by DM

1 = game can by paused by players

-pauseandplay 0
pvp

0 = none

1 = party

2 = full

-pvp 2Still adheres to area PvP settings
servervault0

0 - local vault

1 - server vault

-servervault 1

Local vault means players loading and saving their character files (any of them, edited or using other custom content or not) from their local installation.

Server vault means characters are stored and saved on the server and only those character can be used on the server.

Not recommended to allow local vault except in passworded, DM led or friends only games

elc0

0 - Do not enforce legal characters

1 - Enforce legal characters

-elc 1

Highly recommended to be on else the client can send a new character or levelled up character with additional feats, abilities or statistics, or simply the wrong classes or other things that might cause issues (they can even do this by accident if they use overriden classes.2da or feats.2da files locally).

NWNX can alter the ELC rules to allow more complicated characters (eg classes that would get bonus feats the game can't usually give).

 ilr0

0 - Do not enforce Item Level Restrictions

1 - Enforce item level restrictions

-irl 0This just applies a cost cap to items being equipped based on the file
gametype

-gametype 3Category in the server browser in 1.69. In NWN:EE this category is still shown under the "Info" but you can't filter by it on the left hand side.
oneparty

0 - Allow normal party creation

1 - All PCs are put in one party

-oneparty 0
difficulty

1 = easy

2 = normal

3 = D&D hardcore

4 = very difficult

-difficulty 3 See Difficulty Settings
autosaveinterval0
-autosaveinterval 0 If set to anything other than 0 will autosave every X minutes
playerpasswordBlank - no password
-playerpassword ''If set to anything other than blank then players must enter this password to join
dmpassword

-dmpassword '[a DM password]'Password to enter as a DM. Recommended to set.

adminpassword



-adminpassword '[an admin password]'Password to do administration commands on the server. Recommended to set.

servername



 -servername '[the public name you want your server to have on the server list]'
publicserver

0 - Only available on LAN or by direct IP/URL connection

1 - Sent to master server

-publicserver 1
reloadwhenempty

0 - Do not reload when empty

1 - Reload when empty

-reloadwhenempty 0Really recommended on servers to leave at 0 since reloading a module can take some serious time and of course resets everything so has to be carefully handled
port

-port 5555Main port to connect to before NAT/connection handshake/port choice

You can find further details on our settings.tml page, and on the following pages:

http://neverwinternights.info/dedicatedserver.htm#wininstr_starting

https://nwn.fandom.com/wiki/Settings.tml


The following is an example of some of the commands you may choose to define on loading the server application:

./nwserver-linux -module "[name of your module's .mod file]" -nwsyncurl [your nwsync directory's URL] -userdirectory [specify the location of your nwn user directory (contains /hak folder etc) if not default] -maxclients 64 -minlevel 1 -maxlevel 40 -pauseandplay 0 -pvp 2 -servervault 1 -elc 0 -ilr 0 -gametype 3 -oneparty 0 -difficulty 3 -autosaveinterval 0 -playerpassword '' -dmpassword '[a DM password]' -adminpassword '[an admin password]' -servername '[the public name you want your server to have on the server list]' -publicserver 1 -reloadwhenempty 0 -port 5555

Firewalls/Networking

You are likely to need to forward whichever Ports you set NWServer to use. Information on this can be found on the following page: http://neverwinternights.info/dedicatedserver.htm#wininstr_hosting


Shutting down NWServer

Simply enter the following command in the NWServer command line:

exit


Making an in-game announcement from the command line

Whilst NWServer is running you can enter certain commands (see the full list below).

Using the following command you can make an announcement that will appear in the action log of all players/DMs who are logged in to the server:

say [insert text of the announcement you want to make; square brackets are not required]


By default the announcement will appear in a dull grey text colour. You can change the colour of the announcement text using colour codes (see also https://nwn.fandom.com/wiki/Text_color)

For example:

say <cÿ >RED TEXT</c>

However the colours don't appear as you would expect; the above example seems to appear as yellow text.

You can find particular colour codes using this tool: https://colortoken.nwn1.net/?rgb=255,250,32


NWServer commands - full list

While NWServer is running you can perform certain functions by entering commands. A full list is below. Many of these reflect those settings you can define in settings.tml or by appending additional commands when you enter the command to load nwserver (see above). However some are exclusive, such as the 'say' command, which allows you to make an announcement which appears in-game in all players/DMs action log window.

The below information is available in the application's help file which can be accessed by entering the command

help 

when NWServer is running


commandoperation
statusShow information about the server.
clientinfo <player>Displays details on the client identified by ID, CD Key, or Player Name.
kick <player>Remove a player from the game identified by ID, CD Key, or Player Name.
listbansList all the current bans for Name, IP, and Public CD Key.
banip <ip address>Ban connections from an ip address (may include *s)
bankey <key>Ban connections using a cd key.
banname <player name>Ban connections from a player name (may start and/or end with *s).
unbanip <ip address>Remove an ip address from the list of banned ip addresses.
unbankey <key>Remove a cd key the list of banned cd keys.
unbanname <player name>Remove a player name from the list of banned player names.
save <slot#> <name>Save the current running game and call it <name>.
forcesave <slot#> <name>Save the current running game and call it <name>, overwriting any existing save game in that slot.
exit/quitShut down the server.
saveandexit <slot#> <name>Save the current running game, call it <name> and shut down the server.
module <module name>Load the specified module.
load <slot#>Load the specified saved game.
say <message>Broadcast a message to all clients.
exportCauses all player characters in the game to be saved.
maxclients <number of clients>Set the maximum number of connections to the game server.
minlevel <minumum level>Set the minimum character level required by the server.
maxlevel <maximum level>Set the maximum character level allowed by the server.
pauseandplay <0/1>

0 = game can only be paused by DM

1 = game can by paused by players

elc <0/1>

0 = don't enforce legal characters

1 = do enforce legal characters

ilr <0/1>0 = don't enforce item level restrictions
1 = do enforce item level restrictions
oneparty <0/1>0 = allow only one party
1 = allow multiple parties
difficulty <level>1 = easy
2 = normal
3 = D&D hardcore
4 = very difficult
autosaveinterval <time>Set how frequently (in minutes) to autosave.
0 disables autosave.
playerpassword <password>Change or set the password required by players to join the game.
Providing no password will remove password protection.
dmpassword <password>Change or set the password required by DMs to DM the game. Providing no password will disable DM login.
adminpassword <password>Change or set the password required to remotely administer the game.
Providing no password will disable admin login. Currently unused.
servername <name>Set the name this server appears as in the mulitplayer
game listing.
helpDisplay all commands.


Notes:
- Saved game slots 0 and 1 are reserved
- Commas between parameters to interactive commands are optional

  • No labels