WTW v2.0.6 build 245 - Usage docs

Table of contents:

> Installing Python
> Using WTW
> Miscellaneous


Installing Python


This guide will cover installation & usage stuffs.

Python interpreter


WTW requires Python to works plus PIL (Python Imaging Library).
It was tested with Python 1.5.2,2.0 and 2.1 versions. It works with PIL 1.0 and later versions.
You can download everything you need from WTW download page.

Here follow Python installing instructions for every platforms:

> Windows 9x/ME/NT4/2000/XP

  • Download Python pack.
  • Install the Python interpreter archive (default: C:\pyXX).


> Linux (Unix)

On Unix platforms (Linux) I suggest don't use any precompiled packages that come with your favourite distributions because there could be missed some modules needed by WTW that aren't been compiled. After you've downloaded Python sources (see WTW download page) , and PIL you've to compile it (instructions below).

Note:
as a workaround you can try to download any update packs from your Linux distribution home site.

First move wtw tar archive into Q3A directory and extract it :

       tar -zxpvf wtw_<version number>_unix.tgz

Extract Python sources in your home directory (To install it you must have root privileges).
Compile and install Python.
After succesfully compiling, run python via shell and type:
>>> import sys
>>> sys.path

You'll see a list of python searchable path for modules. Eventually you can install PIL in any path returned (the path finishing with tail "/site-packages" is the more convenient).

Extract PIL archive and follow compiling and installing instructions.
Run wtw (see below on "Using WTW" section) and optionally if anything goes badedit Setup file in Python sources directory inside Modules dir according to missing modules and rebuild Python distribution.

Note
:
WTW to work requires TCL/TK libraries.


Using WTW

To start WTW and spawn WTW gui:

- Windows

Double-Click <startwtw.bat> icon.

Note:

If you wish to set environment variables manually you can have a look inside <startwtw.bat> and set them.

Note:
Eventually you need to change PYROOT env variable inside <startwtw.bat> script to point to Python installation dir.

- Linux

Open a shell and type:

> python wtw.py

Optionally
WTW can be executed to perform automated tasks.
You can use this syntax in a Cron Job (Linux) or as a Scheduled Task (Windows).

Type from your shell (Linux)/command (DOS/Command/Cmd->Windows):
Note:
( If Python dir is not in PATH env you must enter all path -> i.e. C:\py152\python ) (Windows)

> python wtw.py -h or python wtw.py --help

WTW will print some options.
If you want logs to be generated automatically use syntax:

> python wtw.py -a or python wtw.py --auto

Remember to set all options from WTW gui.

All others option are explained below:

Scan log options:
Scan all mod dirs
This option requires you've installed WTW in Quake 3 Arena directory.
Enabling this option make WTW automatically scans for every log inside all sub-dirs.
Single log
Enabling this option WTW scan for a single log.You've to select manually log to process. Click the <Browse> button on the right side
From WTW data file
Enabling this option WTW load a wdt data file from a previous scan.You've to select manually a WTW data file to process. Click the <Browse> button on the right side.
Output dir
Click the <Browse> button on the right side to select an optional output dir. WTW will output all stats in the selected dir inside <readystats> dir. Click <Reset> button to choose default output dir (WTW installation directory).
Graphs:
All graphs
Draw big and standard Frags vs. time course graphs.
Skip big graph
Draw only standard Frags vs. time course graph.
No graphs
No Frags vs. time course graphs are generated.
Optional graphs & Misc:
Draw wins graphs
Draws win course graphs in Player and Global ranking pages.
Spawn map shots
This option allows WTW spawns map levelshots on HTML pages. To see them, pass your mouse pointer over map names. To use it create a dir named <mapcache> in WTW directory or let WTW create it automatically. Using a pk3 explorer (see WTW download page), grab from <levelshots> dir all files and copy them in <mapcache>. WTW will convert every format in JPG and resize all levelshots to 128x128 pixels size.
Skip single games
Avoid generation of single games HTML pages.
Misc:
Themes (Menu)
You can choose any preferred theme to output your stats. Just choose an entry in "Theme" menu. You'll see theme preview in wtw logo in gui.
Players Ban
Enable players banlist (see <banlist.txt> file). Every single game will be discarded if a player nickname from the list is found.
Players Alias
Enable players alias nickname list (see <aliaslist.txt> file).
Enable TopRank
Enabling it, after all stats processing, record and update all globals ranks & scores in a permanent database <topscore.wdt>. It also spawns relative HTML page. More info in Misc section below.
Hide Server Info
Hide nameserver and server IPs spawned on main page.
Server/Clan URL
Spawn on main page a banner logo in main page. You've to supply a valid URL to work properly. See below in Misc section for further info.
WDT label
Is a label for wdt data files.
Save data file
Checking this option, WTW will save all stats in a compact binary file inside <wtwdata> dir.
Note:
This features works with
<Scan all mod dirs> and <Single log> options.
Debug log
WTW then will print on shell all lines actually scanned.
Use it if there are some log parsing problems.

