The General
Banned
- Messages
- 5,191
Okay I wrote a patch selecting script for ET, but first you need to install XQF. For Ubuntu just apt-get install xqf, I dunno about other distros, just get build from source.
Create a script /usr/bin/patchselector and put this in it:
Then chmod +x it, to make it executable, make sure /usr/bin is in your $PATH (echo $PATH) it should be, unless you took it out. Then you need to install all 4 versions of ET, and apply the patches to the appropriate ones, make sure the names are as follows:
/usr/games/enemy-territory-2.55
/usr/games/enemy-territory-2.56
/usr/games/enemy-territory-2.60
/usr/games/enemy-territory-2.60b
Then run XQF, and go to Preferences > Games and click on Enemy Territory, set the command line to /usr/bin/patchselector
Once you've done all that, find a server using XQF and when you hit Connect, it will automatically load the appropriate patch.
Create a script /usr/bin/patchselector and put this in it:
Code:
#!/bin/bash
ET_BASEPATH=/usr/games
# quakestat bin on debian. On other distro it's seems to be 'qstat'
QUAKESTAT_BIN=quakestat
VERSION=`$QUAKESTAT_BIN -R -rws $2 | tail -n1 | sed "s/.*version=\(.*\)/\1/" | cut -f1 -d,`
MOD_VERSION=`$QUAKESTAT_BIN -R -rws $2 | tail -n1 | sed "s/.*mod_version=\(.*\)/\1/" | cut -f1 -d,`
# etpro don't allow any game version for a specific etpro version
if [ "$MOD_VERSION" == "3.2.4" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60
elif [ "$MOD_VERSION" == "3.2.5" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60
elif [ "$MOD_VERSION" == "3.2.6" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60b
# Normal servers
elif [ "$VERSION" == "ET 2.55 linux-i386 May 27 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.55
elif [ "$VERSION" == "ET 2.55 win-x86 May 27 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.55
elif [ "$VERSION" == "ET 2.55 linux-i386 Jun 24 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.55
elif [ "$VERSION" == "ET 2.55 win-x86 Jun 24 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.55
elif [ "$VERSION" == "ET 2.56 linux-i386 Sep 10 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.56
elif [ "$VERSION" == "ET 2.56 win-x86 Sep 5 2003" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.56
elif [ "$VERSION" == "ET 2.60 linux-i386 Mar 10 2005" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60
elif [ "$VERSION" == "ET 2.60 win-x86 Mar 10 2005" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60
elif [ "$VERSION" == "ET 2.60b linux-i386 May 8 2006" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60b
elif [ "$VERSION" == "ET 2.60b win-x86 May 8 2006" ]; then
ET_PATH=$ET_BASEPATH/enemy-territory-2.60b
else
xmessage -center "Error: you're a hipster doofus, go read the instructions again. Unknown version: [$VERSION]"
exit 1
fi
cd $ET_PATH
./et.x86 \
+set r_fullscreen 1 \
+set r_mode -1 $* #this is for custom resolutions if you want
/usr/games/enemy-territory-2.55
/usr/games/enemy-territory-2.56
/usr/games/enemy-territory-2.60
/usr/games/enemy-territory-2.60b
Then run XQF, and go to Preferences > Games and click on Enemy Territory, set the command line to /usr/bin/patchselector
Once you've done all that, find a server using XQF and when you hit Connect, it will automatically load the appropriate patch.