Sunday, September 07, 2008

WoW Multiboxing Setup

I have been playing World of Warcraft quite a bit lately. In fact, I've been multiboxing--playing with five characters at a time. Yea, I know this makes me quite the nerd.

Luckily, I can do all this with one computer, unlike the old days when multiboxing could only be done with several computers. My system has an AMD Athlon X2 64 Dual 4800+ processor with 2GB of RAM and a striped volume set up using two hard drives and the Windows Disk Management utility. My video card is an NVIDIA GeForce 8800 GT with 512MB of RAM, and I have a 21" LCD screen running at 1680x1050.

This setup easily runs 5 instances of WoW with the main instance at full graphics settings and the four other instances at minimum graphics settings. However, things start to lag a little bit in crowded areas, especially Orgrimmar, because my memory usage spikes to over 2GB. Another GB of ram would make my system ideal for 5-boxing.

Before I go into key broadcasting software, I'd like to share a couple tips you can use to make your five characters look super-coordinated. First is chain follow. Set up a macro on your second character to follow your first character, one on your third character to follow your second character, etc. Now you can run through populated areas with your long chain of characters so everyone can see just how many they are. This is much better than having them all lumped together right behind your main.

Second, when you are just standing around, you don't want all your secondaries in a big lump standing behind your main. So, here's what you can do. Designate a key (I use the up arrow key, but you might want to use something like F12) for positioning. On your main, leave this key unbound. On your secondary, bind it to strafe left; on your third, bind it to strafe right; on your fourth, bind it to forward; and on your fifth, bind it to backward. Now, you can press your positioning key to have all your characters fan out. Move your main into the middle of the formation and you have an escort.

Now, on to key broadcasting software. I started out using Octopus for key broadcasting and instance management, but it lacks a few features I wanted such as round-robin broadcasting and 'hotstrings.' I know I can set up a round-robin system using castsequence, but this prevents me from using /stopcasting in the macro to get immediate heals. Sadly, I just found out that Octopus is no longer in development.

A few days ago I bought a license for Keyclone. The only thing I can't do with Keyclone that I could do with Octopus is assign F1-F5 to my instances to switch between them. I can do something similar with the maximizer in Keyclone, but I want all my instances to be full screen. Maybe there's a way to do this and I just haven't figure it out yet. --Update: This is possible by creating a bunch of full-screen regions, but maximizer is screwy with widescreen resolutions and wants to just stretch 800x600.

The feature I love most about Keyclone is the hotstrings feature. Using a clever setup, I can play from any of my instances at any time and all my characters will automatically assist the active instance. This is done without using focus or having to keep a target. It took me some trial and error to get it to work right, so in addition to the link above I'll let you know what exactly worked for me.

The first complicated part is setting up a whole crapload of hotstrings. You have to have five hotstrings per instance per macro. To save you this headache, you can download my keymap files here. Unzip those files to your keyclone directory and assign them to each of your 5 WoW instances. You'll need to bind the following keys in WoW to some action bars (I used slots 1-6 on action bar 6):

[ ] ; ' , .
Next, you need some macros with complicated targetting based on which modifier keys are being held down. The example macros in the link above are longer than 255 characters and a pain to get working, so here is a shorter macro that works just as well:
/target [mod:ctrl,mod:alt,mod:shift,target=Character4] [mod:ctrl,mod:shift,target=Character1] [mod:ctrl,mod:alt,target=Character2] [mod:alt,mod:shift,target=Character3] [mod:ctrl,target=Character5]
/cast [target=targettarget] Lightning Bolt
/targetlasttarget
This macro is actually three lines, so make sure you move all the "[mod:...]" parts onto the first line, separated by spaces.

This should be all you need to get the setup to work. If you have any problems, please post to the dual-boxing forums.

Next, I'd like to explain what settings I use for my WoW instances. Like I said before, I run my main instance at full graphics settings and the other four at the lowest settings. The easiest way to do this is to have two copies of WoW, the first one for your main instance and the second one for your other four instances. This wastes a lot of space though, because you have two copies of the Data directory, one in each WoW directory. I have a better solution.

In Linux, you can create links to files and folders. This means you could have a directory called "Bush" with a bunch of incriminating documents, and you could create an alias called "scumbag" to point to the "Bush" directory without copying all the files. Lucky for us, there's also a way to do this in Windows.

First, download the program Junction and extract it to your Windows directory. Next, create a new directory called World of Warcraft2 or something of your choosing. This will be the installation for your other four instances. Now, you need to copy everything in your original WoW folder EXCEPT the Data, Screenshots, Patches, and Logs directories into your new WoW directory. Delete the Accounts under WTF in your new WoW directory (because we're going to create a link for it also).

Now, open a command prompt (Start, Run, type in cmd). Go to your new WoW directory (for example, type cd "C:\Program Files\World of Warcraft2"). Type junction Data "C:\Program Files\World of Warcraft\Data" and then "junction WTF\Accounts "C:\Program Files\World of Warcraft\WTF\Accounts" and you're all set! Launch WoW from your original installation for your main instance and from the secondary installation for the other four instances. Configure the other four with the lowest graphics settings you can stand.

Finally, a few tips for leveling up. First of all, as you may have already heard, avoid collection quests! Unless you are just collecting one item for each character, that is. Otherwise it's rather inefficient. Finish all the "kill X number of Y" quests in your starting area, then move to the low-level area. If you finish all the good quests there, you can always move to another faction's starting area. For example, I usually do the quests in Durotar and Brill, then Crossroads and The Sepulcher.

Wow, that was a pretty long article. Thanks for reading!

P.S. I am developing a program to manage WoW macros, with multiboxing support. This will make it easier to copy the same macro across all your characters. Post your contact details in a comment if you are interested in trying out a beta.

Run Linux applications natively under Windows

I hate Windows, it sucks. As I say, failure is not an option--it comes bundled with Windows! However, the embarassing truth is that I need it. I can't live without Photoshop and World of Warcraft, and I don't care to try getting them to run on Linux. Additionally, my job requires me to have some form of Linux for the software development environment we use.

I've tried several solutions that would let me utilize Linux and Windows on the same computer, including VMWare, dual-booting the old fashion way, and dual-booting with a wubi-based Ubuntu installation. It's always a pain in the butt and my wireless drivers just don't work right under Linux, so my search for something better never ended.

The solution is a brilliant software package that lets you run Linux applications in Windows without a virtual machine, and it's called andLinux.

AndLinux is a complete Ubuntu Linux installation that runs seamlessly on Windows. This is made possible using the native Windows port of the Linux kernel, coLinux. It's not perfect yet though, so I'd like to shed some light on a few nifty bits of information I have found.

First of all, I installed the lite xfce4 based version. You may be tempted to download the KDE version because it sounds more familar, but wait--it's five times larger and you can do everything you need with the lite version.

After the installation and reboot, you should see a little yin yang icon in your system tray. You can click on this to get a meager list of applications to run on your new Linux-in-Windows installation. This will hardly do. Install an application you want to use (I like gedit) with the Synaptic package manager, and then I will show you how to add it to the menu.

You need to edit C:\Program Files\andLinux\Launcher\menu.txt to change the shortcuts available on the andLinux Menu. Here is a sample and the format:

Root Terminal;xfce4_terminal.ico;xfce4-terminal
<shortcut name>;<icon file>;<linux command>
It's pretty simple. I added a shortcut for gedit (Gnome's Text Editor) by putting:
gedit;xfce4_terminal.ico;gedit
Yea, I know i used the terminal icon. I'm too lazy to go find a decent icon to use.

One of the first big issues I encountered was drive size. My installation defaulted to a size of 2GB, and I need much, much more than that. In order to make your andLinux drive larger, you must perform two steps. The first step is enlarging the container file for the drive, and the second step is enlarging the filesystem to use the whole container.

To enlarge the container, unzip the file C:\Program Files\andLinux\
ImageResizeTool.zip, and run the toporesize.bat file. Select your disk drive image, which should be at C:\Program Files\andLinux\Drives\base.drv, and click 'resize file.' Something should happen, and if you get an error message at the end of the process, don't worry just yet.

Next you'll probably have to resize the filesystem to fit the container. Open a Linux terminal from your nifty yin-yang andLinux Menu in the system tray, and type the following commands:
dfree -h
apt-get install ext2online
ext2online /dev/cobd0
dfree -h
You should be all set! -- Update: when I tried to increase my drive size to 20GB, I found out that ext2online has some limitations. If you run into problems when you run ext2online, try the following after increasing the image file size using toporesize. Copy andLinux\Drives\base.drv to base1.drv. Edit andLinux\settings.txt and add cobd2=Drives\base1.drv. Restart andLinux and type ext2resize /dev/cobd2. Shutdown andLinux and move base.drv to base.drv.old. Move base1.drv to base.drv, remove the cobd2 line from settings.txt, and then start andLinux. Voila!

Now you may have noticed when you opened a terminal that it is a root terminal. It's not a good idea to leave it this way--you should create a normal user to do everything except administration tasks. You can find a guide to doing this on the andLinux wiki at http://andlinux.org/wiki/index.php5?title=Quick_Tips#create_a_normal_user.

