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)

blaz 01-15-2005 06:55 PM

Source code released.
 
I just released a new version that fixes the directory naming problem.

I have also released the source code for the tool and for the library I developed to analyze the EQ2 file format. There's a lot of interesting stuff in there, more than what the tool is currently using. If you take a look at the library source code you'll see it has classes that:
  • Help process VPL and VPK files, giving access to the packed files as if they were regular files on disk.
  • Parse the EQ2 scripts (.vdl) and convert them to XML so that they can be manipulated by the .NET XML classes.
  • Decode the format of every single type of asset EQ2 uses (zones, models, animations, particle systems, etc). This doesn't mean it knows how to display them, though :)

I'm trying to develop a library that can be used to help create viewers or format converters for things like models and animations. This might be of interest to someone who is coding a 3D engine and wants some great models to work with. I am in this situation :)

I'd like to start creating a viewer application that will let you see all those textures, models, animations, etc, that the tool unpacks; I think I'll learn a lot of stuff while coding it. It will take a while, though, so I urge everyone who is interested in something like this to go ahead and code something up themselves, using this library if they find it useful.

I will also try to start documenting the EQ2 file format, even though you can already learn a lot from the source code. There are things that are not that obvious looking at the source code, and an explanation is always welcome.

tonyis3l33t 01-15-2005 07:47 PM

making new stuff is cool, learning while you do it makes it that much funner :)
________
Laguna Bay II Condos Prathumnak

Killarny 01-15-2005 08:16 PM

blaz, how do you know all this about these file formats? are you privvy to information that nobody else is? or are the eq2 file formats commonly used in other games?

blaz 01-16-2005 05:56 PM

I've always been interested in learning more about formats, especially if they are not documented. I like the feeling of finally being able to make sense of something that at first looked incomprehensible. Much more so when they are trying to prevent you from figuring out how it works (i.e. by encrypting/obfuscating it). This means you usually have to resort to reverse engineering, either by disassembling the program or otherwise peeking under the hood to see what's going on.

In the case of EQ2's file format, the main reason why I'm interested in how it works is because I'd like to convert to/from other known formats, and be able to use them in my personal projects. But apart from that, I also have the opportunity to learn a lot of stuff, and I think that's important.

As for EQ2's file format being used in other games, I'm not aware of it. I'm certain it's a proprietary format.

blaz 01-16-2005 06:17 PM

Decrypting the maps.
 
I have uploaded a new version of the tool that can decrypt some of the zone maps.

The decryption algorithm is actually very simple. Take a look at the tool's source code if you want the details.

Drumstix42 01-16-2005 06:46 PM

awesome job!

tonyis3l33t 01-17-2005 02:46 AM

wow thats cool you found out some (or all?) of their decryption process:)
I'll see if i can think of some more features for your prog, keep ya busy :nana:
________
Dessireex

thelxepeia 01-17-2005 10:49 AM

