Rankings
NOP creates ranking tables based upon HTML template files. The archive comes with a few examples,
such as "t_rank.html". You may change it as you like.
But first, let NOP know which template file to use for which game (add this to the config file):
[utrank]
active = "1"
game_type = "UT"
min_time = "30"
min_games = "5"
min_frags = "50"
This tells NOP that it should output a file utrankx.html (x being the number of the page, starting with 0) and
that there's a template file called t_utrank.html. Furthermore, it says that the ranking is for Unreal
Tournament players that have played a minimum time of 30 minutes, 5 games and have a minimum of 50 frags. The
minimum values are very important if you're sorting your rankings by SCORE. Because a lack of data causes
unrealistic score calculation, it gets better over a decent amount of time. If you're running your server for
weeks and weeks, raise these values even more, it really gives better rankings.
You can use several keywords in a template file, that will be replaced when NOP parses the file. Here's a list
of keywords you can use:
%GAMES% - number of normal games (deathmatch/ffa)
%ALL_PLAYERS% - number of players in database of the specific game
%ALL_GAMES% - number of all games ever played
%TEAM_GAMES% - number of team games (does include ctf as of Q3 v1.09 and above)
%CTF_GAMES% - number of ctf games
%DUELS% - number of tournaments (Q3)
%DOM_GAMES% - number of domination games (UT)
%INS_GAMES% - number of InstaGib games (UT)
%TIMELIMITS_HIT% - number of timelimits hit
%FRAGLIMITS_HIT% - number of fraglimits hit
To place a table in a ranking HTML template, create a table with standard HTML tags, but do not close
the table tag yet. Use the keyword %PLAYERS% below your table header, then close the table. Here's an example:
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH=80%>
<TR align="center">
<TH id="tablehead" width=10%>Pos</TH>
<TH id="tablehead" width=30% align="left">Name</TH>
<TH id="tablehead" width=10%>Score</TH>
<TH id="tablehead" width=10%>Frags</TH>
<TH id="tablehead" width=10%>Deaths</TH>
<TH id="tablehead" width=10%>Time</TH>
</TR>
%PLAYERS CGI="1" MAX="100" LPP="20" SORT="SCORE" TABLE="POS, NAME, SCORE, FRAGS, DEATHS, TIME"%
</TABLE>
The %PLAYERS% keyword will be replaced by a list of players including column and row tags, so don't forget
to put a table tag around it. The %PLAYERS% keyword needs a few parameters, MAX, LPP and TABLE are required, all
others are optional. Here's a list of all:
ASP="1" - inserts a link to the file "nopsearch.asp" for every player
CGI="1" - inserts a link to the file "nopsearch.pl" for every player
MAX="xxx" - sets the maximum number of players
LPP="xxx" - sets "lines per page" - so setting MAX="200" and LPP="50" will produce 4 pages with 50 players each.
SORT="xxx" - sets the type of sorting, append a "-" to sort descending, possible values are: SCORE, RANK, SKILL,
EFFICIENCY, FRAGS, DEATHS, SUICIDES, TIME, GAMES, GAME/WON, FPH, FPG
TABLE="xxx" - this sets the columns you want, regardless of what you've set in your table header, possible values are:
POS, NAME, SCORE, FRAGS, DEATHS, SUICIDES, RANK, SKILL, EFFICIENCY, FPH, FPG,
GAMES, GAME/WON, DUELS, DUEL/WON, TEAMPLAYS, TEAMFRAG, TIME, PING, WEAPONS,
LOC, LASTSEEN, CTFGETS, CTFRETURNS, CTFCAPTURES
Note:
The default alignment for columns is centered. If you want to change that, you can overwrite this setting by
adding an align=xxx to the column name in the %PLAYERS% line (DO NOT add quotation marks):
%PLAYERS CGI="1" MAX="100" LPP="20" SORT="SCORE" TABLE="POS, NAME align=left, SCORE align=right, FRAGS, DEATHS, TIME"%
The last part is the placement of possible links, that link to next or previous pages (remember, setting LPP to
50 and MAX to 200 generates 4 pages with 50 lines each). Here's an example that fits to the table above:
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2>
<TR>
<TD width=50% align="left">
<A %PREV_HTML_FILE%><<< prev | </A>
</TD>
<TD width=50% align="right">
<A %NEXT_HTML_FILE%> | next >>></A>
</TD>
</TR>
</TABLE>
NOP will replace %PREV_HTML_FILE% and %NEXT_HTML_FILE% with a href="xxxx.html" AND the appropriate style,
so the link will not only have no link if there's no file, it will also be invisible. The style used to display
the link is id=tablefeet. The style used to let the link disappear is id=back. See the style sheet
files if you want to change the colors.
This stuff might look a bit weird and hard to use, but it is really easy to do. Just grab a standard template and
adjust it to your needs. Sure, you got to know some HTML, but it's completely customizable. :-)
Everytime you run NOP, the ranking HTML files will be updated and uploaded (if enabled). Even if no logfiles were read.
Since most games don't last that long, I'd recommend setting NOP to re-run every hour or every 2 hours. This keeps
the number and size of logfiles small (fast parsing) and provides up-to-date rankings to the people.
Additonally, NOP reads the file t_help.html and outputs a help file for every ranking page. It checks for
the columns you've set in the ranking HTML template files and selects the appropriate help texts. These help
files are linked by the ranking tables by default. See the templates for details.
Possible columns for ranking tables are:
POS - player's position in list, depends on type of sorting
NAME - player's name, without color codes
SCORE - score value, see chapter NOP's Score Calculation for details
FRAGS - all frags ever made
DEATHS - all deaths
SUICIDES - all suicides
RANK - Rank = Frags - (Deaths + Suicides)
SKILL - everyone starts at 1000, see chapter NOP's Score Calculation for details
EFFICIENCY - frags/deaths efficiency = (Frags * 100) / (Frags + Deaths)
FPH - frags per hour
FPG - frags per game
GAMES - all games ever played
GAME/WON - all games played / all games won
DUELS - number of played duels (tourneys, 1on1)
DUEL/WON - played duels / won duels
TEAMPLAYS - number of played team games, including ctf
TEAMFRAG - number of teamfrags (team mate frags)
TIME - total playing time
PING - average ping
WEAPONS - a list of squares representing the weapons, the more left a square is,
the more people where killed by that weapon, move the mouse over the
squares to get a description
LOC - last player's location, most likely the last server name, see config file
LASTSEEN - date of last game (month/day/year)
CTFCAPTURES - number of enemy flag captures (scoring)
CTFRETURNS - number of own flag returns
CTFGETS - number of enemy flag pickups
CTFPLAYS - number of CTF games played
CTFPOINTS - Points = (CTFCaptures*10 + CTFReturns*8 + CTFGets*5) / CTFPlays
The tables are sortable by one of these columns:
SCORE, RANK, SKILL, EFFICIENCY, FRAGS, DEATHS, SUICIDES, TIME, GAMES,
GAMEWON, FPH, FPG, CTFCAPTURES, CTFRETURNS; CTFGETS, CTFPLAYS, CTFPOINTS
Add a - to the type of sorting to sort the list descending (e.g. SORT="TIME-").
Version History
NOP 2.0 -> 2.01, 25 august 1999
- fixed help.html, which is now saved to the right path
- fixed nop2.dat, nop now overwrites old player databases
- fixed old message output (ftp)
NOP 2.01 -> 2.1, 28 august 1999
- fixed weird bug that caused a loss of games / players
- fixed displaying of wrong month
- fixed max_layers = "0" (list all)
- fixed zero names, players without a name or with a named
filled with spaces are now being properly removed
- fixed cgi path for player names
- generated html files are smaller now
- enhanced cgi so that it now finds the path by itself
- added NOPTrans v1.0, a tool to automate transferring of
games.log files from q3a servers to a ranking table
master
NOP 2.1 -> 3.0, 29 september 1999
- added multiple output file support, one pass generates up to 20
different ranking tables, each can have a different design
- output 100% customizable through style sheets
- added 5 example styles (red, blue, yellow, negative and litho)
- improved cgi-output / player statistics
- added up and down sorting and TIME, GAMES, GAMEWON, FPH & FPG as
sortable items
- added location (LOC) and last seen (LAST) as possible table columns
- you can now remove players that haven't played for a certain amount
of time
- fixed teamfrags screwing up the player statistics
- fixed overall games counter
- tweaked score-calculation a bit
- fixed a bunch of other minor stuff I can't remember
- added full unreal tournament demo support
NOP 3.0 -> 3.2, 10 october 1999
- fixed a bug that caused NOP to crash while parsing UTDemo logfiles
(the server is pinging a player 0, even if no one is playing)
- fixed updating of UTDemo logfile list
- added HalfLife, HL CounterStrike, HL Team Fortress Classic and
HL Jailbreak support
- added ASP support to search player database and display player
statistics
NOP 3.2 -> 4.0, 12 december 1999
- added daily / weekly / monthly stats generation
- added Q3A bots support, new color codes, fixed game_type
- added work around for Q3A timecode bug
- added Q3A full and UT full weapons support
- added CTFCaptures, CTFGets & CTFReturns stuff
- completely changed template handling, output is now 100% customizable
- completely rewrote FTP stuff
- fixed sorting for FPH/FPG
- fixed bug "winning more games than playing"
- fixed timezone bug
- updated ASP / CGI scripts
NOP 4.0 -> 4.1, 21 december 1999
- fixed nopdata.txt not uploading (FTP)
- fixed deleting of files (FTP)
- fixed time for players
- fixed linux week mismatch
- fixed ctf values for alias people
- fixed InitGame logfile modification
- fixed duplicate maps in map-stats
- fixed startup-batchfile for windows
- added weapon pic for Gauntlet
- updated docs