MPK File Structure?

Discussions on various DOL development features

Moderator: Support Team

MPK File Structure?

Postby Invictus Maneo » Sat Jan 02, 2010 7:25 am

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.)
Google - Its there to help you!
http://lmgtfy.com/?q=google
Invictus Maneo
DOL Acolyte
 
Posts: 131
Joined: Wed Nov 25, 2009 10:28 pm

Re: MPK File Structure?

Postby Graveen » Sat Jan 02, 2010 11:09 am

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.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: MPK File Structure?

Postby Invictus Maneo » Sat Jan 02, 2010 11:26 am

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
Google - Its there to help you!
http://lmgtfy.com/?q=google
Invictus Maneo
DOL Acolyte
 
Posts: 131
Joined: Wed Nov 25, 2009 10:28 pm

Re: MPK File Structure?

Postby Metty » Mon Jan 04, 2010 11:03 am

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.
Metty
DOL Enthusiast
 
Posts: 284
Joined: Sat Jan 28, 2006 3:39 pm

Re: MPK File Structure?

Postby divinespear » Wed Jan 27, 2010 7:22 pm

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) |
----------------------------
divinespear
DOL Apprentice
 
Posts: 36
Joined: Mon Aug 30, 2004 10:39 am
Location: The Royal Guards Headquarter, Camelot City, Albion in The Matrix

Re: MPK File Structure?

Postby silakka » Fri Jan 29, 2010 7:53 pm

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 :)
silakka
DOL Novice
 
Posts: 67
Joined: Tue Dec 08, 2009 1:22 pm

Re: MPK File Structure?

Postby Tux » Wed Apr 17, 2013 3:56 am

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
Tux
DOL Guest
 
Posts: 1
Joined: Wed Apr 17, 2013 3:50 am


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 0 guests