LcfMapUnit

LcfMapUnit, or LMU for short, is the file-format for map-data of games made with RPG Maker 2000/2003, up to 9999 of them can be in a game. Not everything about a map is stored in LMU-files, data that is needed to be present all the time is stored in RPG_RT.lmt (the LcfMapTree). Also normally, a save-slot will use its own backup-map-data when being loaded. The map will completely reload instead in case its save-count has changed since when the backup was made.

Header

Each file starts with a byte that defines how long the format-identifying string next to it will be. Normally, this is always 10 (0x0A), followed by the text "LcfMapUnit".

File Content

This is the file's core-structure.

ContentDataTypeDetails
10x01 ChipSetIDBERWill throw a heavy Error while editing when a ChipSet with the ID is not present in the Database
20x02 WidthBERAlso important for #71/0x47
30x03 HeightBERAlso important for #72/0x48
110x0B LoopTypeBER0: None, 1: Vertical, 2: Horizontal, 3: Both
310x1F PanoramaFlagBoolean
320x20 PanoramaFilenameStringPanorama is black when Filename is empty
330x21 PanoramaScrollHBoolean
340x22 PanoramaScrollVBoolean
350x23 PanoramaAutoHBoolean
360x24 PanoramaSpeedHBERNormally ranging -8~+8 (but not limited to it)
370x25 PanoramaAutoVBoolean
380x26 PanoramaSpeedVBERNormally ranging -8~+8 (but not limited to it)
710x47 Lower Layer16bitVectorSize must be same as Width (#2/0x02) multiplied by Height (#3/0x03)
720x48 Upper Layer16bitVectorSize must be same as Width (#2/0x02) multiplied by Height (#3/0x03)
810x51 EventsArray2DUp to 9999 Events can be on a Map.
910x5B SaveCount

Events

This structure contains the data of all events on the map. The following table contains the substructure of how a single event is built.

ContentDataTypeDetails
10x01 NameStringLess than 12 Bytes
20x02 XBER
30x03 YBER
50x05 Event PagesArray2D

Event Pages

This structure contains the pages on an event on the map. The following table contains the substructure of how a single page is built.

ContentDataTypeDetails
20x02 Page ConditionsArray1D
210x15 CharSet FilenameString
220x16 Character/UpperTileBER
230x17 FacingDirectionBER
240x18 CharacterStepBER
250x19 TransparentFlagBoolean
310x1F MovementTypeBER
320x20 MoveFrequencyBER
330x21 TriggerTypeBER
340x22 PriorityBER
350x23 NoOverlapFlagBoolean
360x24 AnimationTypeBER
370x25 SpeedBER
410x29 Move RouteArray1D
510x33 DataSizeBER
520x34 Page Contents

Page Conditions

This structure contains the data of conditions that have to be fulfilled in order for the page to be active ingame. Pages are checked from highest ID to lowest, with the first perfect match possible being applied. While no page is matching, there will be no interaction or code-processing.

ContentDataTypeDetails
10x01 TriggerBitsBER1: Switch1, 2: Switch2, 4: Variable, 8: Item, 16: PartyActor, 32: Timer1, 64: Timer2 (2003)
20x02 Switch1IDBER
30x03 Switch2IDBER
40x04 VariableIDBER
50x05 VariableValueBER
60x06 ItemIDBER
70x07 ActorIDBER
80x08 Timer1ValueBERTotal Seconds
90x09 Timer2ValueBER(2003) Total Seconds
100x0A VariableOperatorBER(2003) 0: ==, 1: >=, 2: <=, 3: >, 4: < 5: !=

Move Route

This structure contains the data of an event-page's pre-defined move-route.

ContentDataTypeDetails
110x0B DataSizeBER
120x0C CommandsList
210x15 RepeatFlagBooleanRepeat Route when End is reached
220x16 IgnoreFlagBooleanIgnore a step when it can't be done