Custom LDD part sets

From Brickwiki
Jump to: navigation, search

LEGO Digital Designer makes parts available in predefined "sets," which may or may not correspond to the part sets used for pricing on LEGO Factory.

These part sets are defined in simple XML files within the LEGO Digital Designer file hierarchy. Here's how you can find them:

  • On Macintosh, control-click the LEGO Digital Designer application and choose "Show Package Contents." Navigate therein to Contents/Resources/database/bricks.
  • On Windows if you did the default installation, navigate to here: C:\Program Files\LDD\database\bricks and you'll see the .tix and .png files... for example myRobot seems to be C:\Program Files\LDD\database\bricks\000021LEGOFactoryMyRobot.tix

You will see two files for each part set. One ends in .png, and is the icon to be used for that set within LDD. The other ends in .tix, and defines the set itself.

Contents

Structure of a .tix File

A .tix file is an XML file consisting of a single <Collection> element. Within that are two kinds of subelements: <SetItem>, which defines a part type in the set, and <Identifier>, which holds various metadata.

Here is a simple example of a .tix file containing three 1x1 Earth Blue plates (note the structure): <XML> <?xml version="1.0"?> <TabulaXML>

 <Collection>
   <SetItem>
     <Primitive>
       <Material>
         <Identifier>
           <Origin>MaterialID</Origin>
           <Name>140</Name>
         </Identifier>
       </Material>
       <Identifier>
         <Origin>DesignID</Origin>
         <Name>3024</Name>
       </Identifier>
     </Primitive>
     <Quantity>3</Quantity>
   </SetItem>
   <Identifier>
     <Origin>LddSetName</Origin>
     <Name>200099LEGOFactoryEarthPlates</Name>
   </Identifier>
   <Identifier>
     <Origin>SetDescriptionEng</Origin>
     <Name>LEGO Factory - Earth Plates</Name>
   </Identifier>
   <Identifier>
     <Origin>SetDescriptionDeu</Origin>
     <Name>LEGO Factory - Earth Plates</Name>
   </Identifier>
   <Identifier>
     <Origin>SetType</Origin>
     <Name>1</Name>
   </Identifier>
   <Identifier>
     <Origin>LaunchDate</Origin>
     <Name/>
   </Identifier>
   <Identifier>
     <Origin>ExpiryDate</Origin>
     <Name>20051231</Name>
   </Identifier>
   <Identifier>
     <Origin>Starter</Origin>
     <Name>1</Name>
   </Identifier>
   <Identifier>
     <Origin>Priority</Origin>
     <Name>1000099</Name>
   </Identifier>
   <Identifier>
     <Origin>Version</Origin>
     <Name>1</Name>
   </Identifier>
 </Collection>

</TabulaXML> </XML>

In this trivial example, the file is mostly <Identifier> tags, but of course in a real part set these are outnumbered by <SetItem> entries.

Within each <SetItem> are two important identifiers: the MaterialID, which defines the part color, and the DesignID, which is the LEGO part number. So in the above example, 3024 is the part number for a 1x1 plate, and 140 is the material ID for Earth Blue. Each <SetItem> also contains a <Quantity> tag defining how many of that part are in the set.

The order in which the different colors of identical bricks appear in the Brick Window, is determined by the order in which they appear in the .tix file. The .tix file does not set the order in which the types of bricks are displayed in the Brick Window, or which category they are found in via the Category Window.

A Perl script can be used to produce a rough TIX file.

Adding Custom Sets (part collections)

You can make your own .tix and .png files, perhaps using the stock ones as examples or starting points, and add them next to the others. These will be available upon your next launch of LDD.

You'll need to know what part number corresponds to what part.

Note for Macintosh users: the bricks folder may be locked, in which case the Finder will ask you to authenticate when you drag in your custom files. Just enter your password, and the files should move successfully.

Custom icons may be created by mimicking the naming scheme used by LEGO and creating a numbered PNG file corresponding to your custom .tix file. For example, if your custom tix is named 000099LEGOFactoryMyCustom.tix, you will need a .png file with the same naming scheme: 000099LEGOFactoryMyCustom.png. The system is actually more flexible, but I won't get into that here. Be sure you have also set the internal names and priority XML tags toward the end of your custom .tix. If you would like to use transparency mask with your icon. Add that mask to the alpha channel of your PNG file. (NOTE: This has been verified--I've done it a dozen times)

NOTE: It has not yet been verified that doing this allows you to upload designs to LEGO Factory, but certainly, if you set up bag collections, you'd want to stick to just the parts that are in THEIR assortments, and in the right proportions... (remove this notice once it's verified it works!)

(OK, it works. See this thread on LEGOFan.org... if the file has only valid palette parts you can save, change palettes and upload successfuly)

Material IDs

Only a few material IDs have been discovered so far. Here's a good trick for discovering more: make a .tix file containing parts of the same type, but for each one, set the <Quantity> equal to the Material ID. Then launch LDD, and mouse over each part in your custom set. When LDD shows you the quantity available, you can write this down as the material ID along with the corresponding color.

However you need only do that if you want to confirm. The following table has been generated for you already and has all the material IDs that the LEGO factory will accept...

Material IDs

