EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Can we extract the contents of a *.vpk file? (https://www.eq2interface.com/forums/showthread.php?t=570)

Nyarlathotep 12-08-2004 02:52 PM

Can we extract the contents of a *.vpk file?
 
I want to extract the maps for the zones beyond Antonica/Commonlands. There are DDS map files for all the areas around Antonica/Commonlands, but I cannot find the maps for zones like Nektulos, Thundering Steppes, Enchanted Lands, etc. I suspect that these maps DDS files are in the .vpk files for the zones.

Has anyone developed a *.vpk extraction/viewer tool?

Is anyone planning on making one?

Thanks in advance!

tonyis3l33t 12-16-2004 01:35 AM

Yes i would also like to know! I want those maps of like antonica, etc. that dont show up in the map folder.
________
SerennaHot

Vikan Karo 12-23-2004 10:49 AM

the VPK files do not contain maps.. They contain mainly the ambient sounds, combat sounds, etc in a compressed .VOC Format.

Drumstix42 01-01-2005 02:45 AM

All I have to say is good luck with that one. /evilgrin

Deathbane27 01-05-2005 12:48 AM

Quote:

Originally Posted by Vikan Karo
the VPK files do not contain maps.. They contain mainly the ambient sounds, combat sounds, etc in a compressed .VOC Format.

Please explain why you believe this or how you know it.

Nyarlathotep 01-05-2005 02:56 PM

OK then, does anyone know where the maps are stored then?

We know that there is a directory which contains the maps for Commonlands, Antonica, etc...

Where are the maps for EL, Zek, etc... ?

Eloa 01-05-2005 03:12 PM

The maps for these other sites are sent from the server. There is no map for anything that is not already viewable from the map window when you open uibuilder. (Info from SOE_Bobble)

Talyns 01-05-2005 03:43 PM

Would help if I got this in the right thread :)

Quote:

Originally Posted by SOE_Bobble
The additional maps for Antonica/Commonlands/etc are encrypted and map icons are sent down from the server (along with the fog settings.)

I think the maps are on our hard drives.. He says they're encrypted.. The Icons and fog is sent down from the server..

Each map in the images/map folder is 342kb.. Broadband can handle that.. But a 56k modem only gets like 6kb a second (I think, been a while).. It would take like a whole minute to download a map that size..

Edit:
Chances are the missing maps are in the vpk file but are encrypted.. I'm sure sooner or later someone will be able to read the contents of those files..

blaz 01-06-2005 04:31 PM

Encrypted Maps
 
The maps for these zones are definitely there in the VPK files. They actually are in the NrVObm.vpk file, and have the following names:

nrvobm_antonica_east.dds
nrvobm_antonica_west.dds
nrvobm_commonlands_east.dds
nrvobm_commonlands_west.dds
nrvobm_enchanted_lands_east.dds
nrvobm_enchanted_lands_west.dds
nrvobm_everfrost.dds
nrvobm_feerrott_east.dds
nrvobm_feerrott_west.dds
nrvobm_nektulos_forest.dds
nrvobm_orcish_wastes.dds
nrvobm_thundering_stepps.dds
map_lavastorm.dds
nrvobm_tiles.dds

As for their being encrypted, it is probably true, as they certainly aren't regular DDS files.

Regarding what Vikan Karo mentions, it is not true that VPK files contain mainly ambient and combat sounds in VOC format. First of all, the 418 VPK files contain a total of around 190,000 files of all kinds; basically the whole set of assets EQ2 uses. They are in a variety of formats, but sounds in particular are in WAV format, while the voiceover files come in MP3 format.

VOC files, of which there are around 20,000, are actually data which describe a composition of simpler assets that together form a complex entity. The definition is quite vague, but that's because they're used for pretty much everything: zone rooms, game objects, characters, monsters, character accessories, etc. EQ2 uses a very interesting file format, which I want to start documenting as soon as possible. I'll start with the VPL/VPK file format, which is quite simple. In the meantime, if you're curious and want to see the whole list of assets, grab it here.

Drumstix42 01-06-2005 07:22 PM

I'm gonna have to quote Deathbane and say:


Quote:

Originally Posted by Deathbane27
Please explain why you believe this or how you know it.


blaz 01-07-2005 03:24 AM

I'll explain why I believe what I said and why I know it:

Quote:

The maps for these zones are definitely there in the VPK files. They actually are in the NrVObm.vpk file, and have the following names:
I know what the format of the VPK files is and therefore know the maps, or at least files named as if they were maps, are there in NrVObm.vpk. You can confirm this yourself if you open the file in a hex editor, as in this case the files are not compressed and the filenames are in plain text.

