.hdr pack file help

07/02/2013 02:52 FattyB#1
This is for the newer pack file .hdr and .d##

I am in the process of re creating the game to further my skills in C# (I already have half the game done in C++ (so don't bash me for choosing c#) but I am stuck on what the first 400 bytes (100 32-bit ints) are in the pack file header.

I know some of you have done repackers and was wondering if anyone has figured this out.

The rest of the file format I have figured out and I have included it here for anyone that is interested.

Thanks to anyone that can point me in the right direction!

Code:
// 400 bytes
read 100 32-bit ints of unknown information

read number of pack files (32-bit int)
for number of pack files
{
	read pack file name length (32-bit int)
	read pack file name (read the number of characters using the length above)

	read the number of directories that file inside of the pack file has  (32-bit int)
	for number of directories
	{
		read directory name length  (32-bit int)
		read directory name (read the number of characters using the length above)
	}

	read pack file size (32-bit int)
	read not used (32-bit int)
	read number of files in pack file (32-bit int)
	read number of free spaces (32-bit int)

	for number of free spaces
	{
		read free space size (32-bit int)
		read pack file offset (32-bit int)
		read not used (32-bit int)
	}

	for number of files in pack file
	{
		read file path name length (32-bit int)
		read file path name (read the number of characters using the length above)
		read file offset in pack file (32-bit int)
		read not used (32-bit int)
		read file size (32-bit int)
		read not used (32-bit int)
		read not used (32-bit int)
	}
}
07/02/2013 10:18 HellSpider#2
I'm not sure about this at all but I assume it's just junk. The client executable adjusts the file pointer to +0x190 before reading from the file handle.
07/02/2013 10:36 FattyB#3
Quote:
Originally Posted by HellSpider View Post
I'm not sure about this at all but I assume it's just junk. The client executable adjusts the file pointer to +0x190 before reading from the file handle.
Sweet, thank you for the info. I was hoping to not resort to looking at the assembly language to figure this out since my assembly is rusty. Not to mention the exe is packed and I have not looked to see if anyone has a new one for the latest exe.

I figured it might be an unused area since there are other unused areas in the header. The only thing that got me was the fact that some of that data changes from update to update.

Ill just have to run a test by unpacking the existing client and repack it with my program to see if Dekaron will run it. Once I get my packer done Ill post back here with my results.
07/04/2013 07:45 FattyB#4
So I wrote my unpacker/packer and it works with the game. I unpacked the game, then repacked it, attached it to the Nexons game and it seems to work. I set the first 400 bytes to 0, however after an update the launcher put some random data in there. At this point I am happy, I just ran into an issue with a couple of files that has multi byte characters that C# does not have a standard encoding for. Thanks again for the help!

data\texture\effect\skill\vitaldrain\»çº» - eff_vital_symbol01#.dds
07/04/2013 10:20 HellSpider#5
Quote:
Originally Posted by FattyB View Post
So I wrote my unpacker/packer and it works with the game. I unpacked the game, then repacked it, attached it to the Nexons game and it seems to work. I set the first 400 bytes to 0, however after an update the launcher put some random data in there. At this point I am happy, I just ran into an issue with a couple of files that has multi byte characters that C# does not have a standard encoding for. Thanks again for the help!

data\texture\effect\skill\vitaldrain\»çº» - eff_vital_symbol01#.dds
Good work! It's nice to see that someone has some serious developing going on around this game.

Btw, offtopic, but did you create some model viewer in the past? I recall I saw some posts about it.
07/04/2013 12:49 FattyB#6
Thanks for the compliment! I am in between jobs so we will see how far I get with this, but here is the list of things I have done so far. I am still learning WPF so the UIs are crude, but everything works.

Packer
Unpacker
Div Packer (found out the compression uses zlib)
Div Unpacker (used by the launcher)

Mini Launcher
Launcher (the div updater works, I just need to pack the updates into the game file. Ill work on that tomorrow)

The things on my list to do...
The game of course
Model viewer (I have the mesh data file figured out)
Model creator(This one will be a pain in the ass since I really don't want to recreate a model creator, so this will probably never get done)
Map creator (I have the map data file figured out, but the same as above, it will probably never get done)

So to answer your question, I had a model viewer done, and I had the game written in C++ so that you can run around the map (all buildings and objects placed), see the monsters, and see the NPCs. I had the ground texture tiles placed, but it was not blended. The thing that stopped me was the animation files. Figuring those out is going to take a lot of time.

I am hoping to get further with this project than I did before!

Here are some photos of the previous project and these were probably in the post that you saw 2 years ago.
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
07/04/2013 14:10 HellSpider#7
That's impressive!

I thought about making a converter for the MESH files to some general model files used by 3ds max or maya. That way custom models could be made and converted back to the game format. Though, I'd need to find time for a project like that.
07/04/2013 17:53 conquer93#8
Quote:
Originally Posted by HellSpider View Post
That's impressive!

I thought about making a converter for the MESH files to some general model files used by 3ds max or maya. That way custom models could be made and converted back to the game format. Though, I'd need to find time for a project like that.
that would be cool ;) hope u are gonna do this project ! thers already something like 3ds but we need an exporter for it. maybe u could fix that ^^