Title    : Quake Console Filter
Filename : conread.zip
Version  : 1.05
Date     : 21/12/1997
Author   : Richard Maxwell
Email    : Richard <maxwells@ihug.co.nz>
Credits  : id software and for inspiration - DrBrain who wrote Quake Deathmatch Statistics 
           (qdms.zip - this is useful if you want stats over many levels)
 

Build time: Hmph, A month with Qbasic ain't nice, but its the only language I know.
	    And once your learnt C, and go back to mod the code its even worse!


Type of Mod
-----------
Quake C  : no
Sound    : no
MDL      : no  


What does it do?
----------------

It filters client side qconsole.log files and spits out various tables and stats in 
html for each level it encounters.
These html files will be named using the first 5 letters of the log file (unless its
qconsole.log, then its called levelXXX.htm) and it will be stored in the 
directory "output" which will be created below the directory where
conread.exe is run.

eg 5 level qconsole.log will make the files

level1.htm
level2.htm
...
level5.htm

2 level freddy.log would make
fredd1.htm
fredd2.htm

additionally conread can make up a overall player database, giving you the chance
to generate Quake World like statistics. This data will be stored under the plrdata directory.
The data is stored in the players.dat file. To generate HTML rankings of the player data just
run statmake.exe in the plrdata directory.


What files should I have?
-------------------------

Once you unzip the file called conread.zip you should have the files:

conread.exe
conread.ini
conread.txt (this file)

ini-help.htm (configuration help)
DM.ini
CTF.ini
TF.ini

statmake.exe
purge.exe

source.zip (source files)

thats 10 files


How do you run it?
------------------

You type:

conread <log filename>

if log filename is not specified then conread assumes its filtering
a client-side qconsole.log file in the current directory.
if all goes well then conread.exe will spit out one html file per level
detected in the directory "output", writing over any files already there.

**For win95 and NT users**

-Right click on the conread.exe file
-select properties
-goto program
-where it says working directory type in the path of where
the file is kept.
eg if conread.exe is in the c:\games\quake directory then put that
directory in the working directory

You can now directly drag the console.log file onto conread.exe and it
will filter it for you.

Overall stats
-------------
run the file statmake.exe in the plrdata directory
this will create 7 html files

skill.htm
kills.htm
deaths.htm
eff.htm
rank.htm
player.htm
rankage.htm

with rankings sorted by different fields (pretty obvious ones too :)


You can filter out certain rankings as follows:

STATMAKE [-h -p -d -s -k -r -e -a]
-h Show this help screen
-p skip player listing
-d skip death rankings
-s skip skill rankings
-k skip kill rankings
-r skip rank rankings
-e skip efficiency rankings
-a skip rank age rankings

Purging Stats
-------------

There comes a time where people just dont play any more. Thats why I wrote the Rank age data
field.

Rank age is the amount a days since that person was last included in a console filter.
you can remove people who are older that a certain amount of days by running purge as follows:

purge <age>

where anyone older or as old as <age> will be removed from the players.dat file.
the new dat file will be called players.da2 - you must rename it to players.dat in order for
statmake to work.

If need warrents it I might write a purge for all the other stats, but uni is too busy for me
I dont really have the time to do it right now.

p.s. purge is quick n dirty and will kick up an ugly fuss if players.dat aint there.
(no harm done - just messy error msg)

Configuration
-------------

Read the ini-help.htm file for information on how to configure
what the filter reads.


What is qconsole.log?
---------------------

When you run quake (or winquake or glquake or vquake...etc) with the
"-condebug" switch, quake dumps and appends to a text file called
"qconsole.log" everything that appears in the console.

this file is normally found in the id1 directory, however if you run
the "-game" switch the file will appear in the directory specified in
the switch.

eg:
quake -condebug
q95 -condebug -game fvf
winquake -condebug -game ctf
etc...

Q2 doesnt currently support death messages, only using
"A killed B"
or "B self kill"

you can make a qconsole.log file in Q2 by typing
"logfile 1" in the console. it will create the qconsole.log file somewhere


General Limitations + know problems
-----------------------------------

In theory the program can handle 100 players per level, however
Real Life(TM) would probably create another type of error before
you reach that limit.

The HTML is written assuming that you have a Netscape v3.01 compatible
Browser.

When you get 16+ players, the HTML tables can get pretty huge, making
your browser suck up memory like there's no tomorrow.
(I find my P133 32MB gets slow once there is nore than 20 players listed)


If your using win95 or NT and you drag + drop and keep getting the error
"cant find XXXX" then make sure you have set its properties up properly
i.e. setup the working directory to point to where conread.exe is.

Filtering Limitations
---------------------

The filter uses death messages to generate its stats - no death messages - no stats.
This means it wont work on server-side qconsole.log files
as these dont even report deaths.

The filter assumes that nothing precedes the players name (not even spaces)
when it prints death messages. 

It cant handle ctf server-side logs 'cos it preceeded all deaths with text before
the players name eg.
"LOG   FLAG:" or "LOG   DEATH:" before the player name. 
This would result in many more players being reported than 
there are (eg LOG   FLAG:Killer and LOG   DEATH:killer - would be different 
players, even though its the same one)

The filter can handle Hi-Ascii, however it does not like names with carrage
returns in them (eg names like : Rodger
					Go) 

This just confuses the filter.


When creating awards it needs data for each category. That is, if you didn't
enable weapon tables (in the ini file) then you will not get any weapon
awards.

Players with their name begining with ascii charater 1 will not be filtered properly.
Thats 'cos speech in the console starts with the same ascii character.
Therefore they will be filtered as speech instead of as a player.

QuakeWorld limitations
----------------------

The "ping" command nolonger exists, so conread cannot calcalute the average pings. As if you typed "ping" in normal Quake
it would record them and average the results and print them next to each players name.


Author Information
------------------

This is my first (and most probably last) quake util. Its something
I needed, so I wrote it.

Revision History
----------------

1.05 - added it so you can modify the body tag of the generated html 
(release version)

1.04 - added the showline filter option - fixed a few bugs. Made TF, CTF and DM4 conread.ini files.

1.03 - added the "REVERSE" command for the death filters.

1.02 - Re-made it so you can save the html using the first 5
       Chars from the .log file.

1.01 - Made it so that the names of the html files created uses the first
       5 chars from the .log file. But then windows threw an eppi and I had to
       Reformat, losing all my source except what I burned on my CD (v1.0)

1.00 - Public release.


Copyright and Distribution Permissions
--------------------------------------

Authors MAY use these modifications as a basis for other
publically available work.
^^^^^^^^^^

i.e. you have to give the public access to the source code

You may distribute this program in any electronic format as long as
 all the files in this archive remain intact and unmodified and are distributed
 together.

I accept NO responsibility for any damadge these programs may incure (yea likely :).


Availability
------------

This program is available from the following places:

http://homepages.ihug.co.nz/~maxwells/richard/index.html

and if I have done everything right, at:

ftp.cdrom.com/.11/idgames2/utils/stats