The perl script above is just a rewrite of a python script created by daeken_bb over at eqemulator.net. Great work blaz. I’ve got a command line c++ version now as well. I’ve been working on a UI myself but it looks like you beat me to it :-( . I’m really interested in getting into the 3D files myself. It looks like I’m several steps behind you but I’m gonna try out what you’ve got here and see if I can catch up a bit. Feel free to PM me if you’d like some collaboration on this.

blaz 01-17-2005 05:20 PM

3D Files Format
 
If you are interested in the 3D format, I suggest you take a look at the VeRenderMesh code first. That's the class that represents a raw mesh as stored in .draw files. The format is quite straightforward (if you ignore the likes of 'autoDropVertexIndices' and 'noPolygonShadowTriangleIndices', which I have no clue as to what they are), and you can probably have a simple DirectX or OpenGL app that renders these meshes in little time.

If you want to render the mesh with textures, it is more complex. You get the texture coordinates from the VeRenderMesh object, but you don't get the information on which textures to assign to each stage.

The process would be as follows. You would first parse the script with the definition for the object, for example:

clientvdl/appearances/accessories/wieldable_items/weapons/axe/battleaxe/battleaxe001_plain.vdl

And get the path to the VOC file with the "visual definition" of the object:

composed/characters/accessories/wieldable_items/weapons/axe/battleaxe/battleaxe001_plain.voc

You would then decode that file and end up with an object of the VeMeshGeometryNode class (or some class derived from it). This class contains information on each of the LODs of the object. For each LOD, you get the path to the render meshes that represent the object and the path to the "shader palette":

cooked/characters/accessories/wieldable_items/weapons/axe/battleaxe/battleaxe002.sp

This .sp file contains an object of the VeShaderPalette class, which in turn contains a list of scripts that define the shader palette:

shaders/characters/accessories/wieldable_items/weapons/axe/battleaxe/battleaxe001plain.vdl

Finally, this script defines the textures to apply to the object and has a reference to the shader code that is used to render the object:

shaders/templates/bclr_t2_bmp1_spwm.vdl

The problem with this approach is that there is no easy way to integrate all this script and shader code stuff in an existing 3D engine. You'd probably be better off exporting all the data you need to your own format and working with that.

If you want to work with animations, the classes to refer to are VeAnimMeshGeometryNode, VeSkeleton (.skeleton files) and VeAnimation (.anim files).

mixer343 01-17-2005 06:43 PM

Quote:

Originally Posted by tonyis3l33t
yay i got all the sounds and they atually play back, hehe

i can open it up fine, but what are you using to play the mp3? winamp and wmp 10 open the file, but cant play anything.

are you using a specific codec?

EDIT:

Ugh ok i can hear the environment sounds and mob sounds, but can anyone play the voiceovers?

Dr_dre 01-17-2005 07:36 PM

blaz,

ive been searching all the goodie stuff for a while now and the script language used in doing ingame commands is straightforward.. What about editing and recompiling some of these and injecting them back into assetslib is that possible aswell ( not thinking about a possible violation of the the Eula atm :P )

Cheers

DRe

tonyis3l33t 01-17-2005 11:32 PM

i can only hear stuff in the sounds vpk, i cant get the voiceover stuff to work either even with ace's mega codec pak o.O
________
Wong Amat Tower Condominium Pattaya

blaz 01-18-2005 03:59 AM

Dr_dre,

There's no need to re-insert modified files into the VPKs. If you copy the modified file to the correct path under the EQ2 directory the client will use it instead of the file in the VPK file. It will only search inside the VPK files if it can't find the file outside.

This means you should be able to modify the commands if you create a "clientvdl" folder in EQ2 installation directory, copy the 'clientvdl/gamecmds.vdl' script there and edit it.

Dr_dre 01-18-2005 10:13 AM

thnx i should of thought of that..


ah well i think its time to do some testing :P


Cheers,

Dre

Karn 01-30-2005 02:45 AM

Hi Blaz i stumbled over this webpage with a lot of luck :)

I was woundering if you anymore details on what files can be opened at this time ?

I am using windows XP and it seems to be runnig well i think it is.

I had a prolem unzipping it at first with winace. The Readme and License.txt gave me an error message.

I also get these error messages from within the programm when i try to open a file :

at System.IO_Error_WinIOError(Int32 errorcode, String str)
at System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin)
at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin)
at Everquest2.IO.FileSystem.ReadVpkDirectory(Stream stream, VplHeader header)
at Everquest2.IO.FileSystem.ProzessVplFile(Stream stream, VplHeader header)
at Everquest2.IO.FileSystem.Intialize(Stream stream)
at Everquest2.IO.FileSystem.Open(String path FileMode mode, FileAccess access)
at Everquest2.IO.FileSystem.Open(String path)
at Eq2VpkTool.FileSystemViewController.OpenFileSystem(Objekt obj)

Anyhow great job

email me: [email protected]

Ladred 02-23-2005 09:36 AM

Quote:

