This file contains the score statistics. It replaces PCC 1.x's STAT.CC. It can store multiple score series.

It starts with a header describing the file contents; the header itself is divided in a fixed portion and a number of sub-fields.

The file data is stored in records of identical format, one per turn, in ascending order of turn numbers. Each record consists of a record header and a number of score entries. The header can contain additional information about that turn; currently it contains turn number and timestamp.

This file format allows read and update of the scores in a file even when the structure is not fully understood by the accessing program. However, we need knowledge of the file format to change its structure (=add a new series), to be able to rewrite the header and sub-fields.

 +0   8 BYTEs   Signature, "CCstat0",26
 +8     DWORD   "h" total size of file header and sub-fields, pointer to records
+12     WORD    "nf" number of sub-fields in file header, at least 2
+14     WORD    "n" number of records
+16     WORD    "rh" size of record header, usually 20
+18     WORD    "rd" number of scores per record
                This makes the record size "rh + 44*rd"
+20  nf WORDs   Pointers to sub-fields

--- First sub-field: Record description ---
 +?  rd WORDs   Record description. Each entry describes a slot of a
                record:
                 -1     Planet count
                 -2     Capital ships
                 -3     Freighters
                 -4     Bases
                or a value matching the Identifier in a score description.
                The default setup is -1,-2,-3,-4,2. Negative-numbered
                fields may be described in the second sub-field, but don't
                have to; non-negative numbers correspond to score entries
                from UTILx.DAT record #51 and must be described in the second
                sub-field. Values -100 and below are reserved for internal
                use and should not appear in files.

--- Second sub-field: Score descriptions ---
 +?     WORD    "nd" Number of descriptions
 +?  nd RECORDs of 58 bytes (similar to UTIL.DAT #51):
                 +0  50 BYTEs   Name; player-readable description of this score.
                +50     WORD    Identifier
                +52     WORD    Turns-over-limit required to win, or -1
                +54     DWORD   Win limit, -1 if none

--- Records ---
 +h   n RECORDs of (rh + 44*rd) bytes, sorted in ascending order of turn number
                --- Header ---
                 +0     WORD    Turn
                 +2  10 BYTEs   Date mm-dd-yyyy
                +12   8 BYTEs   Time hh:mm:ss
                --- Data ---
                +rh  11*rd DWORDs Entries. 11 scores corresponding to first
                                slot, 11 scores corresponding to second, etc.
                                Value can be -1 if unknown.