Moo 2 .lbx and .mex image/sound extraction

Information, How-to's, and discussion about mod'ing Master of Orion II.
Balrokzar
Posts:6
Joined:Fri Feb 10, 2006 6:42 pm
Moo 2 .lbx and .mex image/sound extraction

Postby Balrokzar » Fri Feb 10, 2006 6:44 pm

I am interested in learning some successful ways of extracting the images from "Master of Orion II: Battle At Antares." I love that game so much and still play it all the time, today. I swear that I have honestly purchased the game and will not abuse my privileges of its use in anyway. I simply want to know how I can stab into the converted .mex formatted files, or perhaps even the original .lbx, to find and drag out the images and sounds I am looking for. I have located and tried a few types of programs that seem capable of doing this at first glance, but they are very unstable and do are not capable of reading all of the files. If somebody has figured this process out, please write something and let me know what the best way of doing this is. Thank you!

Balrokzar
Posts:6
Joined:Fri Feb 10, 2006 6:42 pm

Postby Balrokzar » Fri Feb 10, 2006 6:47 pm

In case any of you wonder what types of files I am interested in obtaining from the game, I am mostly just interested in getting the colony background landscape images (Terran, Arid, Desert landscapes, etc.), and possibly the in-game soundtrack as well.

trixx
Posts:10
Joined:Sat Dec 24, 2005 12:54 pm
Location:Córdoba, Argentina

Postby trixx » Sat Feb 11, 2006 10:01 am

OK. I will explain here how to extract contents from .lbx files. This will allow you to get the sound effects and soundtrack. This also allows you to extract some text files and the images&fonts, although the images require some extra processed (I explained about fonts in another thread).

All data in LBX files is little endian. The LBX is essentially a package containing other files (I will call them "resources"), which have no internal name just an index.

The first 2 bytes in the LBX are a 16 bit integer indicated how many resources there are. For each resource there is a small descriptor containing the offset in bytes of the resource inside the lbx. The size is determined substracting the offset of each resource and the next one. The offset for resource i (counting from 1) is at offset 4+4*i, so you have:

at position 8: offset of resource 1
at position 12: offset of resource 2
at position 16: offset of resource 3
at position 20: offset of resource 4
etc.

with that you can unpack lbx's. The sound lbxs (i think they were called stream and streamhd) resources are actually wav files, so you should be able to play them

If I have some time later I will post about the image format.

Balrokzar
Posts:6
Joined:Fri Feb 10, 2006 6:42 pm

Postby Balrokzar » Sat Feb 11, 2006 11:22 am

Hey Trixx, thank you very much for taking the time to explain it best you could... But I am afraid I am not quite there yet, in terms of understanding code and programming. Let's face it, I don't know beans about any of that stuff! It's a sad fact, but I am willing to own up. I was hoping somebody had already written a somewhat stable program that could do the trick. Among those I have tried were: lbxTool, LBXplorer093, lbx_utils_v0.9, extract_mex, among one or more others that I could not locate. These programs seem to produce unsatisfactory results for various reasons, and seem to be highly unstable as well.

I guess if nobody has written anything better, then I guess I might ask for somebody to simplify things just a bit for me, please! Maybe I'll understand it a little better then!

Thank you.

User avatar
Grig de Griz
Posts:48
Joined:Mon Sep 26, 2005 12:23 am
Location:Russia

Postby Grig de Griz » Tue Feb 14, 2006 7:53 am



Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 26 guests