After WTW processed a Q3A log, simply double click index.html inside <readystats> dir to view games stats.


Miscellaneous


- Sharing stats with users on a LAN/Internet.

It could be useful to share stats with other users.
Everything you need is inside <readystats> dir.
With enabling file sharing under Windows, all users will be capable to view stats on a LAN (Win 9x/ME).
Alternatively you can install a http server (SimpleServer) from AnalogX site (Windows) or properly configure Apache httpd server on Linux box.
SimpleServer install & configure steps are done in ten seconds. Remember to point to <readystats> dir.

- Themes on-the-fly.

Since release 2.x WTW supports theme to enjoy and view stats as you wish. If you got processed stats generated by WTW you can optionally change a theme without processing again logs in this way:
Go inside <templates/Themes> dir. Select a theme dir and copy from it respectively:
- <wtw2.gif> and <wtw2_t.gif> inside <readystats/wtwimages>
- <wtw.css> inside <readystats/wtwlogs>

- Valid games.

WTW can process only games found in his own database.
If you click on the WTW logo button on the gui you can see which kind of mod WTW supports. BTW WTW scanning through mod dirs can find more baseq3-like mods (vanilla baseq3 mods). Every game not found in his database is automatically discarded from processing so don't be caught. Every game with fixed timelimit and fraglimit/capturelimit=0 is normally processed and considered as a valid game regardless from result. Every game with timelimit=0 and fraglimit/capturelimit=0 is discarded. Every game with a fixed fraglimit/capturelimit and/or timelimit shutted down for some reason is automatically discarded.

- Top Global Score.

WTW can record all globals ranks & scores in a permanent & autoupdating database. To enable it check "Enable TopRank" option in wtw gui. You'll see a "Top Global Score" link under wtw logo in main page. Click it to access to top global scores pages. Consider it as highest scores made in your server. Plus is permanent: this means you can safely backup/delete your logs (if they are very big) and preserve all highest global scores made on your server.
Note:
To reset Top Global Score simply delete <topscore.wdt> file in WTW root directory.

- Players banlist/aliaslist.

Edit <banlist.txt> and <aliaslist.txt> to properly configure this feature.
All names must be inserted as "NAME" and a carriage return (banlist & aliases).
Ban wildcards chars are ">" and "<"
For example:
"abc>" : Ban all players starting with abc.
"<abc" : Ban all players ending with abc.
"<abc>" : Ban all players with matching substring.
"abc" : Ban players nickname abc.
Alias list are coded as:
First name is real name, and all following names are aliases.
To code another name insert a "*" char (don't forget carriage return)
and start aliasing process again.
Ban & Alias HTML pages are accessed via mod navigation popup (main page).

- Server/Clan Logos.

WTW has the ability to spawn your preferred server/clan logo in main page. All you need is to put your logo inside <templates> dir and save it as <clan.jpg>. To spawn it simply write its URL in the proper wtw gui entry.

- Players nicknames.

WTW doesn't care about players nicknames. You can use any nicknames made up with strange characters but discard every color information.
If a group of players would like to use the same nickname (i.e. Vegeta) advice them to differentiate in some way: Vegeta1,Vegeta2,Vegeta_A etc.
Note:
- Every single game with duplicate nicknames will be discarded...so be warned.

- Bugs/Logs corrupted.


WTW 2.x release prints on stdout warnings if anything strange was discovered during parsing process.
A warning implies a game is discarded so is worth a while to check line printed on warning with a text editor.
Even WTW is been tested, some logs can reveal an hidden bug.
If so, WTW got stuck and some messages will be printed on the console window.
Don't panic !!....if this happen, first checks your logs. All *.log files are pure text file. Sometimes the problem is that any *.log file is corrupted (Don't ask me why :)). Open it with your favourite text editor and search inside for strange/corrupted sections and delete lines from InitGame to ShutdownGame sections and start again WTW. If WTW stuck again let's go further: Cut & Paste all messages and send to me via email in a text file with the log in a zip file so I can discover the problem.