Quote:

As for their being encrypted, it is probably true, as they certainly aren't regular DDS files.
I know they aren't regular DDS files because they don't start with the DDS token and the DirectX Texture Tool can't open them.

Quote:

The 418 VPK files contain a total of around 190,000 files of all kinds; basically the whole set of assets EQ2 uses. They are in a variety of formats, but sounds in particular are in WAV format, while the voiceover files come in MP3 format.
I know this because I have extracted the 191,000 files and examined most of them.

Quote:

VOC files, of which there are around 20,000, are actually data which describe a composition of simpler assets that together form a complex entity.
Finally, I know this because I have analyzed all 20,000 VOC files with a tool I wrote and know what data they contain. Also, the names of the VOC files give you a hint of what they actually are, as you can confirm if you look at the file list.

Deathbane27 01-07-2005 04:50 AM

Okie. Go go hex editors. :p (I need to get a new one, it won't open crap worth of file size.)

tonyis3l33t 01-07-2005 05:41 AM

blaz,
share your tools :D i like tools
________
Laguna Heights Condominium

blaz 01-07-2005 07:17 AM

Be patient :) I'll try to release a VPK extractor tool in a few days, complete with source code.

SoulPl 01-07-2005 04:26 PM

blaz ---> i run http://www.***************/eq2/index.asp you will be my endless hero if you give me tool to unpack vpk files, i will put biggest credits for you on my site and will say all the time i will hear "EQ2" that "blaz is great coder" :)

Killarny 01-10-2005 09:48 PM

A VPK extractor would be great!! Good job! :)

Drumstix42 01-10-2005 11:23 PM

Before another occassion goes sour....

Is extracting any of these files "allowed"? :)

SoulPl 01-11-2005 03:42 PM

Drumstix42 ---> no, even dont think about it.

taco-man 01-11-2005 04:02 PM

/beg blaz for tool

blaz 01-11-2005 05:49 PM

Update
 
Sorry for the delay. I'll try my best to release the tool tomorrow :)

At first I thought a command-line tool would suffice, but then I thought I could try a little harder and make it more user-friendly, so I added an UI on top of it, but that's taking a little longer. It doesn't help that this is my first WinForms application ;)

Anyway, here is a little preview.

Thanks for the interest.

taco-man 01-11-2005 06:28 PM

looks very nice! ill look forward to hopefully snatching a copy tomorrow.

blaz 01-13-2005 06:17 PM

v1.0 released
 
Here it is:

http://eq2.blazlabs.com/

Make sure you download and install .NET Framework 2.0 Beta 1 first:

http://www.microsoft.com/downloads/d...displaylang=en

Suggestions and comments are welcome :)

tonyis3l33t 01-13-2005 06:21 PM

1 Attachment(s)
wooohoo its finally here! now i gotta go download dotnet....you are a genius blaz:)

should post this in the released forum...


now waiting patiently for "Everquest II File Format Reference", hoping this covers the files inside the vpk's :D


ok one quick Question...when i open assetslib.vpl i get this



what did i do!?
________
VAPE INFO

Killarny 01-13-2005 06:34 PM

kick ass! thanks a heap, blaz..

blaz 01-13-2005 07:15 PM

I just uploaded a new version with a minor modification. That might fix the problem tonyis3l33t describes.

If you have any problems, please send me a PM.

Killarny 01-13-2005 08:04 PM

I just downloaded it, and I am getting the same error that tony posted a screenshot of.. should we have the program in the eq2 directory?

Drumstix42 01-13-2005 08:43 PM

Ummm this topic is about vpK files, while this program is looking for vpL files.

Might I kindly say "wth?"

*edit* and I get an error with vpL and vpK files :p

tonyis3l33t 01-14-2005 01:57 AM

the VPL is like eq2ui.xml :) you open it to see all the other stuff.

I still get error too....If the non-user friendly version works i wouldnt mind using that for now... :D
________
Sherri_Moon live

Drumstix42 01-14-2005 02:24 AM

Ah ok thanx for that tid bit.

blaz 01-14-2005 07:26 AM

Couldn't test it on Windows XP
 
Sorry for the trouble everyone. I'll try to fix this as soon as possible.

I thought the problem arose from the way I was handling paths. In the first version I was mixing forward and backward slashes in the path names in some cases, so I changed it in order to use backward slashes only. It works fine on the two Windows 2000 machines I have tested it on, but I don't have any Windows XP/2003 installations, so I can't really test it there. Is everyone using Windows XP here?

I'll upload a new version later today which hopefully will give a better diagnostic of what is going wrong. It also fixes a few bugs I found today (race conditions due to the multithreaded nature of the app).

