Publish many games' stats output to web pages
Jul 10, '03 09:03:00AM
Contributed by: rossr
I found a program that analyzes the game log files from many popular first-person shooters - aestats. It produces HTML with charts, tables, and detailed frag information -- it appears the author got a job at Epic games coding the stats HTML export for Unreal Tournament 2003!. The author created OS X binaries, but the documentation is PC and Linux-centric, with no real help for the common Mac OS X user.
Here is a how to install aestats on Mac OS X. Prerequisites: Web Sharing (Apache) On, some basic terminal knowledge.
- Download the latest version of aestats from PlanetQuake.com -- I believe version 5.32 is the latest version that has working OS X binaries.
- Place the unzipped aestats folder in your Sites folder. You may want to rename it "aestats" for simplicity. The point is that ~/Sites/aestats/stats is web viewable; it is possible to place the folder elsewhere and have the HTML published to a web viewable location. View the aestats documentation for more info.
- Pop open the Terminal and copy the OS X binaries from the osX-Bin folder to /usr -> local -> bin:
cp ~/Sites/aestats/osX-Bin/preAEs /usr/local/bin/
cp ~/Sites/aestats/osX-Bin/AEstats /usr/local/bin/
- Copy your game log file from your game folder (In Quake 3 it is called "games.log" and in your baseq3 folder) to your logs folder in aestats. Paths may differ depending on game/mod, etc.
cp ~/Library/Application Support/Quake3/baseq3/games.log
~/Sites/aestats/logs
[Shown on two lines; enter as one with one space replacing the line break]
1
aestats first analyzes the log file and converts it to a meta-log format. It then uses the meta-log to create the HTML report.
- In the Terminal, cd to the aestats folder by typing cd ~/Sites/aestats/. You must be in the aestats folder when you perform the next two commands since the binaries rely on the relative location of the stats folder.
- Convert the game log file to a meta-log file. To run the binaries, you must use the full path (unless you alias them):
/usr/local/bin/preAEs -q3 logs/games.log
- Run AEstats on the meta-log file to produce HTML that shows game statistics. The HTML is produced in the stats folder.
/usr/local/bin/AEstats logs/games.mlg
- Pull up your web page and view your stats!
http://localhost/~username/aestats/stats/
Refer to the aestats documentation for more detailed instructions on personalizing the HTML and program settings.
There are other more advanced things you can do from here, such as create a ".command" sh file to automate this process, or set up a cron if you have a dedicated game server. I used a freeware app called Platypus to make an app that automates the process.
Comments (0)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030704183018193