This file contains history and other information of the VGA Planets Assistant. The file begins with a signature:

 +0  14 BYTEs   "VPA Database",13,10
 +14    BYTE    Database format version. Has the value 6 for all VPA
                versions in use nowadays (3.49+), and the text below
                describes format version 6.

Then, for each turn, a block follows. It has the following structure:

 +0   4 BYTEs   Block name = "TURN"
 +4     DWORD   Size of data (counted from offset 116 onwards)
 +8     WORD    Turn Number
+10  18 BYTEs   Timestamp of turn
+28 11x4 WORDs  Scores (see GENx.DAT)
+116  n BYTEs   Data

The Data block consists of several sub blocks containing various information:

 +0   4 BYTEs   Block name
 +4     DWORD   Total size of data (counted from offset 10)
 +8     WORD    "Count" Number of elements (=ships, planets, ...) in the
                block, if more than 1 are possible. 0 otherwise (e.g.,
                for PBPs).
+10 n   BYTEs   Data

The following paragraphs describe the various sub-blocks in the file:

  • "BASE" - Starbase data Contains information on starbases (records as in BDATAx.DAT)
  • "EPLN" - Planet information 500 records of the following structure, one per planet. The Count field is 500.
             +0     WORD    Turn of last scan, or 0
             +2     BYTE    Owner, or 0 if unknown
             +3     BYTE    Flags
                             Bit 7          Starbase exists
                             Bit 6          Starbase does not exist
                                            Both bits zero: not known
                             Bits 0..2      Industry level
                                             0      unknown
                                             1      minimal
                                             2      light
                                             3      moderate
                                             4      substantial
                                             5      heavy
                                            (the same as in PHost UTILx.DAT,
                                            plus one)
  • "IMSG" - Incoming messages Incoming messages kept in the database using the "Keep" command in VPA.MSG. The number of messages is in the "count" field in the block header. The data block contains a sequence of message headers followed by the texts. Message headers have the same format as in MDATAx.DAT:
             +0   DWORD     Offset
             +2   WORD      Length
            The offsets are relative to the position of the "count" word minus
            one. That is, when you copy the "count" word and the block data
            into a separate file, you get a standard MDATAx.DAT file.
  • "IONS" - Ion Storms Records of 22 bytes each:
             +0     WORD    Storm Id
             +2     WORD    X
             +4     WORD    Y
             +6     WORD    Radius
             +8     WORD    Voltage
            +10     WORD    Heading
            +12     BYTE    Warp
            +13     BYTE    1=growing, 0=weakening
            +14   4 WORDs   ? (-1, probably previous coordinates)
  • "MARK" - Markers Records of 12 bytes each, followed by comment texts
             +0     BYTE    Type (see data transmission, under MDATAx.DAT)
             +1     BYTE    Color
             +2     WORD    X
             +4     WORD    Y
             +6     WORD    Number of message (see "IMSG" block) of this
                            marker. 0 for user-made markers. Negative ship id
                            if bound to a ship.
             +8     WORD    Lines: X extent
                            Markers: position of comment text in text area
                            (1-based, 0=no comment)
            +10     WORD    Lines: Y extent
                            Circles: radius
                            Markers: text justification
            After the marker records, the text area follows. It is indexed
            1-based and contains the comments as Pascal strings.

The field at +8 is not used for circle markers. VPA sets it to 0 when it creates a marker, but preserves different values if you put them there (by editing the file). VPA10k uses this fact to mark its own markers and find them again later; it puts the value 4711 there.