A couple of notes:

- You don't have to run the tool from the EQ2 directory. It should work fine from any directory you choose.
- I agree that a VPK extractor tool should open VPK files directly, but it doesn't at the moment :) It will only open the VPK files that are referenced by the VPL file you choose.
- I'm afraid the non-user-friendly version wouldn't work either, because this is not a problem with the UI part of the app.

tonyis3l33t 01-14-2005 07:31 AM

aww xp users have to wait

I use XP and am willing to test whatever you want, blaz
________
ExoticBeautty live

tonyis3l33t 01-14-2005 02:38 PM

new error inserted on top of old error in above post
________
How To Roll A Blunt

Killarny 01-14-2005 03:09 PM

I used to develop windows ui apps pretty heavily, so I know how much of a headache they are - just wanted to say thanks for taking the time to make this tool, it looks like it should turn out great!

blaz 01-14-2005 05:18 PM

v1.1 released. Hopefully fixed.
 
Thanks to the error message tonyis3l33t posted I understand why the first version fails on so many people's machines. For some reason I fail to understand, my AssetsLib.vpl file stores relative paths to the VPK files, while most of the VPL files out there store absolute paths. As I only had access to my AssetsLib file I never thought this would happen.

I have updated the tool to handle both cases:

http://eq2.blazlabs.com/Eq2VpkTool-1.1.zip

This version should be a little more bug-free :) Hope it is finally usable.

tonyis3l33t 01-14-2005 05:41 PM

it opened with no errors! checkin it out now :) good job blaz
:nana: :nana: :nana:
________
teen girl Webcam

mixer343 01-14-2005 05:49 PM

perl
 
heres a perl script by thelxepeia that extracts VPK files
copy this code and rename to decompress.pl
put the perl script and the *.vpk in the main perl folder (usually C:\Perl\)
from the command line example: "perl decompress.pl antonica.vpk unpacked"
and it will extract everything into the C:\Perl\unpacked\ folder

Code:


use Compress::Zlib;

$in = $ARGV[0];
$path = $ARGV[1];

die "Missing input file name.\n" unless $in;
die "Missing input file name.\n" unless $path;

mkdir $path;

open (VPK, "< $in");
binmode(VPK);

$chunk_count = 0;

read(VPK,$packed_len,4);

while (length($packed_len) == 4)
{
  $unpacked_len = unpack("L", $packed_len);
  read(VPK,$data_seg,$unpacked_len);
  read(VPK,$packed_len,4);
  if (length($packed_len) != 4)
  {
      $file_block = uncompress($data_seg);
      unless (defined($file_block))
      {
        $file_block = $data_seg;
      }
 
      ($fnblocksize, $fncount) = unpack("LL", $file_block);
      $file_block = substr($file_block, 8);

      for ($i = 1; $i <= $fncount; $i++)
      {
        ($block_start, $block_len, $fnlen) = unpack("LLL", $file_block);
        $file_name = substr($file_block,12,$fnlen);
        $file_name =~ /(.*)\/(.*)/;
        @paths = split(/\//,$1);
        $path = $ARGV[1];
        foreach $dir(@paths)
        {
            $path = $path . '/' . $dir;
            mkdir $path;
        }
        $out = "> " . $ARGV[1] . "/" . $file_name;
        open(OUT, $out);
        binmode(OUT);

        seek(VPK, $block_start + 4, SEEK_SET);
        read(VPK, $bin_data, $block_len);
        $u_bin_data = uncompress($bin_data);
        unless (defined($u_bin_data))
        {
            $u_bin_data = $bin_data;
        }
        print(OUT substr($u_bin_data, 9 + length($file_name)));
        close(OUT);
        $file_block = substr($file_block, 12 + $fnlen);
      }
  }
}

close (VPK);

have fun :nana:

blaz 01-14-2005 05:55 PM

Thanks for the Perl script, mixer343. It certainly is much more lightweight than my tool when all you want is to extract everything from a given VPK file.

tonyis3l33t 01-14-2005 08:17 PM

yay i got all the sounds and they atually play back, hehe
________
Personal herbal vaporizer

tonyis3l33t 01-15-2005 08:26 AM

extracting with path informations is a bit messed up.
If you try to extract fo a folder called folder01, you will get a new folder next to folder01 called folder01environments or folder01sounds, etc.
________
Live sex

blaz 01-15-2005 09:36 AM

Acknowledged
 
I see. That's a bug I had already fixed that managed to crawl back in. I'll fix it later today and release a new version, along with source code, if I have some free time.

Thanks for the bug report.


All times are GMT -5. The time now is 03:59 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI