Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

How to LittleBigPlanet 2 Decompress/Recompress Files?

Featured Replies

  • Author
  • Localization

m3z1r, posted Wed Apr 10, 2019 3:44 am (46743)


Basically, I'm trying to decompress a model from LBP2, change the .gmat (general material), and recompress it to be able to be loaded back into the game. Below is a sample model (decoration_nightmarebc_iron_grave_spike.mol) which contains the 4 byte GUID 0005F0B6 for decoration_nightmarebc_iron_fence.gmat. What is the fastest way to be able to do this? I want to be able to do this quickly to make different models that use different textures.

http://s000.tinyupload.com/?file_id=245 ... 7776047814



Also, I happen to have the same model with a different gmat (it uses 0002B362 instead) if this helps. Here's that one:

http://s000.tinyupload.com/?file_id=095 ... 1390793443
  • Author
  • Localization

GHFear, posted Wed Apr 10, 2019 10:17 am (46757)


m3z1r wrote:
Basically, I'm trying to decompress a model from LBP2, change the .gmat (general material), and recompress it to be able to be loaded back into the game. Below is a sample model (decoration_nightmarebc_iron_grave_spike.mol) which contains the 4 byte GUID 0005F0B6 for decoration_nightmarebc_iron_fence.gmat. What is the fastest way to be able to do this? I want to be able to do this quickly to make different models that use different textures.

http://s000.tinyupload.com/?file_id=245 ... 7776047814



Also, I happen to have the same model with a different gmat (it uses 0002B362 instead) if this helps. Here's that one:

http://s000.tinyupload.com/?file_id=095 ... 1390793443


I made a quick tool that should work for decompressing and rebuilding the files, taking into account new filesize and new compressed size.
Tool is attached.

You may NOT edit the first 26 bytes and the last 13 bytes. Everything else you can play around with.

MOL TOOL 1.0.rar

  • Author
  • Localization

aluigi, posted Thu Apr 11, 2019 10:16 am (46797)


@m3z1r
Do you have a bigger sample?
I need a sample containing more than one chunk.
  • Author
  • Localization

m3z1r, posted Fri Apr 12, 2019 7:48 pm (46858)


aluigi wrote:
@m3z1r
Do you have a bigger sample?
I need a sample containing more than one chunk.

Yes, I believe crown_he.mol in Files.rar has four chunks
  • Author
  • Localization

aluigi, posted Fri Apr 12, 2019 10:14 pm (46861)


This format is a total illogical mess :)
  • Author
  • Localization

m3z1r, posted Fri Apr 12, 2019 10:36 pm (46863)


aluigi wrote:
This format is a total illogical mess :)

What do you mean? I just need to be able to recompress files without changing their file size
  • Author
  • Localization

GHFear, posted Sat Apr 13, 2019 3:24 am (46866)


m3z1r wrote:
aluigi wrote:
This format is a total illogical mess :)

What do you mean? I just need to be able to recompress files without changing their file size


I can't find anything pointing to where the compression should start on each chunk and where the actual file starts and all that. I can't really do anything more. Maybe that info is in some other file or something. And that's why it doesn't load when the size changes.
  • Author
  • Localization

aluigi, posted Sat Apr 13, 2019 6:40 am (46871)


Exactly, there is no way to know the starting point of the chunks since they seem to have no logic.
  • Author
  • Localization

m3z1r, posted Sun Apr 14, 2019 2:06 am (46902)


aluigi wrote:
Exactly, there is no way to know the starting point of the chunks since they seem to have no logic.

Well I know it's possible, I tried decompressing a file with offzip using -a and -u to recompress in packzip. It isn't the same file size as the original so I tried editing the file size offset at the top to be correct and it doesn't work; theres more data at the top that probably needs to be changed to match the new file, but I don't know what its for. I just need any way to do this.
  • Author
  • Localization

m3z1r, posted Wed Apr 17, 2019 6:01 am (47018)


aluigi wrote:
Exactly, there is no way to know the starting point of the chunks since they seem to have no logic.

Can you delete this thread?
  • Author
  • Localization

aluigi, posted Wed Apr 17, 2019 8:20 am (47021)


@m3z1r
It's not possible to delete topics in which other people already discussed and spent their time.

The forum is for the community, not just for you.
Thanks
  • Author
  • Localization

m3z1r, posted Wed Apr 17, 2019 10:04 pm (47038)


aluigi wrote:
@m3z1r
It's not possible to delete topics in which other people already discussed and spent their time.

The forum is for the community, not just for you.
Thanks

I just wanted the topic to be deleted because there was no progress made here. I didn't want a useless thread just left here on the site, especially since I don't need help with this anymore.
  • Author
  • Localization

akintos, posted Wed Apr 17, 2019 10:55 pm (47040)


Even if you don't need help anymore, there might be other people who are looking for some information in this thread. That's how a community works.

This thread may look useless but even the information 'this format is logical mess, stay away from it' could be very useful for someone.
  • Author
  • Localization

aluigi, posted Thu Apr 18, 2019 5:04 am (47049)


And then it's not true that there has been no progress.
The main problem is the starting of the chunks and some information like those at the end that don't have a clear meaning:
Code:
# MOL

endian big
getdstring TYPE 4
get DUMMY short
get VER byte
get DUMMY byte
get INFO_OFF long
get CHUNK_SIZE short    # some sort
get CHUNK_SIZE short    # some sort

... ???

get DUMMY byte      # 1
get DUMMY short     # 1
get CHUNKS short

get NAME basename
log NAME 0 0
append
savepos OFFSET
xmath OFFSET "OFFSET (CHUNKS * (2 2))"
for x = 0 < CHUNKS
    get CHUNK_ZSIZE short
    get CHUNK_SIZE short
    clog NAME OFFSET CHUNK_ZSIZE CHUNK_SIZE
    math OFFSET CHUNK_ZSIZE
next x
append

goto INFO_OFF
get NUM long
for x = 0 < NUM
    get DUMMY byte  # 2
    get DUMMY long  # ???
    get DUMMY long  # 7
next x
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.