Archive for the ‘ Gaming ’ Category

Just a general update…

It’s been quite a while since I’ve posted  anything, I’ve been very busy lately but since I’m out sick now for a few days, I have a bit of time to update…

If you have tried to play Fallout 3 using an Asus branded NVidia card, and it crashes stating “Fallout 3 has stopped working” every time you try to load a new game, check and see if you have Asus Gamer OSD installed, if you do, get rid of it. Something the overlay does interferes with the game  and causes this to happen…

I have been doing some more work on the lighting for the man cave so I have some Python code that will pull the Average color (not the most predominant, yet, wont be hard, but I am lazy) so here it is, please keep in mind its not nice, fast or clean… for high res images it takes a few seconds to do its thing…

#!/usr/bin/env python
 
#
# PIL Image Module Handbook - http://www.pythonware.com/library/pil/handbook/image.htm
#
 
from PIL import Image
from optparse import OptionParser
 
def processImageAverage(imageFile):
    image = Image.open(imageFile)     #open the image for processing
    pixels = list(image.getdata())    #break the image down into a list of pixels, each pixel contains a list of red,green,blue
 
    totalpx = 0 #set some default values to start counting...
    redpx = 0
    greenpx = 0
    bluepx = 0
 
    for pixel in pixels:    #loop through the lists and build the values.
        totalpx += 1
        redpx += pixel[0]
        greenpx += pixel[1]
        bluepx += pixel[2]
 
    redavg = redpx / totalpx   #generate the averages
    greenavg = greenpx / totalpx
    blueavg = bluepx / totalpx
 
    print "\nTotal Pixels:\t", totalpx     #and write them out.
    print "Red Average:\t", redavg
    print "Green Average:\t", greenavg
    print "Blue Average:\t", blueavg
    print "HEX Color:\t#%x%x%x" % (redavg, greenavg, blueavg)
 
def main():
    parser = OptionParser("Usage: %prog source")
 
    (options, arguments) = parser.parse_args()
    if len(arguments) != 1:
        parser.error("Please specify a single input file.")
 
    processImageAverage(arguments[0])
 
if __name__ == "__main__":
    main()

I have a new job now, I’m no longer a software validation engineer (tester), I’m now an IT Support Engineer (IT Techie…) which is kinda nice….

Well… that is for now…

Teamspeak 3 server on Ubuntu

Well, Teamspeak have finally released their new server platform for a public BETA test, although supposedly in this state the code is not meant to be stable, it appears to be working quite well on my Ubuntu server here at home. This is what I done to get it up and running – as a service from init.d no less. Before doing any of the following steps, please be aware that this IS BETA code and WILL contain bugs that may introduce security issues. The first step is to create a user that the Teamspeak executable can run as, this user should have a complex password for security reasons. This user will also not require a shell account.

sudo adduser teamspeak

Fill in the questions presented by the adduser application.

sudo usermod -s /bin/false teamspeak

The above command will change the users shell to be /bin/false ie. no shell. Now it is time to go and get Teamspeak… visit http://www.goteamspeak.com and find the correct package for the architecture you wish to use ie. Teamspeak_3.0.0-Beta5-32bit…

wget http://ftp.4players.de/pub/hosted/ts3/releases/beta-5/teamspeak3-server_linux-x86-3.0.0-beta5.tar.gz tar -zxvf teamspeak3-server_linux-x86-3.0.0-beta5.tar.gz

Now its time to move the new TS3 directory to its new home…

sudo mv ./teamspeak3-server_linux-x86-3.0.0-beta5 /opt/TS3 sudo chown -R teamspeak /opt/TS3

The above will place TS3 in /opt/TS3 and give ownership of the contents to the user teamspeak. It is now possible to run Teamspeak, however as veteran Teamspeak users will know, the first time you run the Teamspeak server you are presented with a username/password combo that cannot be recovered without resetting the server. In TS3 you will also be presented with a `token` (all of this is described in the Teamspeak documentation). So for the first run, the following command will allow you to gather these details, they should be noted carefully for future reference.

sudo start-stop-daemon –chuid teamspeak –chdir /opt/TS3 –start –exec /opt/TS3/ts3server_linux_x86

