Using Stats of Terror
Stats of Terror is a program used to monitor ingame messages and generate statistics for a round of Urban Terror. It’s been around since 2002, but saw little use. Its operating is quite simple, if a little finicky, but the .html statistics pages it generates are a great addition to any clan’s site, or even for a personal scores page. This guide will teach you how to use it, and avoid many of the inherent bugs.
Stats of Terror can be downloaded here:
http://www.urbanterrorhd.info/sot/sot.rar
Extract the contained directory with WinRAR (www.rarlab.com). There is no installation necessary. Just double click sotbeta09.exe and the program will load. It works on all versions of Windows (tested on XP and Vista 64). The author went MIA a long time ago, so there will probably never be a Linux or OS X version.
The main window of SOT has four buttons: Monitor Q3 Console, Load Game, Parse Log File, and Player Profile. We’re mostly interested with the first option, as it is all that is necessary to generate stats from a .dm_68 demo file. Parse Log File does not seem to function correctly, at least with Urban Terror 4.1; Stats of Terror was initially designed for version 2.5, so it is likely the .log file format has changed since then. Player Profile is used for generating ongoing stats from “live” games, where SOT monitors in real time. This will not be covered since it’s buggy and won’t be particularly hard to figure out once you’ve read this guide.
Generating Statistics from Demo Files
Click Monitor Q3 Console. You will be taken to a screen with several check boxes. It is not necessary to alter anything on this screen, and I don’t advise doing so, as it will only create additional messages in the console, which as I will discuss in a minute, is counter-productive. Press OK and load Urban Terror.
Once loaded, pull down the console (~) and type /cg_showbullethits 0. This disables hit messages, which only create unnecessary console messages. Furthermore, when hit messages are enabled, false player entries will be generated, and they will have to be removed after. Better to avoid this altogether. Now click the Demos button to access recorded demos. Select the demo you want to analyze and press Play.
Once the demo is over (or you stop the playback), close Urban Terror. SOT should detect that Urban Terror was closed, and popup a dialog asking whether you want to see the stats. Press cancel to see the stats. On the stats window, press Menu, then Export to HTML. Remove all the boxes besides the first two. Click Save. If you do not choose the default filename, you will have to append .html to the end of your chosen file name. I said the program had weird bugs.:)
Timescale
You may be wondering whether timescale can be used. Yes it can, but with the potential for inaccurate stats. Timescale 1 offers the best accuracy. Values up to timescale 3 will usually give you accurate stats. I also tested higher values: 5, 10, 25, and 50.
/timescale 5 resulted in 6 deviations compared with /timescale 1.
/timescale 10 resulted in 7 deviations.
/timescale 25 resulted in 4 deviations, but one of those was deviations was 2 points off.
/timescale 50 resulted in over 10 deviations, all of which were at least 2 points off; some as high as 8.
6 or 7 deviations may seem like a lot, but it really is not significant when you’re talking about high 30s and low 40s numbers. Even /timescale 25 is not bad, considering that playback of an entire 25 minute takes only 1 minute. If I had a stack of demos to generate stats for, I think the tradeoff of a few inaccurate (but still representative of the player’s performance) entries is acceptable. I did not notice any correlation between errors and the timescale value between 3 and 25. I think this is because the errors only occur in large firefights which generate more console output than the SOT program can record per “sweep.” SOT appears to work by scanning the console for messages every so often (probably around 1-2 seconds). Thus in an average game, where there will only be a few such firefights, /timescale 25 does not speed the game up enough to constantly outpace SOT. This is further supported by the fact that the same players (thus those with kills during the firefights) who had inaccurate stats with /timescale 5 and 10, also had inaccurate stats with /timescale 25. A demo of a slow game can thus be analyzed with relative accuracy at high timescale values (10-25), while a faster game (with more chances for big firefights) might require lower values. /timescale 3 appears to produce accurate stats even in the most intense games; and it’s still 3 times faster than normal playback!
Cliffs: if you want accurate stats, use /timescale 3. If you want to get stats done quickly, use up to /timescale 25. Faster-paced games are less tolerant of high timescale values.
Preparing the .html Output for Publishing
Although SOT takes care of arranging the data in a table, it doesn’t always do a perfect job. There are two things that you will want to deal with. Open up the generated .html file in Notepad. Do not use an HTML editor, as they often insert their own code. At the top, look for the string “my Urban Terror stats,” and change this to a more descriptive title if you want. Although you can change this in the Export .html menu in SOT, I prefer to do it here as it’s easier when handling multiple files. Everything between <h2><font face=”tahoma, Arial, Helvetica, sans-serif”> and </font></h2> can be changed, but if you’re unsure of what you’re doing, leave the HTML code alone.
The second thing you’ll have to correct is flag colors. Usually there will be a few gray flags for some reason. These have to be changed to their proper colors, otherwise it looks like crap. If you’re handling stats from a clan match, this is easy because you can just set the gray players’ flags to the same color as the rest of their teammates. If you’re dealing with pub stats, though, it’s not so easy because SOT sorts players by alphabetical order. Your best bet is to pull up the autoscreenshot taken from the game the demo is of. If you don’t have one but having proper flag colors is important, you can rewatch the demo and timescale through until the end, then grab a screenshot. Remember to revert to timescale 1 before the end, or you’ll blast through the end-of-round pause! To fix the flag color, search for the string “grayflag.bmp” using Edit -> Find. The player’s name should be on the same or next lower line depending on Notepad’s window size and whether wordwrap is enabled or not. Change gray to red or blue depending on what color the flag should be.
If you forgot to disable weapon hits from being displayed, you’ll have another problem: fake players in the form of “[playername] for 51% damage” and such. It’s pretty easy to remove these, but because it’s impossible to tell whether they resulted from kills or deaths, stats will be inaccurate. Still, they have to come out.
You need to look at the blocks of text bordered by <tr bgcolor=”#333333″> and </tr>. Look for the ones with all zeros and “perfect” listed about half way down. They’ll also be headed by the “[playername] for x% damage” text, have a gray flag, and will always be on the opposing team (relative to the demo’s POV player). Select all the text between, and including, <tr bgcolor=”#333333″> and </tr>. Delete it. This removes the table row with the offending data. Screenshots:

