
			Mergestats by zebra
---------------------------------------------------------------

1. Information / help

Here is some non-trivial information considering the program.

This program is meant for merging stats.txt -type of files.
You can also merge txt and html files made by this program.
Stats file made by Elasto Mania 1.2 or LevStats.exe -program
are also allowed. Also reading of irc battle logs is now
possible.
Note that you can't merge or read cup statistics (total
standings).

In main menu, press 1 to merge a stat file. If you are making
an html file and want to bold new times there (if you have
selected to bold new times in mergestats_config.txt), you are
prompted to choose if you want to merge the stat file as old 
or new file. By bolding it's easier to see new times from 
the list. So when you merge the first / old file, select 'old' 
and for the updates / newer files select 'new'. 
If you give here a '.log' -file, it will be considered as
irc battle log file.

This program handles multiplayer times too. Multiplayer
time is a time where there is comma (,) in the driver's name.
If there is two players, for example Noob and Hoyla, their
multiplayer times will be "Noob, Hoyla" or "Hoyla, Noob".
This program separates these two names, so if you want
them to be same, you have to rename "Noob, Hoyla" -player
to "Hoyla, Noob" (or other way around) and merge their times.
Due to this, your nick shouldn't have any commas, or you will
be considered as multiplayer.

By selecting 'Print multiplayer times' from options you can
choose if you want to print multiplayer times too. This
options doesn't affect to extra statistics.

A team can be made for example by renaming player "Noob" to 
player "Noob [NT]" where NT is the team name.
(here NT is short for Noob Team)
After that every player who has [NT] in his/her name will
be counted to that team. Due to this your nick shouldn't have
'[' and ']' -characters, otherwise your team will be
recognised wrongly.

When making team cup statistics, the program counts only
each team's three best times from each levs. This prevents
a very big team from becoming unbeatable. 

When making player and team tables, the program asks also
if you want to print details. This means do you want to print
each level's points or just total points. 

Caution: If you have a really big database of levels (over 1000), 
saving player or team tables will take a long time.
The other operations will become slower too, but in most cases
they shouldn't take more than couple of seconds.

The cup statistics are best viewed with a text editor with a
monospaced font and without line division.





2. Other files

The mergestats_config.txt is used for reading the default 
option. The file should contain 10 pieces of '1' or '0'
in the beginning of each line. Here is a example:

  Use these settings, if you want to get the same kind of file
  as the original stats.txt
  These are the options which make a 'normal' stats file.
  Of course you can change them either in file or in the program.
  For example you can turn 2 on if you want to shorten the stat file,
  or turn 9 an 10 on if you want some extra information.

  1       //  1. Print levels with no times
  0       //  2. Print only best time from each player
  1       //  3. Count average if only one player
  0       //  4. Count average if more than one player
  0       //  5. New times in bold in html file
  1       //  6. Print all times instead of 10 first
  1       //  7. Print amount of finished levels
  1       //  8. Print multiplayer times
  1       //  9. Print team statistics
  1       // 10. Print extra statistics in the end of file

  Here 1 means true/on and 0 means false/off.



  In TT battles, use these settings:

  1       //  1. Print levels with no times
  1       //  2. Print only best time from each player
  1       //  3. Count average if only one player
  1       //  4. Count average if more than one player
  0       //  5. New times in bold in html file
  1       //  6. Print all times instead of 10 first
  1       //  7. Print amount of finished levels
  0       //  8. Print multiplayer times
  0       //  9. Print team statistics
  1       // 10. Print extra statistics in the end of file

If the mergestats_config.txt is missing, then some default
settings will be used.

If you create cup statistics, file mergestats_cuppoints.txt is
used for reading cup points from there. If it's missing, then
some default settings will be used. 

When modifying mergestats_cuppoints.txt, make sure that the points
are between 0 and 1000, otherwise the program will print an
error message when starting it. Points are not limited to
50 first players: you can give points only to the first one
or to 100 players, it's up to you. To make a reasonable point
system, make sure that the points are in descending order.

When making mopobattle, you will be asked of registerations of players.
This information can be found from file mergestats_players.txt.
If you input a log file containing registerations, the program
will save players' names and teams to mergestats_players.txt and
players' teams to nationalities.txt. The file nationalities.txt
is then read by MGen's mopobattle program. You will be also asked
of players recs and checking their times. You can read the recs
from log file. Time checking will be made with elmatim0r and its
outputfile stat.txt. When program sees the replay uploaded in log file,
it will look from stat.txt with the same name and compares the time
player said while battling and the time found from rec.


When reading log files, mergestats_nicks.txt file is read
and nicks are replaces. For example, if there is following line
in the mergestatas_nick.txt:

ze_afk zebra

then ze_afk:s nick will be replaced by zebra.
The program automatically merges names which 5 first letters are 
the same, for example nicks zebraTAP, zebra and zebrazzz.
Also characters like _ - ( ) ^ + \ @ are stripped from both ends
of nick name. For example zebra_, @zebra and --zebra-- are converted
to zebra.



3. Version history

1.6 (9.7.2006)
- Support for multiple nick names
- Doesn't anymore merge battles to old ones when read from log
- Multiple minor features and bug fixes

1.5 (23.7.2005)
- Mopobattles
- Dates, best rows etc. in compobattle statistics
- Other tiny improvements

1.4 (12.3.2005)
- Reading of battle log files
- Saving in combobattle format
- Fixed some bugs

1.3 (20.11.2004)
- Cup statistics
- Apple times allowed
- Help in program

1.2 (30.10.2004)
- Fixed couple of bugs

1.1 (29.9.2004)
- Support for stats made by LevStats.exe

1.0 (15.9.2004)
- Original big release with merging features 



4. Future plans (?)

- Reading of state.dat, .lev and .rec -files



5. About

This program is freeware so you can distribute it freely.
Also codes are available (c++, in finnish, about 6000 lines), 
just e-mail me.

For bugs, further information and questions send email to zebra@mbnet.fi
Check the newest version in http://koti.mbnet.fi/zebra/elma.html

7.9.2006 Harri Luoma