From this, you should see the serveradmin user and password. You can now ^C that and be returned to the normal shell, if you cat /opt/TS3/logs/* you will be presented with the token you require to obtain server-admin status on the new server. The last part is to create a script for /etc/init.d/ to launch Teamspeak each time the system is booted to the correct runlevel. /etc/init.d/skeleton provides a suitable framework for this, here is the script I am using, just about… NOTE: WordPress does not want to format this correctly for me, as such, here is a link to the file in a tar archive. If you follow these instructions and are running a 32bit server, the following file will work out of the box. /etc/init.d/teamspeak This file must then be made executable with

sudo chmod +x /etc/init.d/teamspeak

And finally, the init file must be symlinked to each of the runlevel start dirs using the following…

sudo ln -s ../init.d/teamspeak /etc/rc0.d/K21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc1.d/K21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc2.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc3.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc4.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc5.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc6.d/K21teamspeak

Viola, you should now have a working Teamspeak 3 server.

BOOTNOTE:

For my initial install, and for the basis of the majority of this, I used this as a reference. Items listed in bold with ** are most likely not the correct file names for the command, I am not close to my server or an available shell to pull the correct parameters at present, but I will update ASAP. As an additional side note, my first impressions of TS3 are very good… It has tons of new features, looks good and the voice quality is very good indeed. My only concern is however the permissions system is very bulky, difficult to understand, and unless you are reasonably familiar with administering a Teamspeak server already, the documentation is not as straight forward as people believe. Still, however, a great job. Well done Teamspeak 3 development team!

UPDATE: Fixed formatting issue, kinda… provided link to pastebin.

UPDATE: Fixed information regarding server executable. Added /etc/init.d/teamspeak file, available for download here, removed pastebin link.

#! /bin/sh
### BEGIN INIT INFO
# Provides:          teamspeak
# Required-Start:    networking
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: TeamSpeak Server Daemon
# Description:       Starts/Stops/Restarts the TeamSpeak Server Daemon
### END INIT INFO

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamSpeak Server"
NAME=teamspeak
USER=teamspeak
DIR=/opt/tss2_rc2
DAEMON=$DIR/server_linux
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

d_start() {
        start-stop-daemon --start --quiet \
                --chuid $USER \
                --chdir $DIR \
                --exec $DAEMON \
                > /dev/null \
                || echo -n " already running"
}

d_stop() {
        start-stop-daemon --stop --quiet \
                --chuid $USER \
                --chdir $DIR \
                --exec $DAEMON \
                || echo -n " not running"
}

case "$1" in
  start)
        echo -n "Starting $DESC: $NAME"
        d_start
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME"
        d_stop
        echo "."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: $NAME"
        d_stop
        sleep 15
        d_start
        echo "."
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 3
        ;;
esac

exit 0

Getting Manhunt to run in Windows Vista

RockStar Manhunt

Many people have tried to run Manhunt on Windows Vista but without any luck, through a fair ammount of Googling in the past, I came across this fix…

Step 1:
Download XVI32 from http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

Step 2:
Back up your manhunt.exe file

Step 3:
Open manhunt.exe in XVI32

Step 4:
From the addreess tab at the top, select “Goto”
Select the hexedecimal option and set the go mode to “Absolute”

Step 5:
In the Goto box, enter in 08DE

Step 6:
If all above went well, you should see a box highlighted containing 6A,
modify this so that it says 2A.

Step 7:
Save the file and exit the editor.

Step 8:
Play.

Thanks to Sonnilivo for the great information relating to this!

Roll your Own: CS:S Server (Part 3)

Ok, so from Part 1 and Part 2, you should now have a working Counter-Strike:Source server up and running, with Mani-Admin for your administration. Here is how to get MetaMod Source installed… this is going to be a really simple quick one to go on…

# cd /<yourserver>/cstrike/addons
# wget http://sourcemod.steamfriends.com/files/mmsource-1.7.1.tar.gz
# tar -zxvf mmsource-1.7.1.tar.gz
# rm mmsource-1.7.1.tar.gz

Ok, now we have MetaMod downloaded and extracted into the correct directory, last thing we need to do is create a VDF file to load it, MetaMod have a great VDF generator here or you can do the following…

# touch metamod.vdf
# pico metamod.vdf

Once in pico, paste the following text in ([shift]+[insert]), save with [ctrl]+o and exit with [ctrl]+x

“Plugin”
{
“file” “../cstrike/addons/metamod/bin/server_i486.so”
}

You can now restart your server and double check that MetaMod is running by typing “meta version” into the console. All done!

Roll your Own: CS:S Server (Part 2)

Ok, so from the last section of this you should have a working Counter-Strike:Source server up and running, just to make this a little bit easier on the admins, now we’re going to install Mani Admin Plugin. The first thing your going to need is Mani Admin Plugin it’s self…

# wget http://www.mani-admin-plugin.com/mani_admin_plugin/v1_2_beta_s/mani_admin_plugin_v1_2_beta_s.zip
# unzip mani_admin_plugin_v1_2_beta_s.zip

Once that’s done, you can move the files from the newly extracted directory to your ./<server>/cstrike directory as follows

# mv -R addons /<yourserver>/cstrike
# mv -R cfg/<yourserver>/cstrike
# mv -R materials/<yourserver>/cstrike
# mv -R sound /<yourserver>/cstrike

The next step is to add “exec mani_server.cfg” into your own server.cfg

# echo “exec mani_server.cfg >> /yourserver/cstrike/cfg/server.cfg”

Finally, we need to get mani running as an addon each time your server starts, the best way to do this is to create a mani_admin_plugin.vdf in /yourserver/cstrike/addons and add the following text to it.

“Plugin”
{
“file” “../cstrike/addons/mani_admin_plugin”
}

Mani should now be installed and running, the final steps is to add yourself to the /yourserver/cstrike/cfg/mani_admin_plugin/clients.txt file, this however I will not cover. All of the information on how to do this, in various different ways is available here.

Just so you know, I am currently working on a script that will allow for the automatic installation of ANY of the linux based Steam game servers just by answering a few questions. I’ll keep you posted on my progress with this.

Custom CS:S Knife Skin

I got a bit bored and wanted to read up on skinning so I have created this very basic custom CS:S skin, personally, I think its awesome :p

You can download it here.

knife_t-copy