Copy & Paste them into notepad and file save as (anynameyouwant).bat
Note: The ip address and port for NWN:EE C&P and Surface are assumed, they may end up being different when they're actually live.
Both feature a log rotator. They do not enable logging on your behalf, for that you must do so yourself.
Towards the top of the .bat file each feature lines similar to:
Code: Select all
::Your NWNL:EE log directory location on the next line.
set EEDocDir="D:\Documents\Neverwinter Nights"
::Your EE nwmain.exe install directory on the next line
set EEInstallDir="E:\Program Files\Steam\steamapps\common\Neverwinter Nights\bin\win32"
::The location of your logs folder of your 1.69 install on the next line
set NWN169Dir="E:\GalaxyClient\Games\NWN Diamond"
:: Your 1.69 nwmain.exe install directory on the next line, only modify if it's different location from your logs folder
set NWN169GameDir=%NWN169Dir%
Use bat file 1 if you want to enter your player name each and every time you play the game or only ever have 1 player name.
Use bat file 2 if you want to remember your last login with the option to log in with another one.
Bat file 2 requires additional set up. You must log into NWN:EE, log into any server (Arelith counts as any server) and when asked for a player name, type one in and check mark set as default. Hit OK. You are now ready to use bat file 2. If you're paranoid you can back up your nwnplayer.ini.
Bat file 2 assumes your log directory and nwnplayer.ini are in the same folder.
Bat file 1:
Code: Select all
@echo off
::Your NWNL:EE log directory location on the next line.
set EEDocDir="D:\Documents\Neverwinter Nights"
::Your EE nwmain.exe install directory on the next line
set EEInstallDir="E:\Program Files\Steam\steamapps\common\Neverwinter Nights\bin\win32"
::The location of your logs folder of your 1.69 install on the next line
set NWN169Dir="E:\GalaxyClient\Games\NWN Diamond"
:: Your 1.69 nwmain.exe install directory on the next line, only modify if it's different location from your logs folder
set NWN169GameDir=%NWN169Dir%
echo Select a Server
echo 1. NWN: EE Distant Shores
echo 2. NWN: EE Cities and Planes
echo 3. NWN: EE Surface
echo 4. NWN: 1.69 PGCC Arena
echo 5. NWN: 1.69 FL
set /p servervar= Server Number:
if %servervar% lss 4 (
set logdir=%EEDocDir%
cd /D %EEInstallDir%
if %servervar% == 1 start /wait nwmain.exe +connect game.arelith.com:5121
if %servervar% == 2 start /wait nwmain.exe +connect game.arelith.com:5122
if %servervar% == 3 start /wait nwmain.exe +connect game.arelith.com:5123
)
if %servervar% gtr 3 (
set logdir=%NWN169Dir%
cd /D %NWN169GameDir%
if %servervar% == 4 start /wait nwmain.exe +connect arena.arelith.com:5121
if %servervar% == 5 start /wait nwmain.exe +connect fl.arelith.com:5121
)
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set TODAY=%YYYY%-%MM%-%DD%
set NOW=%HH%-%Min%-%Sec%
move %logdir%\logs\nwclientLog1.txt %logdir%\logs\log-%TODAY%-%NOW%.txt
Code: Select all
@setlocal enableextensions enabledelayedexpansion
@echo off
::Your NWNL:EE docoument directory on the next line, the location of your logs directory and nwnplayer.ini
set EEDocDir="D:\Documents\Neverwinter Nights"
::Your EE nwmain.exe install directory on the next line
set EEInstallDir="E:\Program Files\Steam\steamapps\common\Neverwinter Nights\bin\win32"
::The location of your logs folder of your 1.69 install on the next line
set NWN169Dir="E:\GalaxyClient\Games\NWN Diamond"
:: Your 1.69 nwmain.exe install directory on the next line, only modify if it's different location from your logs folder
set NWN169GameDir=%NWN169Dir%
echo Select a Server
echo 1. NWN: EE Distant Shores
echo 2. NWN: EE Cities and Planes
echo 3. NWN: EE Surface
echo 4. NWN: 1.69 PGCC Arena
echo 5. NWN: 1.69 FL
set /p servervar= Server Number:
if %servervar% lss 4 (
set logdir=%EEDocDir%
cd /D !logdir!
set file=nwnplayer.ini
set area=[Profile]
set key=Player Name
set currarea=
for /f "usebackq delims=" %%a in ("!file!") do (
set ln=%%a
if "x!ln:~0,1!"=="x[" (
set currarea=!ln!
) else (
for /f "tokens=1,2 delims==" %%b in ("!ln!") do (
set currkey=%%b
set currval=%%c
if "x!area!"=="x!currarea!" if "x!key!"=="x!currkey!" (
set curlogin=!currval!
echo Current login: !currval!
)
)
)
)
set /p id= "New Login (Hit Enter to leave unchanged):"
if NOT [!id!] == [] (
Set _OldLine=!key!=!curlogin!
Set _NewLine=!key!=!id!
:: End of Search parameters
Call :_Parse "!file!"
Set _Len=0
Set _Str=!_OldLine!
Set _Str=!_Str:"=.!987654321
:_Loop
If NOT "!_Str:~18!"=="" Set _Str=!_Str:~9!& Set /A _Len+=9& Goto _Loop
Set _Num=!_Str:~9,1!
Set /A _Len=_Len+_Num
PushD !_FilePath!
If Exist !_FileName!.new Del !_FileName!.new
If Exist !_FileName!.old Del !_FileName!.old
Set _LineNo=0
For /F "Tokens=* Eol=" %%I In (!_FileName!!_FileExt!) Do (
Set _tmp=%%I
Set /A _LineNo+=1
If /I "!_tmp:~0,%_Len%!"=="!_OldLine!" (
>>!_FileName!.new Echo !_NewLine!
) Else (
If !_LineNo! GTR 1 If "!_tmp:~0,1!"=="[" Echo.>>!_FileName!.new
>>!_FileName!.new Echo %%I
))
Ren !_FileName!!_FileExt! !_FileName!.old
Ren !_FileName!.new !_FileName!.ini
::PopD
::Goto :EOF
)
cd /D %EEInstallDir%
if %servervar% == 1 start /wait nwmain.exe +connect game.arelith.com:5121
if %servervar% == 2 start /wait nwmain.exe +connect game.arelith.com:5122
if %servervar% == 3 start /wait nwmain.exe +connect game.arelith.com:5123
)
::if %servervar% == 2 start /wait nwmain.exe +connect game.arelith.com:5123
if %servervar% gtr 3 (
set logdir=%NWN169Dir%
cd /D %NWN169GameDir%
if %servervar% == 4 start /wait nwmain.exe +connect arena.arelith.com:5121
if %servervar% == 5 start /wait nwmain.exe +connect fl.arelith.com:5121
)
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set TODAY=%YYYY%-%MM%-%DD%
set NOW=%HH%-%Min%-%Sec%
move %logdir%\logs\nwclientLog1.txt %logdir%\logs\log-%TODAY%-%NOW%.txt
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Subroutines
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:_Parse
Set _FilePath=%~dp1
Set _FileName=%~n1
Set _FileExt=%~x1
Goto :EOF
endlocal
First check if your system time is correct, if it is continue reading.
Was an issue for one known case for a Windows 8.1 user.
To fix change set TODAY=%year%-%month%-%day%
to
set TODAY=%date%
Old way to get date/time in case you don't like military time:
Code: Select all
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set TODAY=%year%-%month%-%day%
for /f "tokens=1 delims=: " %%h in ('time /T') do set hour=%%h
for /f "tokens=2 delims=: " %%m in ('time /T') do set minutes=%%m
for /f "tokens=3 delims=: " %%a in ('time /T') do set ampm=%%a
set NOW=%hour%-%minutes%-%ampm%
move %logdir%\logs\nwclientLog1.txt %logdir%\logs\log-%TODAY%-%NOW%.txt