Now that you’ve got the .html file cleaned up, it’s time for hosting. Upload it to a webhost along with the redflag.bmp, blueflag.bmp, and grayflag.bmp files (you only need one copy of these no matter how many stats files you upload). You will now be able to view it from your browser!
Related posts:
- Urban Terror Aim Settings Basics This is a long awaited post. There are a few variables that you can use to improve your mouse precision besides sensitivity. These variables can really help, in conjuntion with a good mouse to improve your aim skills. Today we are going to take a look just at the basics, since the topic is really [...]...
- Cool and useful console commands The console can be an incredibly useful tool that can not only help you access functions you can't access through the GUI, but also has some pretty neat and cool features. Let's take a look at some of them!...
- Urban Terror Cheats – What to do if you spot one Though most of the people in Urban Terror play fair, there’s always the possibility of a cheater joining a game and ruining everything. For example I once played a round of TS, where a cheater went afk and in order to win, we had to kill him. He had an aimbot activated and that basically [...]...

[...] Original post: Timescale [...]
Really good advice. But: Damns I’m a MacUser….
anyone has got the source codes of this program? the program is really great, and must improve definitely.
sweet forgot i had that notriot account…drunk.
yes source code is available i forget where i got it from. ill repost if needed. already looking into addons.
correction: i am working with code branched from Andrey ‘[SkulleR]‘ Nazarov. shrug.
Nice…..!!!
I wish they had a linux version…
@Don hey! is this only for CTF? can’t we use it for making output of TS or BOMB mode????
Yeah you can use it for other gametypes, but it’s best for CTF since CTF scores are so messed.
thansksfor the effrort
do not want. the game can write, so conversely ready demos
we tried same log regex parsing to starts in aq2
pleaseforward all flame mail to the 400 frozen sand devs
Wow.. I really didn’t understand what that does! lol
It generates HTML stats of bullet hits? lol
Oh I got it, it’s a cool program
Found urbanterror personal stats (http://man.unice.net/Works/UTPStat/faq.html) which seems helpful
From the FAQ — generate the log
* add parameters to the ioURT executable (or change your cfg file) with the parmenters +seta logfile 3 +seta g_loghits 1
” ** where logfile value can be :
0 :No log will be generated. Forget this value in our case.
1 :buffered logging, the log file is only updated when the text buffer fills up (this ones more for server admins i think). the log file will be overwritten the next time you start up quake 3.
2 :same as 1 but without that business with the text buffer.
3 :continous logging. the log file will be appended to every time you start up quake. this is the best option but needs checking (go to the folder and check the filesize) every now and again because it can become a real bloater.. ” — from site FAQ
* The file is called qconsole.log in your home subfolder (for my linux box ~/.q3a/q3ut4/)
*g_logroll 1 //(may be useful to keep files small but may make parsing the output a mess.) Roll over logs to prevent any one from getting too large
* g_loghits 1 // (need to test, this may change whether it logs hits you take or toggles detail hit logging)
use the program http://man.unice.net/Works/UTPStat/download.html to parse the log.
I’m planning on writing a short program (for linux mac and pc) to do this.
http://www.youtube.com/watch?v=jTvhBg9Dqm8
trunks and keeper are the ones you need to speak with, they created this program.
Where can I find this program now?