at System.IO_Error_WinIOError(Int32 errorcode, String str)
at System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin)
at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin)
at Everquest2.IO.FileSystem.ReadVpkDirectory(Stream stream, VplHeader header)
at Everquest2.IO.FileSystem.ProzessVplFile(Stream stream, VplHeader header)
at Everquest2.IO.FileSystem.Intialize(Stream stream)
at Everquest2.IO.FileSystem.Open(String path FileMode mode, FileAccess access)
at Everquest2.IO.FileSystem.Open(String path)
at Eq2VpkTool.FileSystemViewController.OpenFileSystem (Objekt obj)
I believe that is the message I got before I installed the .net 2 beta.

Deathbane27 03-18-2005 05:18 AM

(Yes, the thread is old, but that doesn't seem to bother anyone else...)

Quote:

Originally Posted by blaz
There's no need to re-insert modified files into the VPKs. If you copy the modified file to the correct path under the EQ2 directory the client will use it instead of the file in the VPK file. It will only search inside the VPK files if it can't find the file outside.

This means you should be able to modify the commands if you create a "clientvdl" folder in EQ2 installation directory, copy the 'clientvdl/gamecmds.vdl' script there and edit it.

I'm attempting to modify what I consider to be an ugly texture (or, rather, experimenting to get up to that point), and can't get the game to look at my file instead of the one in the vpk.

I used Blaz's tool to extract the file cooked\characters\accessories\wieldable_items\weapons\rapier\sabre\sourceimages\ sabre001_rusty_tex.dds to my EQ2 folder (E:\EQ2). I've modified it to my liking and left it where it was extracted to (e:\eq2\cooked\characters\accessories\wieldable_items\weapons\rapier\sabre\source images\), but there's no change in-game.

Does anyone have any advice or assistance to offer in this matter?

tonyis3l33t 03-18-2005 06:25 AM

yea, i couldnt get it to work either
________
SweetAngel cam

naikrovek 04-02-2005 02:01 AM

VoiceOvers
 
Anyone got the voiceovers to work yet? They won't play for me.

edit: i just looked at some of the MP3 files, none of them have the same file headers, so they're probably encrypted. If anyone knows how to do such things then I'd like to take this opportunity to kindly prod them with i hot branding iron and get them into gear on these things.

Telloh 07-31-2005 05:52 PM

Hi!

Does this tool work in Windows XP? I am running the .Net 2.0 Beta 2 and when I try to load the tool, I recieve this error:

An exception System.InvalidOperationException has occured in Eq2VpkTool.exe. Anyone have any idea?

blaz 08-01-2005 05:00 AM

New version released.
 
Sorry to add replies to such an old thread.

Just wanted to mention that I have uploaded a new version of the tool that fixes the issue Telloh was describing. It seems the newer .NET Framework 2.0 Beta 2 version is not 100% compatible with the previous Beta 1, which I used when developing the app. It should work now.

Eq2VpkTool-1.2.1.zip

tonyis3l33t 08-07-2005 04:05 AM

download .NET Framework Version 2.0 Redistributable Package Beta 2 (x86)

the exact version is 2.0.50215.45

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

adorya 08-08-2005 03:45 PM

Is it just me or the feature tu overrides files from vpack has been nerfed? Some patch ago, I was able to modify some UI sound by just adding waves files and a folder /sounds/ in the UI folder, now it doesnt work anymore. That would explain why others file overwrite not working.
Also there are many files that are not used, and/or that should be used, but that are not working even with their default path. The only file I saw working is eq2_recipefilter.vdl, but it was already by default in eq2 folder and was not at his default vpk location (also name slightly changed).

blaz 08-09-2005 04:44 PM

As you say, it might have been nerfed. I know for sure that back in January I could override files with the method I outlined.

This was probably a feature which was useful for debugging but which made little sense in the retail game, apart from being a possible exploit, so I guess they removed it when they saw it was still there.

RamosDelta 08-26-2005 08:00 PM

Has anyone found a way to play the voiceover files yet? They are in .mp3 format, but nothing I have will play them.

Othesus 11-13-2005 03:36 AM

Hmm, sorry to resurrect an old thread! Blaz if you're still around, or someone, could you compile this to work with .NET version 2? Currently the executable crashes for me. I tried opening the solution up in Visual Studio 2003 but the project files aren't compatible. Otherwise maybe I can just make a new project and manually add in all the source files?

blaz 11-25-2005 03:31 AM

I tried compiling the tool on Visual Studio 2005 and .NET 2.0 final and there are quite some errors, mainly due to Windows Forms controls that no longer exist and methods that were renamed. I was unable to fix them in the 10 minutes I spent this morning on this, so I'll try to compile a proper version tonight and upload it as soon as possible.

Ah, the joys of using a beta framework :)

