Mercurial > hg > batmud > maputils
view README.loc @ 945:81184d58133c aprilli2011
Sync.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 May 2010 11:18:20 +0000 |
parents | 37cfc99fae08 |
children | 45497e8a7c90 |
line wrap: on
line source
MapUtils '.loc' file format documentation ========================================= CHANGES FROM v2.x ----------------- Following important changes were implemented in transition from fileformat v2 to v3: * Records are no longer line-based, but can span multiple lines. A new record can only start after a newline, though. * String fields can have escaped sequences inside them. * Name field can now contain optional alternative names, separated by pipe ('|'). First name, is still used as the primary "key", however. GENERAL FORMAT DESCRIPTION -------------------------- A properly formatted loc-file MUST start with line: # MapUtils LOC file (version 3.0) Processing software MAY check against the version number to see if they are compatible with the format. Any backwards-incompatible changes will result in change of the major version digit. Rest of the format is as follows: * Character set used is ISO-8859-1. * Location record starts with a number describing the X-coordinate. * Records can span multiple lines (line can be continued by ending with a slash character '\'). * Records end with a linefeed (\n) character. * Empty lines (this includes lines with whitespace only) are IGNORED. * Lines where the first non-whitespace character is a hash (#), are considered comments and are thus IGNORED. Processing software MAY preserve and add comments, if wished. Comment lines CAN NOT be continued with the above mentioned line continuation method. * String-type fields can contain ESCAPED sequences (escape character is slash '\'), which MUST be parsed into literals. Example: foo\;bar would be parsed to "foo;bar" Each record is divided to fields 8 fields via semicolons (;). Fields MAY contain extra whitespace padding on both sides (left and right), which SHOULD be trimmed by the parser. Each record consists of following fields: X;Y;flags;location name(s);creator(s);timestamp;URL;freeform The fields are as follows: (REQ = field is required, OPT = field can be left empty) * [REQ] X (horizontal) and Y (vertical) coordinates of the location with origo (0,0) being in upper left corner of the map. * [REQ] Flags: Contains information about the marker's type, etc: First (non-whitespace) character MUST be a number [0-3], which describes the alignment of the marker's label. Rest of the flags are OPTIONAL, and may comprise of following: Marker types: 'c' = Major city 'C' = Player city '?' = Scenic '%' = Shrine scenic Location types: 'S' = Raceshrine 'G' = Guild 'P' = Player guild/secret society 'M' = Monster 'T' = Guild-related Trainer 'F' = Regional Fort Special flags: '-' = Location is "invisible". Practically means that some operations of mkloc utility ignore this marker. In generated maps the marker itself MUST be placed, but label MUST NOT be drawn. * [REQ] Location name(s): The first name acts as UNIQUE identifier, but there are exceptions: locations marked with invisible flag (-) may share the same location identifier. Additional alternative names can be specified, separated by pipe character ('|'). NOTICE: By convention, the 'real' name of the area, shown by BatMUD 'whereami' command, should be the LAST one (if there are alternative names). * [OPT] Creators: Contains comma-separated list of wizard names involved in creating or maintaining the area or otherwise related to the location. Example: ;Darol,Durand,Dazzt; * [OPT] Timestamp: MAY be left empty, otherwise a timestamp of when the area was added in the game. Formatted as 'dd.mm.yyyy', zero-padded. Examples: 21.03.2008; 02.12.1996 * [OPT] URL: Properly encoded URL-link pointing to related web-page. * [OPT] Freeform: Any location-related data. Ends in linefeed as it is the last field.