Multiclienting Setup (Windows)

Talk about Neversummer 4 with your fellow players.
Locked
Teigrgwyn
Noob
Posts: 10
Joined: Sun Feb 08, 2015 1:55 pm

Multiclienting Setup (Windows)

Post by Teigrgwyn »

Hey, while I'm sick today off from school, I thought I'd get my multiclient setup going again. I figured if I posted it here, it'd make it easy for anyone who reformats their computer to be able to get theirs going again quite easily.

Since you'll need multiple keys, just fill in a support request to GOG telling them you've already bought the game and request an additional key, or ask them for another one. They practically give them away willy-nilly, nowadays.

This guide is really much simpler than it appears to be. I'm not very efficient at projecting my thoughts into instructional writing..

For reference, your files should look like this in the end.
Image

Things you'll need:
  • A single Neverwinter Nights install (if you have multiple, there is no reason for you to continue)
    Sandboxie (trial version is good enough)
    Two copies of the nwnplayer.ini and nwncdkey.ini configuration files
Instructions:
  • Once Sandboxie is installed, you'll need to set the setting (Sandbox > Default Box > Sandbox Settings > Delete > Delete Invocation > Automatically delete contents of sandbox) to 'ticked'. If you don't do this, then you won't be able to start Neverwinter Nights after you run it in the first sandbox.

    After creating the copies of your .ini files, set the appropriate cd keys per each nwncdkey.ini file, with your main declared in one file, your alt key in the next copy, and so on.

    Then set the settings appropriately for each nwnplayer.ini file. For example, you'll probably want to set 'Client CPU Affinity' to the total number of processor cores you have (4 if 4-core, 8 if 8-core hyperthreaded, etc), since more than one opened Neverwinter Nights window can severely lag all of them if you don't. You'll be required to set the 'Client Port' to a number different than any other nwnplayer.ini copy in order for the client to be able to accept connections.

    Ideally, you'll have created a folder for the copied .ini files. In that folder, create two .bat files. Change the directories and name of the files to where they are appropriate for yourself. For me, they look like this. All the .bat files look the same, besides the names of the files '_1', which change number depending on which client is being executed.

    Code: Select all

    xcopy /y "E:\Games\Top-Down\Neverwinter Nights\Swapper\nwncdkey_1.ini" "E:\Games\Top-Down\Neverwinter Nights\nwncdkey.ini"
    xcopy /y "E:\Games\Top-Down\Neverwinter Nights\Swapper\nwnplayer_1.ini" "E:\Games\Top-Down\Neverwinter Nights\nwnplayer.ini"
    
    start "Neverwinter Nights" /d "E:\Games\Top-Down\Neverwinter Nights\" "nwmain.exe"
    
    Now that that's over with, it's time to create the shortcuts to finally replace all the files for you and run Neverwinter Nights with a single double click.
    The first shortcut just needs to link to the first .bat (the 'main' client). Any other 'alt' client will need to be referenced by Sandboxie, and will start sandboxed. Still easily enough, go to Sandboxie's install location, and create a shortcut from Start.exe, then modify the shortcut target by adding the location of the additional .bat. It looks like this for me:

    Code: Select all

    E:\Programs\Supplimental\Sandboxie\Start.exe "E:\Games\Top-Down\Neverwinter Nights\Swapper\client_2.bat"
    
    For consistency, I'd recommend creating a shortcut of each of the shortcuts you just created, and place them onto the desktop.
Suggested:
  • Add nwn.ini as another xcopy line to be copied over if you wish to use separate game settings for each client.
    Set the 'Grass Far Render Distance' in nwn.ini to something higher than the default of 900. 3500 is my personal recommendation. Over 6000 isn't advised.
    You will want to ensure the 'FullScreen=0' and 'AllowWindowedMode=1' lines are declared in nwn.ini, along with setting the 'Width' and 'Height' lines to your desired resolution, which needs to be one of Neverwinter Nights' natively supported resolutions and not equal to your monitor resolution. Otherwise, your window will be thrown into fullscreen regardless of settings.
    Install NWNCX and have it patch-overwrite the original .exe, as it can make the process of starting Neverwinter Nights easier.
    Log rotating can be easily appended by adding this to your 'main' client .bat, and don't forget to set appropriate locations:

    Code: Select all

    set currentyear=%date:~12,4%
    set currentmonth=%date:~4,2%
    set currentday=%date:~7,2%
    set currenthour=%time:~0,2%
    set currentminute=%time:~3,2%
    set currentsecond=%time:~6,2%
    move /y "E:\Games\Top-Down\Neverwinter Nights\logs\nwclientLog1.txt" "E:\Storage\Backup\Neverwinter Nights\Logs\%currentyear%%currentmonth%%currentday%_%currenthour%%currentminute%%currentsecond%.txt"
    
Notes:
  • Sandboxed programs don't allow sound through, as far as I know. You'll need to research this yourself if you wish to hear sound from alt clients.
    Considering you're probably playing Neverwinter Nights given all the technical difficulties involved with the game being so old, I can safely assume I don't need to re-write this guide to be noob-friendly, or add a tl;dr section.

Teigrgwyn
Noob
Posts: 10
Joined: Sun Feb 08, 2015 1:55 pm

Re: Multiclienting Setup (Windows)

Post by Teigrgwyn »

In addition, if you don't like the recorded logs to be one game start behind (thus giving it a date of backup instead of creation), then add '/w' directly after the start command before 'Neverwinter Nights', and move the list of 'set' & 'move' commands to the end of the file. This will result in the cmd.exe remaining open until Neverwinter Nights closes, but you can easily minimize it or hide it altogether with 3rd party applications. Even if it's not for you, the option is there.

Locked

Return to “General NS4 Discussion”