Darklands message file

Files with this format: "*.msg".

Contains text and possibly other information about screens (cards).

It is difficult to tell if a "card" refers to the entire file, or to one of the string entries in the file. The terms are confusingly used interchangably in this file.

Most, if not all, ".msg" files are found within the one cat file msgfiles.

Table of Contents

Offsets

starting at 0x00

Structures

card

Offsets

Offset: starting at 0x00

0x00: num_cards: byte
Number of cards.
0x01: card_definitions: array[ num_cards ] of struct card (each size )
Card definitions.

Structures

Structure: card

A definition of an alchemical formula.

0x00: text_offs_y: byte
Top border of card text.
  • Starting at the inner edge of top border -2 pixels.
0x01: text_offs_x: byte
Left border of card text.
  • Starting at the inner edge of left border -1 pixel.
0x02: unknown (1 bytes)
0x03: text_max_x: byte
Text maximum X.
  • (Width of the text column = text_max_x - text_offs_x)
0x04: unknown (1 bytes)
  • Unknown bytes are 0x0 for all but 2 cards.
  • First (extreme) exception is $MCGUF07.MSG, it has 76 cards, all without text and nearly all of them have nonzero unk1 or unk 2.
  • Second one is $RAUBI05.MSG, there is only one nonzero unk2. Typo probably?
0x05: contents: string (null-delimited)
Textual contents of the screen.
  • Screens are always a preamble of text, sometimes followed by a list of up to ten options. If there are not that many choices, bogus entries (usually just numbered 1-10) fill the option slots.
  • Some cards appear to be standardized (always ten options, with potion/saint/leave options in the same places).
  • 0x0a seems to be a newline, 0x14 seems to be a paragraph break. These are almost always used together as a pair {0x0a, 0x14}, between every paragraph and each option.
  • Usually the valid options start with {0x0a, 0x14}, but sometimes have an extra 0x14 or 0x15 appended (spacing?).
  • 0x15 is unknown. Usually it follows the {0x0a, 0x14}, so it's probably whitespace?
  • There is always an 0x1d between the "..." and the text of an option.
  • An 0x10 immediately precedes the "..." for options that offer a popup potion selection.
  • An 0x16 immediately precedes the "..." for options that offer a popup saint selection.
  • An 0x06 immediately precedes the "..." for options that would cause the party to enter battle immediately.
  • An 0x15 immediately precedes normal options. (thanks to James)