For more information on VPA markers, refer to the VPA data transmission section in the MDATAx.DAT description.

  • "MINE" - Mine fields Records of 16 bytes each (compare this to the minefield data transmission, which is the same except that the Id is missing):
             +0     WORD    Minefield Id
             +2     WORD    Turn of last scan
             +4     WORD    X
             +6     WORD    Y
             +8     WORD    Owner race
            +10     DWORD   Mine units
            +14     WORD    1=Web mines
  • "MSGO" - Message Information One DWORD for each message in "IMSG". See VPAMSGx.DAT for description.
  • "NPLN" - Planet Flags 500 bytes, one for each planet: which values are known this turn:
             bit 0          Enemy planet (owner known)
             bit 1          Minerals, money known
             bit 2          Industry known (mines, factories, DP, FC)
             bit 3          Colonist population known
             bit 4          Native population known
             bit 5          Temperature known
             bit 6          (Non-)Existence of starbase known
             bit 7          Number of supplies known
            This corresponds to various actions as follows:
             01h    Planet was scanned (sensor sweep)
             30h    Planet was bioscanned
             41h    Ship surrendered
             43h    Planet was dark-sensed
             69h    Ship in orbit
             6Fh    Planet was super-spied
  • "OMSG" - Sent messages Similar to the MESSx.DAT file, with the "Count" word being the first word of the MESSx.DAT file. Does not have a gap between message headers and data.
  • "PASS" - Password Password, using the same encryption as in GENx.DAT. The size is 20, the count is 0.
              VAR pw : ARRAY[0..19] OF BYTE;    { this field }
                  ch : ARRAY[0..9] OF CHAR;     { password }
              FOR i := 0 TO 9 DO
                ch[i] := Chr(pw[i] - pw[19-i] + 32);
  • "PBPS" - Priority Build Points Contains 11 WORDs with the PBPs of the players. A value is -1 if the race doesn't play or the number is unknown. The Count word in the block header is 0.
  • "PEXP" - Planet Experience [v3.61f+] Contains 500 bytes, one for each planet. Each entry contains the experience level (>= 0) or 255 if not known. This record only exists when PHost 4.x experience is actually used.
  • "PHST" - PHost Version Number Exists if PHost is being used. Contains the PHost version number ("3.2e"). The Size field contains the length in characters of this string, the Count field is zero.
  • "PLAN" - Planet data This block contains the information of PDATAx.DAT and information on scanned planets. This uses modified planet records (89 bytes each), unknown values are set to -1.
             +0     WORD    Planet id
             +2     WORD    Turn of first scan
             +4     WORD    Turn of last scan
             +6     WORD    Owner
             +8  81 BYTEs   Contents of planet record at offset 4 (Friendly
                            Code), see PDATAx.DAT for description. Unknown
                            values are set to -1.
  • "REFS" - unused This header tag is recognized but not evaluated by current versions of VPA.
  • "SCOR" - unused This header tag is recognized but not evaluated by current versions of VPA.
  • "SEXP" - Ship Experience [v3.61f+] Contains 999 bytes, one for each ship. Each entry contains the experience level (>= 0) or 255 if not known. This record only exists when PHost 4.x experience is actually used.
  • "SHIP" - Ship data Contains data for all starships, same as SHIPx.DAT, plus all scanned ships. This uses modified ship records (123 bytes each), unknown values are -1.
             +0     WORD    Ship Id
             +2     WORD    Turn of last scan
             +4     WORD    Owner
             +6 103 BYTEs   Contents of ship record at offset 4 (FCode),
                            see SHIPx.DAT for description.
            +109    WORD    Last known mass
            +111    WORD    Minimum mass scanned ever
            +113    WORD    Maximum mass scanned ever
            +115  2 WORDs   Last turn's X,Y
            +119  2 WORDs   Last scanned X,Y
  • "UFOS" - Ufos [v3.58+] Contains the Ufo objects; 90 bytes per object.
             +0     WORD    Ufo Id
             +2     WORD    Turn number
             +4  78 BYTEs   Standard Ufo record
            +82   4 WORDs   -1 (?, probably previous coordinates)
  • "VCRS" - VCR records Contains all VCRs, like in VCRx.DAT.
  • "VERS" - VPA Version Number The Count field in the header contains the version number, encoded as 351 (decimal) for 3.51. The data area itself is empty (size 0).
  • "WORM" - Wormholes Entries of 12 bytes each.
             +0     WORD    Wormhole Id
             +2     WORD    Turn number of scan
             +4     WORD    X
             +6     WORD    Y
             +8     WORD    Mass
            +10     WORD    Stability (like values in UTILx.DAT, plus 1)
                             1      very stable
                             2      stable
                             3      mostly stable
                             4      unstable
                             5      very unstable
                             6      totally unstable
  • "XYPL" - Planet Coordinates 500 records with an X and Y WORD each.
This is a testing version.
It may be incomplete, and have more bugs (or features) than the public live version at planetscentral.com.