Jump to content

LEGO Digital Designer LIF Extractor


JrMasterModelBuilder
 Share

Recommended Posts

JrMasterModelBuilder

Incidentally, any idea what decorationID numbers are based off of?

Most likely random number generator. The design ID is the brick. Surface ID is which side it's on.

I take that back, it's based on the brick's decoration ID from sets.

Can you provide an example?

I can confirm that .g files contain geometry data:

Do they contan all the geometry? Also, how did you do that?

Link to comment
Share on other sites

Do they contan all the geometry? Also, how did you do that?

Yes, including texture data wherever applicable. I know because I spent 2 days reverse engineering the file format :P

Thing is, only less than half of the file is used on the geometry data. The files hold much more stuff, but I have no idea what that is exactly.

I have managed, however, to load every file that has no texture data in it, and know more or less how to go about with the ones that do.

I can probably post the viewer I wrote at some point. I haven't decided yet.

Link to comment
Share on other sites

  • 2 weeks later...

I should point out tha if you update to a new release of LDD and your LIFs are extracted, upon loading LDD, all your extracted files will be deleted (including new/modded files), and you will need to reextract both LIFs in Program Files and AppData. You might want to make backups of all your LDD modding stuff. ;)

  • Like 1
Link to comment
Share on other sites

JrMasterModelBuilder

I should point out tha if you update to a new release of LDD and your LIFs are extracted, upon loading LDD, all your extracted files will be deleted (including new/modded files), and you will need to reextract both LIFs in Program Files and AppData. You might want to make backups of all your LDD modding stuff. ;)

Good to know. I had been wondering what would happen when installing updates.

Link to comment
Share on other sites

  • 1 month later...

I made Rocket Racer's face as a decal.

ID:31337

How to change:

Edit DecorationMapping.xml

Add this line:


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

Save this image into the Decorations folder

https://www.dropbox....ctrrv/31337.png

Launch LDD!