Material ID Color Name
1 White
2 Grey
3 Light Yellow
4 Brick Red
5 Brick Yellow
6 Light Green
7 Orange
8 Cobalt Blue
9 Light Reddish Violet
10 Transparent
11 Pastel Blue
12 Light Orange Brown
13 Red Orange
14 Pastel Green
15 Lemon
16 Pink
17 Rose
18 Nougat
19 Light Brown
20 Nature
21 Bright Red
22 Medium Reddish Violet
23 Bright Blue
24 Bright Yellow
25 Earth Orange
26 Black
27 Dark Grey
28 Dark Green
29 Medium Green
36 Light Yellowish Orange
37 Bright Green
38 Dark Orange
39 Light Bluish Violet
40 Transparent
41 Transparent Red
42 Transparent Light Blue
43 Transparent Blue
44 Transparent Yellow
45 Light Blue
47 Transparent Fluorescent Reddish Orange
48 Transparent Green
49 Transparent Fluorescent Green
50 Phosphorescent White
100 Light Red
101 Medium Red
102 Medium Blue
103 Light Grey
104 Bright Violet
105 Bright Yellowish Orange
106 Bright Orange
107 Bright Bluish Green
108 Earth Yellow
109 Black IR
110 Bright Bluish Violet
111 Transparent Brown
112 Medium Bluish Violet
113 Transparent Medium Reddish Violet
115 Medium Yellowish Green
116 Medium Bluish Green
118 Light Bluish Green
119 Bright Yellowish Green
120 Light Yellowish Green
121 Medium Yellowish Orange
123 Bright Reddish Orange
124 Bright Reddish Violet
125 Light Orange
126 Transparent Bright Bluish Violet
127 Gold
128 Dark Nougat
131 Silver
133 Neon Orange
134 Neon Green
135 Sand Blue
136 Sand Violet
137 Medium Orange
138 Sand Yellow
139 Copper
140 Earth Blue
141 Earth Green
143 Transparent Fluorescent Blue
145 Metallic Sand Blue
146 Metallic Sand Violet
147 Metallic Sand Yellow
148 Metallic Dark Grey
149 Metallic Black
150 Metallic Light Grey
151 Sand Green
153 Sand Red
154 Dark Red
157 Transparent Fluorescent Yellow
158 Transparent Fluorescent Red
168 Gun Metallic
176 Flip/Flop Red
178 Flip/Flop Yellow
179 Flip/Flop Silver
180 Curry
182 Transparent Bright Orange
183 Metallic White
184 Metallic Bright Red
185 Metallic Bright Blue
186 Metallic Dark Green
187 Metallic Earth Orange
189 Reddish Gold
190 Fire Yellow
191 Flame Yellowish Orange
192 Reddish Brown
193 Flame Reddish Orange
194 Medium Stone Grey
195 Royal Blue
196 Dark Royal Blue
198 Bright Reddish Lilac
199 Dark Stone Grey
200 Metallic Lemon
208 Light Stone Grey
209 Dark Curry
210 Faded Green
211 Turquoise
212 Light Royal Blue
213 Medium Royal Blue
216 Rust
217 Brown
218 Reddish Lilac
219 Lilac
220 Light Lilac
221 Bright Purple
222 Light Purple
223 Light Pink
224 Light Brick Yellow
225 Warm Yellowish Orange
226 Cool Yellow
227 Transparent Bright Yellowish Green
228 Transparent Medium Bluish Green
229 Transparent Light Bluish Green
230 Transparent Bright Purple
231 Transparent Flame Yellowish Orange
232 Dove Blue
234 Transparent Fire Yellow
236 Transparent Bright Reddish Lilac
268 Medium Lilac
283 Light Nougat
284 Transparent Reddish Lilac
285 Transparent Light Green
298 Cool Silver, Drum Lacq
301 Metalized Silver
100001 Metalized Silver
1100028 Dark Green with Road
1101028 Dark Green with Road Corner


It's possible that the material IDs will always match the LEGO Color Table at peeron.com. The colors checked so far do match, but it's not yet known whether this is true for all colors.

Material IDs are defined in a separate .tix file located at C:\Program Files\LEGO Software\LEGO Digital Designer\database\ui\tabula.tix.

A Perl script was used to generate the above color list from tabula.tix, shown below. It has structure as follows:

<XML> <?xml version="1.0"?> <TabulaXML>

 <MaterialTable>
   <Material>
     <Colour>
       <RGB>
         <Red>215</Red>
         <Green>197</Green>
         <Blue>153</Blue>
       </RGB>
     </Colour>
     <Identifier>
       <Origin>Description-dan</Origin>
       <Name>Teglgul</Name>
     </Identifier>
     <Identifier>
       <Origin>Description-deu</Origin>
       <Name>Ziegelgelb</Name>
     </Identifier>
     <Identifier>
       <Origin>Description-eng</Origin>
       <Name>Brick Yellow</Name>
     </Identifier>
     <Identifier>
       <Origin>Lego Material ID</Origin>
       <Name>5</Name>
     </Identifier>
     <Identifier>
       <Origin>Style</Origin>
       <Name>Plastic</Name>
     </Identifier>
   </Material>
 </MaterialTable>

</TabulaXML> </XML>

(Please contribute more material IDs here as you confirm them.)

Design IDs

You'll need to know the "Design IDs" (part ids) of parts for this to work. A similar trick for discovering parts as is given above for material IDs should work.

Design IDs

LEGO Design ID LDraw number/Part Name and Peeron Link
3024 3024 - 1x1 plate

In this example, the LDRAW number is the same as the one used by LDD, but this does not seem to be true across the board. In many instances, especially in the case of transparent bricks, LDD uses a different number.

Note: it is known that LEGO sometimes uses different molds for transparent bricks or for bricks that carry plating or coatings, due to wall thickness issues. Since many LDraw numbers are taken from the numbers molded in to the bricks themselves, it makes sense that those correspond there if LDD is using LEGO internal numbers for things.

It appears that a set of files describing each available piece is in this directory: C:\Program Files\LEGO Software\LEGO Digital Designer\database\geometry\. The numbers there also seem to match relevant LDraw numbers.

Unfortunately, these are binary files, so that cannot be confirmed.

(Please contribute more Design IDs here as you confirm them.)

Personal tools