Script To install Neverwinter Nights

Anything related to gaming on Linux Mint including game discussion or questions concerning Steam or Wine.
Forum rules
Before you post please read how to get help
Frimbleglim
Level 1
Level 1
Posts: 16
Joined: Fri Nov 27, 2015 11:47 am

Script To install Neverwinter Nights

Postby Frimbleglim » Tue Jun 14, 2016 2:58 pm

Script To install Neverwinter Nights Delux Edition (Sold Out) on Linux mint 17.3 32 bit

I have written the following bash script to install Neverwinter Nights on Linux Mint. It is loosely based on this guide from 2010. It also includes a version of the "fixinstall" bash script provided by bioware updated by me to use the correct syntax for a modern kernel.

http://forum.bioware.com/topic/136631-l ... -nwmovies/


It was tested with this version of the game disk.

https://www.amazon.co.uk/Neverwinter-Ni ... B003P9WNBM


Instructions:

1) Download the following files:

http://nwdownloads.bioware.com/neverwinternights/linux/gold/nwclientgold.tar.gz
http://nwdownloads.bioware.com/neverwinternights/linux/161/nwclienthotu.tar.gz
http://files.bioware.com/neverwinternights/updates/linux/169/English_linuxclient169_xp2.tar.gz

Together with the attached bash script (make a text file and paste the code into it) and put them all in the folder to where you wish to install the game.


2) insert the DVD into the disk drive.

3) open up a terminal and run the script. You will be prompted to enter the directory where your DVD is mounted.

4) open up the nwn bash script and make the suggested changes. (ie. delete the /lib from the directory path)

5) if you are on 64 bit linux mint you may have to use apt-get install to add some 32 bit libraries. (I used a 32 bit computer so I'm not sure if this is necessary).

6) run the nwn bash script, enter your CD keys and enjoy.

Note that this script does not install videos.

Code: Select all

#!/bin/bash

echo "This script is provided under a gnu licence and does not come with any warrenty or guarentee that it will work as desired.  Please use at your own risk      "

echo "please enter the directory path of your Neverwinter Nights Install Disk eg. /media/CD_ROM or /media/user/_DVD"

read nwndvd
echo "You entered: $nwndvd"

#unzip -o $nwndvd/Data_Shared;
#unshield x $nwndvd/data1.cab;
#unshield x $nwndvd/data2.cab;
#unzip -o $nwndvd/Language_data;
#unzip -o $nwndvd/Language_update;
tar -xvf  nwclientgold.tar.gz;
tar -xvf  nwclienthotu.tar.gz;
tar -xzvf English_linuxclient169_xp2.tar.gz;

aRequiredDirs="ambient data music override miles nwm"
aRequiredFiles="chitin.key dialog.tlk nwmain"
aLCDirs="ambient data dmvault hak localvault music override portraits"
aProblemFiles=""
aWritables="nwn.ini nwnplayer.ini nwncdkey.ini saves localvault tempclient currentgame dmvault"

printf "Checking for required files\n\n"

for d in $aRequiredDirs
do
    if [ -d $d ]
    then
        printf "PASSED: $d directory exists\n"
    else
        printf "FAILED: $d directory missing\n"
        exit
    fi
done

if [ -f dialog.TLK ]
then
    mv dialog.TLK dialog.tlk
fi

for f in $aRequiredFiles
do
    if [ -f $f ]
    then
        printf "PASSED: $f exists\n"
    else
        printf "FAILED: $f missing\n"
        exit
    fi
done

printf "\nFixing case\n\n"

if [ -f dialogF.TLK ]
then
    mv dialogF.TLK dialogf.tlk
fi

if [ -f texturepacks/xp2_gui.erf ]
then
    mv texturepacks/xp2_gui.erf texturepacks/XP2_GUI.erf
fi

for d in $aLCDirs
do
    if [ -d $d ]
    then
        printf "$d\n"
 
        cd $d

        for f in $(find . -name '*.*')
        do
            lcf=$(echo $f | tr [:upper:] [:lower:])
            if [ $f != $lcf ]
            then
           if [ -f $f ]
           then
               mv $f $(echo $f | tr [:upper:] [:lower:])
           fi
            fi
            printf .
        done

        cd ..

        printf "\n"
    fi
done

defIFS=$IFS
IFS='|'

if [ -d saves ]
then
    cd saves
    for d in $(find . -name '* - *' -type d -printf "%f|")
    do
        printf "saves/$d\n"

        cd "$d"

        if [ -f Portrait.tga ]
    then
        mv Portrait.tga portrait.tga
    fi

    if [ -f Screen.tga ]
    then
        mv Screen.tga screen.tga
    fi
   
   cd ..
    done
    cd ..
fi

IFS=$defIFS

printf "\nChecking for problem files\n\n"

for f in $aProblemFiles
do
    if [ -e $f ]
    then
        printf "WARNING: $f exists, deleting this file is recommended\n"
    fi
done

printf "\nChecking for permissions\n\n"

for f in $aWritables
do
    if [ -e $f ]
    then
        if [ -w $f ]
        then
            printf "PASSED: $f is writable\n"
        else
            printf "WARNING: $f is not writable\n"
        fi
    fi
done

if [ -w $(pwd) ]
then
   printf "PASSED: $(pwd) is writable\n"
else
   printf "WARNING: $(pwd) is not writable\n"
fi

printf "\nYou are ready to run Neverwinter Nights.\n\n"

User avatar
Booman
Level 4
Level 4
Posts: 478
Joined: Fri Feb 22, 2013 1:54 pm
Contact:

Re: Script To install Neverwinter Nights

Postby Booman » Tue Jun 21, 2016 1:15 pm

Very nice! Thanks for providing this script
Booman
Mint 18.2 64-bit
PlayOnLinux 4.2.12
PlayOnLinux GuidesTested Games List

Frimbleglim
Level 1
Level 1
Posts: 16
Joined: Fri Nov 27, 2015 11:47 am

Re: Script To install Neverwinter Nights

Postby Frimbleglim » Sun Feb 05, 2017 9:18 am

Update.

Works fine on 64 bit LinuxMint 18.1 too. Other libraries only need to be installed on other linux distributions.

Do NOT run as root or using sudo. I made this mistake and the game wouldn't run as it needed root privileges to access the files.

Ozzynl
Level 1
Level 1
Posts: 1
Joined: Tue Oct 31, 2017 1:23 pm

Re: Script To install Neverwinter Nights

Postby Ozzynl » Tue Oct 31, 2017 1:29 pm

Sadly the links for the game clients are dead. Does anyone have new once?


Return to “Gaming on Linux Mint”