One of the steps created problems for me, and that was the editing of the /usr/bin/startwindowsterminalsession file. Instead of editing this file, I changed all my shortcuts to start up under my user account. You can start an application under a specific user by adding 'sux - <user>' before the command. Therefore, my command to start gedit is 'sux - jbarton gedit.'

Changing the data directory for MySQL in Ubuntu

There have been several occasions where I wanted to change my MySQL data directory. First it was to run multiple instances of MySQL, which I gave up on. Then I bought an external drive to save my development environment, including my source code and the MySQL data directory, so I could develop from any machine at work or home. Both times I kept running into problems getting such a seemingly simple configuration change to work properly.

I thought it would be rather easy. One way to do it is by changing the MySQL configuration in /etc/mysql/my.cnf, but I wanted to make it easier for other developers to use the local MySQL database. So instead I created a directory for MySQL data on my external drive, then issued the following commands to create a symbolic link from /var/lib/mysql to that location:
cd /var/lib
sudo mv mysql mysql2
sudo ln -s /mnt/jbarton/mysql /var/lib/mysql
Of course, I was greeted with several nasty error messages any time I tried to start MySQL or initialize the new data directory (either directly or through the symbolic link). Here are some of the complaints I found in the logs:
[Warning] Can't create test file /srv/mysql/hostname.lower-test

kernel: [ 82.391726] audit(1210139515.249:2): type=1503 operation="inode_create" requested_mask="w::" denied_mask="w::" name="/var/lib/mysql2/hostname-linux.lower-test" pid=5888 profile="/usr/sbin/mysqld" namespace="default"

InnoDB: Error: unable to create temporary file; errno: 13

kernel: [ 82.508111] audit(1210139515.369:5): type=1503 operation="inode_mknod" requested_mask="w::" denied_mask="w::" name="/var/run/mysqld/mysqld.sock" pid=5888 profile="/usr/sbin/mysqld" namespace="default"

[ERROR] Can't start server : Bind on unix socket: Permission denied

[ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?

[ERROR] Aborting

[Note] /usr/sbin/mysqld: Shutdown complete

mysqld_safe[5892]: ended
After several failed searches on Google to figure out the problem, I finally found the solution. The culprit is AppArmor, a security framework now default in Ubuntu that is supposed to be easy to use. I would say that it is a big pain in the ass, and not very user-friendly. There was nothing in my syslog around the nasty MySQL and kernel error messages that even hinted at AppArmor.

Once you know AppArmor is the problem, the fix is very easy. You simply edit /etc/apparmor.d/usr.sbin.mysqld. Underneath the two lines authorizing the default MySQL data directories, add two more with your custom directory. Make sure you have a trailing / on the directory name, otherwise it will not work (I had this problem at first). After this change, restart AppArmor:
sudo invoke-rc.d apparmor restart
Now you should be able to set up the new directory as a MySQL data directory and initialize it using mysql_install_db. For more information on this topic, check out the following links:

AppArmor - Ubuntu Wiki
The Brainwrecked Tech had the same problem
Ubuntu bug #201799
A thread on the Ubuntu forums with the solution

Creating a mobile development environment in Ubuntu

This article was written specifically for a development environment on Ubuntu using MySQL.

I can work from home whenever I want, though it's usually better for me to limit myself to working at home after hours. This creates a problem with keeping my work in sync. I've always assumed the best way to handle this was to carry a laptop around. However, this keeps me from taking advantage of our kickass development machines at work that have two screens.

Just the other day I decided to ask the boss for a new laptop. He said we could talk about it soon, and I was satisfied. Then I had an idea. I could just get an external hard drive and keep my work on it, so I could then just carry it back and forth between work and home. Much cheaper than a new laptop, and I could develop on my home machine or one of the well-equipped machines at work. So I jumped on NewEgg and started looking at my options.

My requirements were an external hard drive, one that is small, runs on USB power, and is manufactured by a reliable company such as Western Digital. I found the Western Digital My Passport external hard drive to be perfect. Doing a quick check on Best Buy's site revealed their price was the same as NewEgg's, so I went to Best Buy and bought it.

Now, if you are working with sensitive data, you'll probably want to encrypt your drive. I found this to be easiest using TrueCrypt. It's easy to set up on Windows and Linux, and the performance is good with the external hard drive I bought, under certain configurations. Let me explain what I mean by "certain configurations."

You'll want to encrypt the entire device and NOT set up an encrypted file container. If you insist on having some space you can access from Windows, you can set up two partitions and encrypt one of them. The reason for encrypting the device or a partition is performance. I tried both ways and noticed a large difference in performance, especially when working with smaller files (like in a large Subversion repo).

Don't try to get fancy with TrueCrypt. Use the AES algorithm, a password and a keyfile. You should probably e-mail to yourself the keyfile so you never lose it. You do use GMail, right?

Make sure you choose 'None' as your filesystem when you encrypt your device or partition, because you don't want to use FAT. Then you can mount the TrueCrypt device without trying to mount the filesystem (since you dont have one yet). There's an option for it in the mount dialog. After mounting the device you'll want to create a ReiserFS filesystem on the corresponding TrueCrypt device (usually /dev/mapper/truecrypt1, you can right-click the mount entry in TrueCrypt to find out).

You might want to check out my article on changing the data directory in MySQL and read about ReiserFS in my article about tweaks for Ubuntu (in progress). I'm not going to go into further excruciating detail filling in the blanks to create this setup. If you can't figure it out, then that precludes you from being a software developer.

So far this setup has been working very well. I just shut down MySQL, unmount the TrueCrypt volume, unplug the drive, and go on my merry way. When I arrive at my destination computer, I plug in the drive, mount it with TrueCrypt, make sure MySQL is configured to point its data directory to the drive, and start MySQL.

I'm interested if anyone has tried doing something like this and what their experience was. I will add more information to this article if I get a lot of comments about something in particular.

How World of Warcraft idiots interact with multiboxers

This article is a little off from the theme of my blog. I didn't really search for anything, except maybe intelligent players in WoW. You can read some of the responses on the Dual-Boxing Forums and the Official WoW Forums.

The Problem

Unfortunately, World of Warcraft is full of immature idiots and spoiled children. In spite of all the intelligent, considerate players in the game, they really start to come out of the woodwork when something unusual is going on. Like another player who is multiboxing. Any time I go to a populated area I am constantly harassed by these like. Here are some of the common types of idiots I interact with as a multiboxer.

The Genius

This player knows you're doing something wrong and breaking the rules, and they're going to tell you about it. It's cheating, botting, or some other offensive abomination of gameplay. When I first started to get these idiots, I would try to educate them about the legitimacy of multiboxing.

However, I have never been able to get anything across to them. So now to handle these geniuses, I simply tell them to report me if they are so damn smart. I wish I could watch their conversations with the GM.

The Pest

This is the one that irritates me the most. This is the player that follows you and either says incoherent gibberish or puts you on autofollow and won't go away. They say stupid things like "wat ur doing????????????????LOL" and such.

I had the worst encounter once in Durotar with a hunter who put me on autofollow. Any time I would go to attack something, he would try to attack it first to steal it from me. I had to employ some misdirection and instant spells to get my kills. Eventually he got bored and left.

The Buffer

This one isn't so bad, but after running into 2-3 of them in a row it gets annoying. This one thinks you definitely need their buffs, so they follow you until they have buffed every one of your characters. This happens to everyone though, not just multiboxers.

The Excessively Amused

I think this is the second most irritating type. This is the player who just thinks what you are doing is the most hilarious thing they have ever seen. They come up and say things like "LOL," "HAHAHA," or some similar emote. I try asking them what is so funny, but they can't really give me a good answer. Five players in a group is not funny!

I had one today who came up and laughed at me and then ran away. I asked what was so funny and he said "are you kidding?" No, I'm not telling a joke. In fact, I haven't done anything funny yet, so stop laughing!

The Hater

This player hates you and everything about multiboxing. They spit at you, fart on you, and tell you that you're a loser. I don't know what their problem is, but it probably has something to do with either losing to a multiboxer in the battlegrounds or being so poor they can't afford more WoW accounts to multibox themselves. Or they are too dumb to do it.

Yesterday I was in Orgrimmar with several level 70's around me reinforcing each others hatred for multiboxers. It was a rather harsh environment, but I just merrily danced with them and avoided responding to their incendiary comments.

The Poor Child

You know, $75 a month for five accounts is really not a lot of money. I think a lot of people probably spend more on their cell phone. However, there are these poor children in World of Warcraft who are on an allowance and think you are some spoiled rich kid who gets everything in the world, including five WoW accounts. No thank you, I have a full-time job and $75 is next to nothing for me to afford. Ask your mommy to raise your allowance.

The Exception

These are the players I love to interact with. They come up and ask intelligent questions if they are not familiar with multiboxing, or they strike up an interesting conversation if they know more about it.

These players are nice, curious, and mature, and I wish they were more plentiful. I've had conversations about different multiboxing strategies, received intelligent questions about how to do it and how to get more information, and just chit-chatted about random other things not related to multiboxing. Thanks for making the game worth playing.

What are some of the most annoying experiences you have while multiboxing?