Page 1 of 1
MPK File Structure?
PostPosted: Sat Jan 02, 2010 7:25 am
by Invictus Maneo
I've taken a look at the DAoC MPAK package manager, and I've noticed that it uses zlib heavily.
Are mpk's just file archived with zlib, or is there something special about them?
I ask because in my boredom I want to get a friend who does texturing for game mods, and pretty much add hi-res textures into the daoc maps (since I saw that crysis mod thing, could maybe spruce up the maps visuals instead of completely rewriting the engine.)
Re: MPK File Structure?
PostPosted: Sat Jan 02, 2010 11:09 am
by Graveen
yes, could be very interesting. Anyway the number of textures to improve is high. but it worths the try.
i think you could find a mpk unpackager with sources available on the net.
Re: MPK File Structure?
PostPosted: Sat Jan 02, 2010 11:26 am
by Invictus Maneo
We have a MPK unpacker.. lol
the MPK package manager can do it.
As for the texture I'm sure some maps share some textures so they could be batched'
Next question.
Is there a dat file in daoc that correlates the zoneXX -> zone name
Scratch that, found it in zones.mpk
Re: MPK File Structure?
PostPosted: Mon Jan 04, 2010 11:03 am
by Metty
You know that the textures are not packed into MPK's, right? The terrain textures can be found in the \terraintex\ directory; the one for the models in the \nifs\ directory.
Terraintexturing is done using layered texturing, so if you want to increase the texture quality, just change the textures in \terraintex\
But I doubt that you can raise the texture size much further without causing problems with old graphic cards; 512x512 per texture is probably the limit for them.
Re: MPK File Structure?
PostPosted: Wed Jan 27, 2010 7:22 pm
by divinespear
I've taken a look at the DAoC MPAK package manager, and I've noticed that it uses zlib heavily.
Are mpk's just file archived with zlib, or is there something special about them?
simple answer, it's YES. (means just file archived with zlib.)
some complex answer, it's ALMOST YES. zlib uses only for compress file data.
see below and source included. (it's Delphi (Object Pascal) source.)
MPK/NPK archive file structure has 3 parts, an archive header, an info header for packed files, and data of files itself.
info header of packed files and data of files are compressed by zlib. header is compressed as single part, and datas are compressed separatly.
like this:
- Code: Select all
----------------------------
| archive header |
----------------------------
| packed files info header |
| (zlib compressed) |
----------------------------
| file #1 data |
| (zlib compressed) |
----------------------------
| file #2 data |
| (zlib compressed) |
----------------------------
| ...... |
| (zlib compressed) |
----------------------------
| file #n data |
| (zlib compressed) |
----------------------------
Re: MPK File Structure?
PostPosted: Fri Jan 29, 2010 7:53 pm
by silakka
I have also C++ (with QT) class building up to use/extract file(s) from mpak structure.
Packed files info header also contains detailed info about uncompressed size,file pos,size and sum (at least I think it's sum

) of each compressed block.
This I didn't find from Delphi code .. but this might be that I just can't read Delphi code correctly

Re: MPK File Structure?
PostPosted: Wed Apr 17, 2013 3:56 am
by Tux
Bump
I'm doin the same thing, reverse engiinering the way daoc builds up maps, the size of trees, and way it scales the landscape texturing and so on. The goal is one Overhault of classic zones (no fauna at all)..Pretty hard since seems there is no public tool to do it so i'm starting since scraps, with knowledge from bethesda's titles.
Project: create an elaborated map pushing everything to max, enhancing textures, meshes (most funny thing).
I came up with the 2 twins and opposite files for create the landscapes. The holes one and the hills layered. Still have to understand the scale maybe simply modifying the color of dot change smthing. Metty any advice (from you it's like gold for me)
Cya al