(Im'a do the other decals soon, thanks jamesster for the texture. :D )

That's exactly what I did here. :P But, nobody cared to ask me how I did it, so I never said... ;P

The dropbox files are gone! Help please?

Link to comment
Share on other sites

  • 2 months later...
kangmingjie

Hello, 

 

I'm new to the forums (been stalking this topic for a while actually). I've installed LIF Extractor and the other files, but I still can't make the program work. I've put everything in the LDD file under the %appdata% folder. I'm sure I've done something wrong. Can someone help me or am I being too noobish? 

 

Thanks,

Kangmingjie

 

Link to comment
Share on other sites

JrMasterModelBuilder

Hello, 

 

I'm new to the forums (been stalking this topic for a while actually). I've installed LIF Extractor and the other files, but I still can't make the program work. I've put everything in the LDD file under the %appdata% folder. I'm sure I've done something wrong. Can someone help me or am I being too noobish? 

 

Thanks,

Kangmingjie

You should be able to just take db.lif from inside the %appdata% folder and drag-and-drop it onto LIFExtractor.exe and it will then extract.

Link to comment
Share on other sites

  • 3 months later...
kangmingjie

Hello again. 

I'm able to add the custom decorations that I want, but only in LDD Extended mode. If I try to switch back to regular mode, the program closes. I thought I could get around this by putting the decorations in a model, save the model as and LXF and then use that LXF as a user palette, but that won't let LDD open at all. I know I'm doing something wrong, I'm just not sure what it is. Do I need to make XML Primitives for each decoration I add?

Thanks. 

Link to comment
Share on other sites

Hello again. 

I'm able to add the custom decorations that I want, but only in LDD Extended mode. If I try to switch back to regular mode, the program closes. I thought I could get around this by putting the decorations in a model, save the model as and LXF and then use that LXF as a user palette, but that won't let LDD open at all. I know I'm doing something wrong, I'm just not sure what it is. Do I need to make XML Primitives for each decoration I add?

Thanks. 

How exactly did you mod in the custom decorations? Did you add the new images in, as well as adding their new entries to the XML file?

Link to comment
Share on other sites

kangmingjie

How exactly did you mod in the custom decorations? Did you add the new images in, as well as adding their new entries to the XML file?

 

I added the .png's to the Decorations folder and added their entries to the XML. I can use them just fine in LDD Extended Mode. The problem is when I switch back to Regular Mode, the program closes. 

 

 

**Nevermind, I figured it out. I was naming the images with 7 digit numbers. I switched to 5 digits and that seemed to do the trick. My old custom user palette had too many pieces in it that were not even modded. I added only the modded ones and it works flawlessly. Thanks for the help everyone! This is an amazing tool you have here. 

Link to comment
Share on other sites

  • 4 months later...

Edit: I accidentally discovered the absence of color. Yaaay. Nothing big, but I do find it odd that any colorless blocks will flash when you hover over a colored block with the color picking tool.

Here is a colorless block compared to a normal one: http://www.brickshelf.com/cgi-bin/gallery.cgi?i=5983956

 

More importantly, I think I've found someone who has created their own parts. He says that you can introduce new geometries by editing an lxfml, but it has to be done in version 4.2.5 or anything prior because every version after that will revert the lxfml geometries back to their default state. (Suggested here: http://www.eurobricks.com/forum/index.php?showtopic=62039&st=175)

 

Here are examples of the new parts in action:

Link to comment
Share on other sites

Hello dear community,

Recently I found out how to use all the given decorations in LDD on different bricks. Which was really fun to do! Now I'd really love to create custom decorations and use them in LDD. I stumbled upon this topic, I've followed all of your instructions, but it doesn't work for me :( .

 

Perhaps someone can help me solving this problem? Maybe it's just a little thing I've forgotten or something I didn't get right.

 

I'll provide you with any needed information.

 

My LDD version is 4.3.6,

Brick database is version 1182

 

* I've found the assets.lif and successfully extracted it with the lif-extractor.

* Inside the "assets" folder I found a file named "db.lif" which I also extracted to a folder named "db".

* Inside "db" there is a subfolder "decorations". It obviously includes all standard .png decorations. I added a file called "31337.png". It's a 32-bit png file, size 128x128, like the other files which are included.

* I added the line

    <Mapping decorationID="31337" designID="3068" surfaceID="1"></Mapping>

to DecorationMapping.xml .

* To make sure there are no mistakes in the syntax I used an XML Editor.

 

* Now I created an .lxf-file with a 2x2 Plate and added some standard decoration. I closed the file, renamed the ending to .zip and opened the IMAGE100.LXFML, where I edited the line

<Part refID="0" designID="3068" materials="1,0" decoration="31337">

(I changed decoration to 31337)

* I saved the changes and renamed the file ending to .lxf

 

Now when I open the file in LDD, the custom decoration doesn't show up. Any ideas what went wrong?

Thank you for your help!

Link to comment
Share on other sites

This happened to me too. The db.lif file is actually stored in two locations, one in the install directory and another in your AppData/Application Data directory. You'll need to delete the db.lif file in the AppData directory before running LDD, then it should work fine :thumbsup:

  • Like 1
Link to comment
Share on other sites

This happened to me too. The db.lif file is actually stored in two locations, one in the install directory and another in your AppData/Application Data directory. You'll need to delete the db.lif file in the AppData directory before running LDD, then it should work fine :thumbsup:

 

Thanks, I found db.lif even in three locations D8

1. C:Program Files (x86)Lego Digital Designer...

2. C:Program Files (x86)Lego Company...

3. C:Users...AppDataRoamingLego CompanyLego Digital Designer

 

It's really a mess 8S , I don't know why LDD uses so many different directories.

1. was the initial folder where I did the modding

In 2. there was an "asset.lif" file again which I replaced by an unzipped asset folder so I could access and delete the db.lif. Deleting db.lif from here didn't do any harm to LDD but didn't solve the problem either.

In 3. there was only a db.lif, which I deleted. Now the application crashed to desktop while loading.

 

I then replaced db.lif in location 3 with the extracted db folder from location 1 (where I implemented my custom decors). Now it finally works!

 

Somehow, at startup, LDD re-uploaded the brick library and some more data, I hope it won't happen every time I add new custom content.

 

Thank you !! You guys rock the bricks  :thumbsup:!  And also thumbs up for your quick answer!

Link to comment
Share on other sites

I'm glad to have helped you out, and that it works :)

 

Just so you know, should you ever decide to render any models that you make (le717's written a great tutorial here), you'll need to use default LDD textures and replace them through the converter. It won't accept modded textures. Of course, if you have no intention of doing that then don't worry.

Link to comment
Share on other sites

  • 2 weeks later...

Do you know how one could get this to work on Linux distros with LDD installed under Wine? Everything is being a read error, so I'm pretty sure it's not looking in Wine's take "drive c" and instead looking for a legitimate C drive, which I don't have.

Link to comment
Share on other sites

Do you know how one could get this to work on Linux distros with LDD installed under Wine? Everything is being a read error, so I'm pretty sure it's not looking in Wine's take "drive c" and instead looking for a legitimate C drive, which I don't have.

Try messing with the .py file and run that after you've change the directory and stuff

Link to comment
Share on other sites

Do you know how one could get this to work on Linux distros with LDD installed under Wine? Everything is being a read error, so I'm pretty sure it's not looking in Wine's take "drive c" and instead looking for a legitimate C drive, which I don't have.

Try messing with the .py file and run that after you've change the directory and stuff

Do the either of you know what you're talking about, or were you taking the same meds as jamesster?
Link to comment
Share on other sites

Do you know how one could get this to work on Linux distros with LDD installed under Wine? Everything is being a read error, so I'm pretty sure it's not looking in Wine's take "drive c" and instead looking for a legitimate C drive, which I don't have.

 

I'm not quote sure right now. I got LDD running on Ubuntu under WINE as well, but that was a while back (before the extractor), and my Ubuntu VM is broken. If I can get it working soon, I'll try to look into this. However, I doubt it will happen this week, with finals and all.

 

EDIT: Thanks, whoever you were. :)

Link to comment
Share on other sites

JrMasterModelBuilder

Do you know how one could get this to work on Linux distros with LDD installed under Wine? Everything is being a read error, so I'm pretty sure it's not looking in Wine's take "drive c" and instead looking for a legitimate C drive, which I don't have.

 

I'm not sure what these other replies are talking about, but LIFExtractor.py should work perfectly on Linux with Python 2.7 or newer (including the 3.* series). I would recommend extracting it with the native system python rather than using Wine to run the EXE, I don't actually know if the EXE will work perfectly under Wine. On a Linux distro with Python installed (which most Linux distros have by default) open Terminal to the directory containing LIFExtractor.py, and enter:

python LIFExtractor.py PATH_TO_LIF_FILE
Link to comment
Share on other sites

Albino_Sparrow

Hey folks, has anyone decyphered the Custom2DField tags? For a 1x1 brick it looks like so:

 

  <Connectivity>
    <Custom2DField type="23" width="2" height="2" angle="0" ax="0" ay="1" az="0" tx="-0.4" ty="0.96" tz="-0.4">
      18:1:1,23:4:1,18:1:1,
      23:4:1,0:4:1,23:4:1,
      18:1:1,23:4:1,18:1:1
    </Custom2DField>
    <Custom2DField type="22" width="2" height="2" angle="0" ax="0" ay="1" az="0" tx="-0.4" ty="0" tz="-0.4">
      22:1:1,22:2:1,22:1:1,
      22:2:1,17:4:1,22:2:1,
      22:1:1,22:2:1,22:1:1
    </Custom2DField>
  </Connectivity>

 

As per parent XML tag this is related to connectivity but cant quite figure out what the values are (22:1:1, etc)

Link to comment
Share on other sites

Hey folks, has anyone decyphered the Custom2DField tags? For a 1x1 brick it looks like so:

 

  <Connectivity>

    <Custom2DField type="23" width="2" height="2" angle="0" ax="0" ay="1" az="0" tx="-0.4" ty="0.96" tz="-0.4">

      18:1:1,23:4:1,18:1:1,

      23:4:1,0:4:1,23:4:1,

      18:1:1,23:4:1,18:1:1

    </Custom2DField>

    <Custom2DField type="22" width="2" height="2" angle="0" ax="0" ay="1" az="0" tx="-0.4" ty="0" tz="-0.4">

      22:1:1,22:2:1,22:1:1,

      22:2:1,17:4:1,22:2:1,

      22:1:1,22:2:1,22:1:1

    </Custom2DField>

  </Connectivity>

 

As per parent XML tag this is related to connectivity but cant quite figure out what the values are (22:1:1, etc)

I haven't figured out the stuff in it, but if you mess with it at all, the brick becomes broken.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
CAFPRODUCTION

Hey guys.

 

This is an incredible tool, and I've already had a ton of fun experimenting with it. However, I have the following problems I was hoping someone could help me with.

 

Background info: My brother and I both use LDD 4.3.8 

 

1.

a) After completing the LIF project, I opened a file that I already had. All the hair and helmets on the mini-figures disappeared.

