Well, that didn't work right. The last test for Various Artists didn't seem to work right so I rewrote the script completely, using some new info I discovered. Now it works
$if2(%album artist%,%artist%)\[%date% - ]%album%\$ifgreater(%totaldiscs%,1,Disc %disc%\,)$ifequal(%album artist%,Various Artists,%track% - %artist% - %title%,%artist% - %track% - %title%)
Edit: Another edit... apparently $ifequal evaluates integers, not strings. I guess 2pac wasn't a good test subject. I think I have it now, although this one just tests if there is an album artist at all (Only my various artists albums have a album artist tag). I can't seem to figure out how to compare strings. I added a function to add the disc title, if it exists. This helps for albums such as Grand Theft Auto: Vice City where each CD has it's own name. The disc title is a APEv2 meta tag I made up myself.
$if2(%album artist%,%artist%)\[%date% - ]%album%\$ifgreater(%totaldiscs%,1,Disc %disc%[ - $meta(disctitle)]\,)$if($meta(album artist),%track% - %artist% - %title%,%artist% - %track% - %title%)