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.
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".
This is the file's core-structure.
Content | DataType | Details | ||
---|---|---|---|---|
1 | 0x01 | ChipSetID | BER | Will throw a heavy Error while editing when a ChipSet with the ID is not present in the Database |
2 | 0x02 | Width | BER | Also important for #71/0x47 |
3 | 0x03 | Height | BER | Also important for #72/0x48 |
11 | 0x0B | LoopType | BER | 0: None, 1: Vertical, 2: Horizontal, 3: Both |
31 | 0x1F | PanoramaFlag | Boolean | |
32 | 0x20 | PanoramaFilename | String | Panorama is black when Filename is empty |
33 | 0x21 | PanoramaScrollH | Boolean | |
34 | 0x22 | PanoramaScrollV | Boolean | |
35 | 0x23 | PanoramaAutoH | Boolean | |
36 | 0x24 | PanoramaSpeedH | BER | Normally ranging -8~+8 (but not limited to it) |
37 | 0x25 | PanoramaAutoV | Boolean | |
38 | 0x26 | PanoramaSpeedV | BER | Normally ranging -8~+8 (but not limited to it) |
71 | 0x47 | Lower Layer | 16bitVector | Size must be same as Width (#2/0x02) multiplied by Height (#3/0x03) |
72 | 0x48 | Upper Layer | 16bitVector | Size must be same as Width (#2/0x02) multiplied by Height (#3/0x03) |
81 | 0x51 | Events | Array2D | Up to 9999 Events can be on a Map. |
91 | 0x5B | SaveCount |
This structure contains the data of all events on the map. The following table contains the substructure of how a single event is built.
Content | DataType | Details | ||
---|---|---|---|---|
1 | 0x01 | Name | String | Less than 12 Bytes |
2 | 0x02 | X | BER | |
3 | 0x03 | Y | BER | |
5 | 0x05 | Event Pages | Array2D |
This structure contains the pages on an event on the map. The following table contains the substructure of how a single page is built.
Content | DataType | Details | ||
---|---|---|---|---|
2 | 0x02 | Page Conditions | Array1D | |
21 | 0x15 | CharSet Filename | String | |
22 | 0x16 | Character/UpperTile | BER | |
23 | 0x17 | FacingDirection | BER | |
24 | 0x18 | CharacterStep | BER | |
25 | 0x19 | TransparentFlag | Boolean | |
31 | 0x1F | MovementType | BER | |
32 | 0x20 | MoveFrequency | BER | |
33 | 0x21 | TriggerType | BER | |
34 | 0x22 | Priority | BER | |
35 | 0x23 | NoOverlapFlag | Boolean | |
36 | 0x24 | AnimationType | BER | |
37 | 0x25 | Speed | BER | |
41 | 0x29 | Move Route | Array1D | |
51 | 0x33 | DataSize | BER | |
52 | 0x34 | Page Contents |
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.
Content | DataType | Details | ||
---|---|---|---|---|
1 | 0x01 | TriggerBits | BER | 1: Switch1, 2: Switch2, 4: Variable, 8: Item, 16: PartyActor, 32: Timer1, 64: Timer2 (2003) |
2 | 0x02 | Switch1ID | BER | |
3 | 0x03 | Switch2ID | BER | |
4 | 0x04 | VariableID | BER | |
5 | 0x05 | VariableValue | BER | |
6 | 0x06 | ItemID | BER | |
7 | 0x07 | ActorID | BER | |
8 | 0x08 | Timer1Value | BER | Total Seconds |
9 | 0x09 | Timer2Value | BER | (2003) Total Seconds |
10 | 0x0A | VariableOperator | BER | (2003) 0: ==, 1: >=, 2: <=, 3: >, 4: < 5: != |
This structure contains the data of an event-page's pre-defined move-route.
Content | DataType | Details | ||
---|---|---|---|---|
11 | 0x0B | DataSize | BER | |
12 | 0x0C | CommandsList | ||
21 | 0x15 | RepeatFlag | Boolean | Repeat Route when End is reached |
22 | 0x16 | IgnoreFlag | Boolean | Ignore a step when it can't be done |