b) On LDD Extended, I am unable to use the decoration button on mini-fig heads and torsos. 

c) All the brick palette labels show a red question mark, so I have to open all the categories to find the category I need.

d) Some bricks on LDD extended, that were there before, now show a red brick with an X on it and I cannot use them.

 

2. I made a file with all the face designs from the decorations file. I also made a file experimenting with the new torso designs. When I sent both files to my brother's laptop (which does NOT have this LIF mod), he was able to open the files just fine. Everything was there. However, I then made some custom torsos and faces. They work just fine on my laptop. Yet, when I sent them to my brother's laptop, all that appeared were blank torsos and blank faces. 

 

Thank you so much guys. This forum has already helped a ton with getting me started on the mod. 

Link to comment
Share on other sites

  • 8 months later...

On Windows 8 this is what happens to me :

 

C:Program FilesLEGO CompanyLEGO Digital Designer>lifextractor.exe assets.lif
PROCESSING: assets.lif
        EXTRACTING: Please wait.
Traceback (most recent call last):
  File "C:Python32_32bitlibsite-packagescx_FreezeinitscriptsConsole3.py",
line 27, in <module>
  File "LIFExtractor.py", line 142, in <module>
  File "LIFExtractor.py", line 115, in extract
  File "C:Python32libos.py", line 152, in makedirs
WindowsError: [Error 5] Accesso negato: 'assets'

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.