For online servers
Developing custom content for online servers can be challenging, because the toolset has some specific requirements and the AutoDownloader can overwrite some important files.
This guide will show you how to setup two different "home" directories, one for the toolset and server tests, and a second one for playing online on regular servers.
This guide will assume that you already have an "official" server with the Autodownloader enabled, and that your servers used for testing always have their Autodownloaders disabled + override folder enabled + custom UI enabled. Developers should have solutions for to downloading the latest version of your module files by themselves, without relying on the Autodownloader (for example, a git repository).
Setting up the dev directory
%USERPROFILE%\Documents\Neverwinter Nights 2
The NWN2 Toolset doesn't always load HAK files correctly, and in some cases, the toolset will use the base 2DA file from the game instead of your custom one. This can be fixed by placing all the files from your HAK files inside the override folder.
Note: It is a good idea to set the empty HAK files as read-only (right-click, properties, check 'read-only'). This will cause an extract error if you happen to try to connect to your online server with the Autodownloader enabled using the 'dev' home folder.
If your module uses a custom TLK file, it must be placed in the
%USERPROFILE%\Documents\Neverwinter Nights 2\tlk\ folder.
If your TLK file is tracked separately (for example in a git repository), you can create a symbolic link to your custom TLK and place it under
%USERPROFILE%\Documents\Neverwinter Nights 2\tlk\. This ensures the TLK used by the toolset is always synced with your upstream TLK file.
Your complete module (in directory mode) should be installed in
%USERPROFILE%\Documents\Neverwinter Nights 2\modules\.
Your complete campaign folder should be installed in
%USERPROFILE%\Documents\Neverwinter Nights 2\campaigns\.
About the ADL staging process
Staging files for the Autodownloader is always error-prone, and you should rely as much as possible on automated scripts.
- Close the NWN2 toolset if it is opened
- Replace all your empty haks with the latest haks you want to stage.
- Remove or rename the
%USERPROFILE%\Documents\Neverwinter Nights 2\override\folder, so it appears as empty for the toolset
- Re-open your module in the toolset and start staging files as usual.
Setting up the online directory
%USERPROFILE%\Documents\Neverwinter Nights 2-online
Locate your NWN2 installation directory, and create a new shortcut to
NWLauncher.exe if you are using Skywing's client extension). Go to properties and edit the target field to append
-home "%USERPROFILE%\Documents\Neverwinter Nights 2-online"
Every time you will want to play online on servers with the Autodownloader enabled, you must launch the game using this shortcut.
DM client shortcut
Copy/paste the shortcut you just created for the game, edit its target field and add
-dmc at the end.
"C:\Program Files (x86)\Atari\Neverwinter Nights 2\nwn2main.exe" -home "%USERPROFILE%\Documents\Neverwinter Nights 2-online" -dmc
Connecting to a server
When connecting to a server, the Autodownloader will download and install all files required by the server, as if you were a normal player.