+0     WORD    Number of messages
 +2 50*10 BYTEs records of 10 bytes each, for all messages:
                 +0     DWORD   Address of message in file + 1
                 +4     WORD    Length of message in bytes
                 +6     WORD    Sender (= Player Id, otherwise the host
                                rejects it).
                 +8     WORD    Addressee (race number 1..11, 12=for the
                                host: will show up in host log and
                                HOSTMESS.TXT)
+xxx  n BYTEs   First message. Encrypted, see MDATAx.DAT.

The message encryption is the same as in MDATAx.DAT.

PLANETS.EXE starts the first message at offset +502, leaving room for 50 message headers. PCC dynamically moves the messages, leaving at least 50 free slots.

Messages should end in a line break (CR, encoded as 26): when HOST.EXE dumps host messages to the HOSTMESS.TXT file, it will not write a proper linefeed after the message, so messages may accidentally run together.

Message Size Limits

THost limits the size of a TRN file "SendMessage" command to 700 bytes. PHost limits messages to at most 18 lines of 40 characters each (after breaking long lines).

Both hosts prepend a signature line ("(-rX000)<<< Subspace Message >>>"), a "FROM:" and a "TO:" line, and (THost only) a blank line.

The file format would allow messages of up to 32 kByte per message, but since (a) the host prepends some headers, and (b) received messages must be smaller then 32 kByte, you can't completely exploit this capability, even if your host would allow to.

Messages to many

Messages to many races, such as Universal Messages, are stored as several single messages, one per addressee. The Client program (PLANETS.EXE/PCC) inserts the headers ("<<< Universal Message >>>"), not the host. It should not be problematic to have multiple message headers refer to the very same message text, but so far no program is known to do that.

If you want to collapse multiple identical messages together when reading in MESSx.DAT, you may want to care for the header lines:

  • Universal Messages start with " <<< Universal Message >>>" (two spaces!).
  • VPA starts its team messages with " <<< Team Message >>>" (again, two spaces).
  • PCC's messages to multiple players start with "CC: other_addressees", or "<CC: other" if the sender and receiver are the same (to avoid triggering the PHost command processor). The address is either a full race name or a space-separated list of player numbers and the word "Host".