Free Hero Mesh

export.doc at [60b09ee8e4]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

File export.doc artifact 6ff8088996 part of check-in 60b09ee8e4


This document describes the level export format of Free Hero Mesh.

You can use this format for the following purposes:

* To copy a level in Free Hero Mesh, within the same puzzle set or from
one puzzle set to another one.

* To export a level, to be parsed by an external program.

* To produce by an external program and then import into Free Hero Mesh.

* To edit it in a text editor.

(In the first case, when duplicating the level within the same puzzle set,
you can also just copy the .LVL lump. However, that will not work if you
are copying between puzzle sets.)

Each line is one record, and is terminated by a line feed. Everything in
this file is case-sensitive.


=== Types of records ===

;comment
  A comment. A blank line is also a comment.

@title
  Specify the title of the level. This may contain escapes. A line break
  must be escaped, and a backslash must be escaped, although a quotation
  mark does not need to be escaped.

C code
  The level code number, from 0 to 65535.

D width height
  The play field dimensions. The width and height must be 1 to 64. This
  line must come before any objects are listed, and is mandatory.

F $class
  This command never occurs in levels exported from Free Hero Mesh,
  although it can optionally occur in imported levels. This command fills
  the entire playfield with the specified class; the image number and
  other parameters are always zero.

V version
  This command never occurs in levels exported from Free Hero Mesh,
  although it can optionally occur in imported levels. If it is specified,
  then it sets the level version number.

W
  After all objects in the normal world, use this command to start the
  objects in the bizarro world; you then need another W at the end.

x y $class image misc1 misc2 misc3 dir
  Specify an object. Objects are listed starting from the top left corner,
  going right, and within each cell the objects are listed from bottom to
  top. Coordinates are one-based. The image is a number (0 for the first
  image), misc1 to misc3 are misc values (see below), and dir is also a
  number (0 for east, up to 7 for southeast). When the data is being
  imported, it will accept objects listed in any order, but when being
  exported from Free Hero Mesh, they are ordered as described above.

%string
  A level string. The level strings are numbered in order, starting from
  string 0. The format is like that of the title.

'key number
  Specify the key name (same as the "input constants" described in
  class.doc), and optionally the repeat count. This enters it into the
  solution; if at least one command like this is present then it will
  overwrite the existing solution when this level is saved. (Note: This
  does not automatically verify the solution; it only records it.)
  (Currently, this line is implemented only for import, and not for
  export. Later an option might be added to do this on export, too.)

=
  Delimiter between levels; only allowed in batch import mode.


=== Misc values ===

A number is written in decimal, and must be 0 to 65535.

A class name has $ at first.

A message name will start with # if it is a user-defined message, or will
have no prefix if it is a standard message.

A reference to a level string starts with % and is then the number.

None of the misc values are written with spaces inside the value, although
there are spaces around the value.