blaz 11-27-2005 11:16 AM

Version 1.2.2 released
 
I just uploaded a new version that works on the final .NET Framework 2.0.

As usual, you can grab the binaries and source code here.

Othesus 11-29-2005 06:58 PM

Woooo! Cool, thanks!

Going to try it out now.

Anyone get anything interesting out of the .vpk files?

Jethal 07-10-2006 10:48 PM

the blaz site doesnt seem to be active anymore.. anyone have the vpk extracter anymore?

lordebon 07-11-2006 08:27 AM

1 Attachment(s)
I have a copy of it (It's attatched.), but it only works on one of the VPL files... the other remains tantalizingly out of reach with this tool.

What I was looking for, but was unable to find, was the objects in-game in some kind of 3D format, and/or the textures that go on said objects.

Jethal 07-11-2006 10:57 AM

Many thanks, that's just what I wanted!
Was interested in the sound files anyways (of course the graphics would have been nice)
aparently, I need some other codex for some of these sounds.. about 3/4 of them are not playing on winamp

Jethal 07-11-2006 11:09 AM

skip that.. my Audio Mixing program, that i use to record my parody songs, will play the voc files just fine.

anfrey 08-13-2006 12:00 AM

sorry to bring back such an old thread but... has anyone been able to extract the voiceovers? i downloaded the program but couldn't open any of the VPK files... kept getting some memory exception error.

i really really want to get the nathan ironforge voiceovers to annoy my friends (i want them for my voice mail's greeting)

Fyyre 08-15-2006 07:35 AM

Eq2VpkTool-1.2.2.zip still works, fine. You need to target assetslib.vpl

For more detail, I suggest this paper:

http://www.openrce.org/articles/full_view/16

Has for the voiceovers, I will just say see this:

http://www.radgametools.com/

Fyyre

Quote:

Originally Posted by anfrey
sorry to bring back such an old thread but... has anyone been able to extract the voiceovers? i downloaded the program but couldn't open any of the VPK files... kept getting some memory exception error.

i really really want to get the nathan ironforge voiceovers to annoy my friends (i want them for my voice mail's greeting)


anfrey 08-15-2006 03:34 PM

Quote:

Originally Posted by Jethal
skip that.. my Audio Mixing program, that i use to record my parody songs, will play the voc files just fine.

what program would that be jethal? btw, love the new song (smells like gnoll droppings)

anfrey 08-15-2006 03:53 PM

Quote:

Originally Posted by Fyyre
Has for the voiceovers, I will just say see this:

http://www.radgametools.com/

Fyyre

tried miles but they still won't play :\

zoriouz 08-15-2006 04:10 PM

Quote:

Originally Posted by anfrey
tried miles but they still won't play :\

Most of them seem to be Mpeg layer 1-2 files but I cant seem to find the other header info for what codec to use.

anfrey 08-15-2006 04:17 PM

Quote:

Originally Posted by zoriouz
Most of them seem to be Mpeg layer 1-2 files but I cant seem to find the other header info for what codec to use.

aye, i've tried several codecs, all without any working results... there's got to be a way to play those voiceovers.

i also just went through the assets list, and i could not find nathan_ironforge anywhere :(

raidr 09-05-2006 11:25 AM

Talk about bringing back an old thread
 
First off, Blaz.. Excellent program. Much appreciated

Second,
Has anyone discovered a way to play those dangblasted voiceover files? sure they are mp3 but the codex on them won't play on any known player that I can get my hands on.


All times are GMT -5. The time now is 07:09 AM.

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