Welcome Guest!

Did you know you that by registering, you can gain access to new special powers? You’ll be able to reply to Topics, create your own Topics, talk in our Chatbox, message members, manage your profile, access extra content and much more! Best of all, this message & ads will vanish!

JimbobJeffers

Tutorial: Adding Custom Decals into LDD

39 posts in this topic

Adding Custom Decals into LEGO Digital Designer

 

As great as LEGO Digital Designer is, it doesn't contain all the textures ever produced by the LEGO group. This tutorial will show you how to mod in custom textures to Please login or register to see this link. by Please login or register to see this link.

  • Please login or register to see this link. (or any decent text editor, this is free and recommended)
  • A decal in PNG format
  •  


     

    Step 1: Preparing Please login or register to see this link.

    Now open the LIF Extractor in a new window. Navigate inside the folder relevant to your operating system - for my 32 bit computer, this is LIF_Extractor_Win_32bit. Drag the db.lif file onto the LIFExtractor.exe file inside, and it will begin the extraction process. This might take a while depending on your computer - on my Windows 7 netbook it took almost an hour, but on my old Windows XP laptop it took about a minute - so feel free to pop off to the nearest Support Station for a sandwich. Do not get impatient; just wait for the command window to disappear. Once it does, the extraction is complete.

    Please login or register to see this link.

    Ta-da! You'll see a shiny new folder called db sitting next to the db.lif file. Now, to set Please login or register to see this link.

    That's it, Step 1 is complete and you're all set!

     


     

    Step 2: Adding Custom Decals

    Now to the main part of this tutorial. Adding custom decals into Please login or register to see this link.

    The Decorations folder contains over 1,500 PNG images, all of which are used as decals on bricks and minifigure parts. The DecorationMapping.xml file is just one big list of all these files, and tells Please login or register to see this link.

    Here you can see I've created a masterpiece of a face decal and placed it in the Decorations folder. Now that the decoration is in the correct location, go back out into the db folder, and open DecorationMapping.xml in Notepad++ (or another decent text editor). You will see, after the first two lines, an indented list many lines in length. The format is:

            <Mapping decorationID="54580" designID="3626" surfaceID="1"/>

    The decorationID number is the name you gave your decal in the Decorations folder, excluding the extension. If you remember, in this example it is 10001. The designID number refers to the part that the decoration can be placed onto - in this case, it is 3626, which is the minifigure head piece.

    Tip: To find out the number of a particular piece, look for a decal that the relevant piece currently uses in the Decorations folder (for example, 55071). Then search this number in the DecorationMapping.xml file, and the associated designID is the part's ID (55071 has designID 3070, hence the 1x1 tile piece's ID is 3070).

     

    My custom decoration is intended to be used on a minifigure's head, so I'll leave it as 3626. Copy any line you wish and paste it at the top of the list, after the first two lines (or manually type a new one). Then change the decorationID to your decal's name, and the designID to your part's ID. By placing your decoration at the top of the list, Please login or register to see this link.

    Save the file, close it, and you're done!

     


     

    Step 3: Checking Out Your New Decal

    Launch Please login or register to see this link.

    But what happens if you want to distribute this file? Well, the decoration ID of each part is saved to the file. If you save your model with a custom decal on it, then load it into an unmodded (or modded without the current decal in it) version of Please login or register to see this link. pointed out that updating Please login or register to see this link. 's tutorial Please login or register to see this link. .

    8 people like this

    Share this post


    Link to post
    Share on other sites

    Two things:

    • The position of the decal in DecorationMapping.xml matters. If you it near the bottom of the list, the texture will be listed near the bottom of list. Because of the varying amount of decals (mainly on heads), doing this can make the GUI selector cut off (even further) on smaller screens. Putting it near the top of the list (thus near the top of the selector) is always advised. :)
    • That is the second time you have linked to that tutorial. Sounds like I need to back on updating it for the newest version. ;P
    1 person likes this

    Share this post


    Link to post
    Share on other sites

    Two things:

    • The position of the decal in DecorationMapping.xml matters. If you it near the bottom of the list, the texture will be listed near the bottom of list. Because of the varying amount of decals (mainly on heads), doing this can make the GUI selector cut off (even further) on smaller screens. Putting it near the top of the list (thus near the top of the selector) is always advised. :)
    • That is the second time you have linked to that tutorial. Sounds like I need to back on updating it for the newest version. ;P

    Er.... your counting is off.

    Also, LDD has a scrollbar in the decal window now, so nothing gets cut off.

    2 people like this

    Share this post


    Link to post
    Share on other sites

    The position of the decal in DecorationMapping.xml matters. If you it near the bottom of the list, the texture will be listed near the bottom of list. Because of the varying amount of decals (mainly on heads), doing this can make the GUI selector cut off (even further) on smaller screens. Putting it near the top of the list (thus near the top of the selector) is always advised. :)

    I did kind of say that here, but maybe it isn't clear enough:

    By placing your decoration at the top of the list, LDD will read it first, so it will appear at the top of the decorations list in the application.

     

    That is the second time you have linked to that tutorial. Sounds like I need to back on updating it for the newest version.

    Yes you do! ;)

     

    Also, LDD has a scrollbar in the decal window now, so nothing gets cut off.

    I did not know that, thanks. 

    Share this post


    Link to post
    Share on other sites

    Thanks for this! Now when people ask me how to do this, I will direct them here!

     

    This might take a while depending on your computer - on my Windows 7 netbook it took almost an hour, but on my old Windows XP laptop it took about a minute - so feel free to pop off to the nearest Support Station for a sandwich.

    Ouch! I can't imagine why it would have taken that long.
    1 person likes this

    Share this post


    Link to post
    Share on other sites

    Thanks for this! Now when people ask me how to do this, I will direct them here!

    Thank you!

     

    This might take a while depending on your computer - on my Windows 7 netbook it took almost an hour, but on my old Windows XP laptop it took about a minute - so feel free to pop off to the nearest Support Station for a sandwich.

    Ouch! I can't imagine why it would have taken that long.

    I'm not sure either, it can run programs such as Adobe Flash CS6, LDD, Minecraft (just about)... Maybe it's just the sheer number of files it had to search through froze it up. That, and I had several RRU tabs open along with Word and Paint.net...

    Share this post


    Link to post
    Share on other sites

    One thing that should probably be mentioned, is that it is best the not have the custom image touching the edge, if that makes sense. The pixels on the edge of an image may be stretched or cut off depending on the part.

    Share this post


    Link to post
    Share on other sites

    Ah yes, thank you. In addition to that I'll add that LDD stretches decals, if it isn't obvious already looking at the textures.

    Share this post


    Link to post
    Share on other sites

    Ah yes, thank you. In addition to that I'll add that LDD stretches decals, if it isn't obvious already looking at the textures.

    I meant more that the pixels on the edge of a decal can be distorted, or whatever. Best way to explain is with an example, if you look at Please login or register to see this link. picture from one of my models, and look at the vest on the minifig (which is a custon decal) you can see the line on the bottom is thicker than the others, despite being the same size in the image itself, simply because it touches the edge and got stretched. Similarly, the black 'v' shape on the yellow plate (also a custom decal) is ever so slightly cut off on the edges (though it's hard to tell by how much as it's a little cut off in the original...)

    So what I'm saying is, when making the decal it would help to leave a one-pixel border around it that's totally empty, for good measure.

    1 person likes this

    Share this post


    Link to post
    Share on other sites

    This sounds like a stupid question, but what is an extension?

     

    I did everything except that, thinking it's nothing. But I think it is important since my face didn't show up in LDDE. So...

    Share this post


    Link to post
    Share on other sites

    This sounds like a stupid question, but what is an extension?

     

    I did everything except that, thinking it's nothing. But I think it is important since my face didn't show up in LDDE. So...

    I'm so sorry that I never saw this question. The extension is just the file type, e.g. .PNG, .JPG, and so on. In this case it'll always be .PNG.

    Share this post


    Link to post
    Share on other sites

    I have been trying to decorate LEGO part number 30366, as that part has various existing prints, but I can't seem to put anything on it when I am in Lego Digital Designer. When I try to click on that part with the decoration tool nothing happens, it doesn't pick anything up. 

    I followed your directions and it worked for al LEGO parts in Lego Digital Designer so far, with the first excpetion of said part. I also tried changing the "surfaceID" to different variables, without results. Am I doing something wrong when it concerns element number 30366? Or is it simply not meant for decoration? Similar semi-spherical elements, e.g. part 50747, have no trouble being decorated though.

    Share this post


    Link to post
    Share on other sites

    If the part does not have any decorations by default, you can't add them, unfortunately. Even if the pieces come with printing IRL. 

    Share this post


    Link to post
    Share on other sites

    Yup, as Sushigidoge said. In order to add decorations to a part without them I believe you'll need to modify the 3D files of the part in question, which I have no knowledge in, sorry.

    Share this post


    Link to post
    Share on other sites

    That's unfortunate, however there exist parts in Lego Digital Designer which do not have a decoration by default - e.g. part  50747 like I previously referred to - but can be decorated by the method you described. I presume one is just out of luck when it comes down to specific non-decoratable parts.

    Share this post


    Link to post
    Share on other sites

    PLEASE HELP!! I've been at this for a few hours now and it doesn't work. I followed the direction to the point and when insert the custom decals into the file and save and open LDD i cant access the decoration tool in the paint thingy. So now LDD decorations dont work. I checked if the file had a mistake in the coding in notepad++ but it checks out so im stumped. Can someone help me out?

    Share this post


    Link to post
    Share on other sites

    That's unfortunate, however there exist parts in Lego Digital Designer which do not have a decoration by default - e.g. part  50747 like I previously referred to - but can be decorated by the method you described. I presume one is just out of luck when it comes down to specific non-decoratable parts.

    ​Really? I never knew of this, I guess I haven't really messed around with it much. Would you be able to list those parts? Maybe they had decorations before which were removed in an update if outdated, or alternatively they could be preparing them for future, I don't know.

     

    PLEASE HELP!! I've been at this for a few hours now and it doesn't work. I followed the direction to the point and when insert the custom decals into the file and save and open LDD i cant access the decoration tool in the paint thingy. So now LDD decorations dont work. I checked if the file had a mistake in the coding in notepad++ but it checks out so im stumped. Can someone help me out?

    ​Are you able to provide a screenshot of the program? I've never heard of the decoration tool disappearing. I don't know if I'll be able to help but it's a start.

    Share this post


    Link to post
    Share on other sites

    Hi guys, I really need some help(hoping that someone will see this).The lif extractor doesn't work properly because in the roaming folder the Lego Company folder is enteierly missing and when i extract the things from the assets.lif file it extracts only the folders(which are empty) and the db file which I can't extract no matter how many times I try (it just start and stops without extracting the db folder).  I have the LDD from the Lego site with the last updates, but the Lego Company folder, along with the other files, won't show in the roaming folder.Please help me and sorry for my english which isn't very good.

    Share this post


    Link to post
    Share on other sites

    PLEASE HELP!! I've been at this for a few hours now and it doesn't work. I followed the direction to the point and when insert the custom decals into the file and save and open LDD i cant access the decoration tool in the paint thingy. So now LDD decorations dont work. I checked if the file had a mistake in the coding in notepad++ but it checks out so im stumped. Can someone help me out?

    I've encountered this before as i constantly add decals into LDD. The cause is that you mistyped the following:

    The ID number

    The "<Mapping decorationID="#" designID="#" surfaceID="1"/>" code itself

    However i have no clue how to fix the inability to check again thing though.

    Hi guys, I really need some help(hoping that someone will see this).The lif extractor doesn't work properly because in the roaming folder the Lego Company folder is enteierly missing and when i extract the things from the assets.lif file it extracts only the folders(which are empty) and the db file which I can't extract no matter how many times I try (it just start and stops without extracting the db folder).  I have the LDD from the Lego site with the last updates, but the Lego Company folder, along with the other files, won't show in the roaming folder.Please help me and sorry for my english which isn't very good.

    I have no idea how to fix this: I've never encountered it before. Maybe you're using some other version of LDD and the file is named differently?

    Share this post


    Link to post
    Share on other sites

    I'm having a problem of my own with this process now. I'd made it work in the past, before an update wiped out those changes, so I've been trying it again recently.

    I unzipped the LIF file and checked to be sure all it's internal files and folders were in order in the new db folder, as the instructions said to do. I also made sure to remove the original db.lif file from the Lego folder and put it elsewhere as a backup. With the db folder in place in the correct folder, I opened Lego Digital Designer to test and be sure it was working.

    First, LDD crashed. When I opened it a second time, it ignored the db folder and began downloading every single update again, creating a brand new db.lif file right there in the Lego folder. This process took forever, and the newly created db.lif file naturally didn't have any custom decals in it. I have tried this several times now, and keep having this same problem - rather than reading out of the db folder, LDD is creating a brand new db.lif file. I also tried re-compressing the db folder with decal edits into a new db.lif file on it's own, and LDD proceeded to overwrite that file in this same manner upon opening the program (after an initial crash).

    For reference, I am on a Macbook Pro, I have made Game Extractor work for me via jiggery pokery. Extracting the files isn't the issue, it's getting the program to actually read them from the db folder instead of creating a new db.lif file. Again, I've done this in the past and it worked, but an update reset it a while back, and I've neglected to do it all again until now. I'm beginning to wonder if Lego hasn't somehow patched the game to immediately create a new db.lif file if it senses anything has been changed or tampered with from a default of what should be in the .lif originally.

    Share this post


    Link to post
    Share on other sites

    NYK3750: I haven't ventured into LDD modding for a while. Perhaps the latest update changed the location of the db.lif file? I really have no idea but I can't believe it would have. Did you run LDD once after installing it, before trying to extract the file?

    Nanoline: Again, I'm not really sure what the problem could be, but on a guess perhaps the latest version has prevented the db.lif file from being extracted? As in, if it doesn't detect the file even if you have a folder, it just creates a new one?

    Maybe a recompiler is needed in addition to the decompiler for future modding.

    Share this post


    Link to post
    Share on other sites

    Yes, I runned it once and updated it and opened it once again but the extractor still doesn't work. Like Nanoline it worked for me once but after I entered in LDD it was updating again, and after this it didn't worked anymore. Besides this, the new update it's very strange, because after I install LDD (version 4.3.6) I open LDD and update it and after that a new installation opens(for version 4.3.8), thing that didn't happened me in the past updates.I tried to install in a diferent location the update and worked like an other LDD, just updated to the actual version, still no Lego Company in the roaming folder, and if I uninstall one version (no matter which one) the other works fine but my computer show it like it isn't installed(I use geek uninstaller to clean the things that remains hidden in computer). I don't know if I mess up with something when I installed the update or uninstalled with geek. Nanoline, I think that the Lego Company wants to protect their product and I think thats why it make LDD harder to mod each time it updates.Thank you for trying to help me, I apreciate that even if the problem didn't solved :).Hope I didn't took to much from your time.

    Share this post


    Link to post
    Share on other sites

    Nanoline, I think that the Lego Company wants to protect their product and I think thats why it make LDD harder to mod each time it updates.

    No. They don't care about our mad tinkery with this game, and IIRC we can make custom decals per the Play Fair Policy.

    Nanoline, i think that you're issue is the extractor. I know you said it works fine and you don't need the LIF Extractor but if you use it, you don't need to re-use the extractor. Plus i think your problem IS linked to the extractor you're using. And i think another source of the problem is that you made another DB file, when thats not really necessary. (You can just simply add in the decals and they won't harm anything. Just like any other normal decal.)

    Edited by MaelstromIslander

    Share this post


    Link to post
    Share on other sites

    Nanoline, i think that you're issue is the extractor. I know you said it works fine and you don't need the LIF Extractor but if you use it, you don't need to re-use the extractor. Plus i think your problem IS linked to the extractor you're using. And i think another source of the problem is that you made another DB file, when thats not really necessary. (You can just simply add in the decals and they won't harm anything. Just like any other normal decal.)

    The issue is that on a Mac, I cannot make use of the LIF Extractor, as it only runs on Windows. Unless there's some jiggery pokery way to make that work too (one that doesn't involve buying Windows and loading it onto the Mac with Bootcamp).

    If there is a way to run the provided LIF Extractor on Mac, I'd love to learn it out.

    Share this post


    Link to post
    Share on other sites

    Hello!

    I've been using this for a while, but I started drifting away from LDD. Now I'm using it again, and I wanna use this. But it looks like I can't. I've sort of forgotten how to do this, and that video tutorial must have been taken down or something. I can't seem to drag the db.lif into the LIFExtractor. Gives me a 'File not found or no read permission' error. 

    I'd really like to use this again, and if anyone can help, please help ! !

     

    EDIT: I found a way to copy db.lif into the LIFExtractor, but then it tells me some python thing is missing and that I should reinstall it.

    ??

    Edited by CM4Sci

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!


    Register a new account

    Sign in

    Already have an account? Sign in here.


    Sign In Now