Download | Reference | Community | Parts Library | Login

  Tutorials | Books | Documentation | Specifications | FAQ | Glossary | Help Desk

Reference: Specifications: Official Model Repository Filenames and Headers

Official Model Repository Filenames and Headers

The Offical Model Repository has developed standards for file headers and file names. This is for consistency between models and easy indexing by a script and a database. Here is outlined the standard for the filenames and headers.

The file header must be concise and at the same time display all the information needed for the model/submodel. Here is the official file header for the Repository:

Main Model Header

0 7140 X-Wing Fighter
0 Name: main.ldr
0 Author: Tim Courtney 
0 Official Model Repository

Submodel Header

0 7140 X-Wing Fighter, Main Fuselage
0 Name: m-2a.ldr
0 Author: Tim Courtney 
0 Official Model Repository

Minifig Header

0 7140 X-Wing Fighter, Luke Skywalker Mini-figure
0 Name: mf-1.ldr (see below [1])
0 Author: Tim Courtney 
0 Official Model Repository

Here are the terms used in the Repository along with their contextual meaning.

Set - Display of every model and submodel (in essence the whole box).

Model - Individual model in set. For example, Service Vehicle and X-Wing Fighter on 7140. Includes such models as cars, airplanes, helicopters, etc.

Submodel - Sub-assembly (in instructions) of a model. Also used as the sub- assemblies that make up rotating parts of the model.

Minifig - Specific to a mini-figure submodel within a set.

Filenames and Storage
Filenames for the Official Model Repository files are restricted to the MS-DOS compatible 8.3 name length. Each set in the OMR is packaged into an MPD file. This MPD file can be extracted to create anothe subdirectory for the particular set (see diagram below). Within that are several files which make up the set.

The set subdirectory uses the set number for a name, and contains an optional modifier and the two-digit year. This will be accomplished by placing these directory instructions within the MPD file which contains the entire set. All of this will fall under a sets/ subdirectory under the models/ directory.

              Four digit TLG set number
              | Optional modifier to the year [2]
              | |
              | |  Two digit year - year set was released.
              | |  |

Within the set's subdirectory, the following filenames will represent the following aspects of the set/models.

main.ldr - Main instructions, including all models that can be built at once. Basically, this is just a display of m1.ldr through m(x).ldr

m-1.ldr   - First model in main instructions
m-1a.ldr  - First submodel of first model
m-1aa.ldr - First component of first submodel of first model
m-1ab.ldr - Second component of first submodel of first model
m-2.ldr   - Second model of main instructions
alt.ldr   - Alternate instructions, display file
a-1.ldr   - First model of alt. instructions
a-1a.ldr  - First submodel of first alternate model

To use further levels of submodels, one could continue adding on letters to the end until a total of 8 characters in the main filename is reached.

Minifig Submodels
Minifig submodels will be named in order of appearance in the instructions.

mf-1.ldr (7140) Luke Skywalker minifig
mf-2.ldr (7140) Biggs Darklighter minifig
mf-3.ldr (7140) Mechanic minifig

Optional Modifier to the Year
The optional modifier to the year comes into play when there are more than one set in the specific year that bear that set number. This usually takes place with the multi-packs of the late 80's and early 90's, but also occurs in other sets. For example, set 1974, a multi-pack:

                         Optional modifier to the year
C:\LDRAW\MODELS\SETS\1974A-90\MAIN.ldr Flyercracker U.S.A.
C:\LDRAW\MODELS\SETS\1974B-90\MAIN.ldr Smuggler's Hayride
C:\LDRAW\MODELS\SETS\1974C-90\MAIN.ldr Star Quest

Each seperate set/model that was released with that specific set number in that year gets a modifier in its directory. The files within the directory still follow the standard naming system. Typically the first set in a pack, or the first set to be released with that number would get A as the modifier, the second B, etc.

This system of headers and naming files will be implimented on the Official Model Repository for the re-distribution of official sets to LDraw users. Each individual author of official models used in the OMR will recieve credit for the model in the header and on the website. The OMR does not intend to detract from the individual author or the author's website, but seeks to distribute LEGO models to LDraw users free of charge.

Editor's Note: This document is derived from the original LUGNET post outlining the standard at:

For questions, contact Tim Courtney.

  Tutorials | Books | Documentation | Specifications | FAQ | Glossary | Help Desk

© 2003 See Legal Info for details.

In Memory of James Jessiman - 1971-1997