Join also our Discord channel! Click here.

Dragon's Prophet idx and .p### files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
TheMathDoc
n00b
Posts: 10
Joined: Fri Sep 06, 2013 4:57 pm
Has thanked: 4 times
Been thanked: 1 time

Dragon's Prophet idx and .p### files

Post by TheMathDoc » Fri Sep 06, 2013 6:25 pm

Just putting this here in case anyone in the future wants a go at these files for the MMO Dragon's Prophet (the game is still in beta so this may change):

.idx file structure (index file for each package)

Bytes 0 -23: 24 byte header

Followed by file table entries which are 33 bytes + the file name

Bytes 0-11 ?
Bytes 12-15: Offset in package
Bytes 16-19: ?
Bytes 20-23: Zipped Size in package, not including the file's 28 byte header (see below)
Byte 24: Package file number (the data is in packages with extensions .p###, where this byte is the ### as a three digit number)
Bytes 25-28: ?
Bytes: 29-32: File name Length
Then the file name itself

.p### file structure:

Bytes 0-3: Header

Then, in succession, the file data which is of the form:
28 byte header, zlib file stream


I know this is far from complete, but if anyone wants to go out there an make an extractor for this game, I figure this is a nice start. Feel free to add in any extra details I missed.

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Fri Sep 06, 2013 8:08 pm

You can upload small packages p0x and idx?

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sun Sep 08, 2013 12:02 am

If I understand correctly it should look like this:

Code: Select all

struct IDXHeader
{
	BYTE    pHeader[16]; //"Rx.1.2.1157.tw + \x00
	DWORD	pNulls;
	DWORD	pTotalFiles;
};

struct IDXEntry
{
	DWORD	pUnknown1;        // unknown.. can be 1/2
	DWORD	pUnknown2;
	DWORD	pUnknown3;
	DWORD	pOffset;
	DWORD	pUnknown4;
	DWORD	pSize;
	BYTE    pArchiveNum;
	DWORD	pUnknown5;        // always 1
	DWORD	pFileNameLength;
};
Image

About compression : It's not Zlib..

And additional :
lzham -> D:\Works\trunk\Libraries\lzham\lzhamdecomp\
crunch -> D:\Works\trunk\Libraries\crunch\crnlib\

All files with header 28 bytes looks like :

Code: Select all

struct CHeader
{
	DWORD	pZSize;           // compressed size
	DWORD	pUnknown1;        // unknown.. can be 1/2
	DWORD	pUnknown2;        // hash1 ???
	DWORD	pUnknown3;        // hash2 ???
	DWORD	pUnknown4;        // 4
	DWORD	pSize;            // uncompressed size
	DWORD	pBSize;           // compressed data block size
};
After will be the compressed data with size > pBSize. Very similar to LZMA but comtype scanner gave no results.

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sun Sep 08, 2013 12:32 pm

Well here unpacker. Currently can't decompress compressed files because algo is unknown. And as an evil game does not support WinXP :(

Not Compressed files can be read. Example

data\luascript\70000442.lua

Code: Select all

--$Version=65221
function PE02_giveitem()
	GiveBodyItem(OwnerID(),20001123,1) 
end
Download: See below
Last edited by Ekey on Mon Sep 09, 2013 12:43 pm, edited 1 time in total.

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sun Sep 08, 2013 8:36 pm

Okay one compression algo 100% is LZMA but a little bit of modified :)

Just for example file data\luascript\70000021.lua

Original header (skip 28 bytes)

Code: Select all

5D 00 00 00 01 6C 04 00 00
Normal LZMA header must be

Code: Select all

5D 00 00 80 01 6C 04 00 00 00 00 00 00
and we get like this

Code: Select all

--$Version=96505
function TestZoneSysKey()
	Say( OwnerID() , GetZoneKeyValue( -1 , 1 , EM_RegZoneKeyValue_RoomCount ) );
	RegZoneKeyValue( -1 , 1 , EM_RegZoneKeyValue_RoomCount );
	Sleep( 30 );
	Yell( OwnerID() , GetZoneKeyValue( -1 , 1 , EM_RegZoneKeyValue_RoomCount ) );
end

function TestZoneSysKey_Reg( zoneid , type )
	RegZoneKeyValue( -1 , zoneid  , type );
end

function TestZoneSysKey_Set( type , value  )
	SetZoneKeyValue(type, value );
end

function TestZoneSysKey_Get( zoneid , type  )
	Yell( OwnerID() , GetZoneKeyValue( -1 , zoneid  , type ) );
end

function Test_CreateInstance()
	OpenCreateInstaneMenu( ownerID() , -1 , 903 , 0 , 0 , 0 , 0 , 0 );
end

function SysOpenAllPaletteBank()

	for i = 1 , 1024 do
		WriteRoleValue ( OwnerID() ,RoleValueName_Arrary_ColorBankFlag*1000000 +i ,1 );
	end
end

function SysSendSummonPlayer()
		SendSummonPlayer( TargetID() )
end

function SysSetTitleInfo(id)
	SetTitleInfo( OwnerID() , id )
end

function Test_GetRoleName()
	Yell( OwnerID() , " Owner=" .. GetPlayerName( OwnerID() ) .. " Target=" .. GetPlayerName( TargetID() ) );
end
With the textures have a problem. Examples

File compressed by LZMA

Code: Select all

interface\icons\cooking\food_bread_01.dds
But another file from this folder have unknown compression... crunch maybe? :scaredy:

Code: Select all

interface\icons\cooking\foodfish_01.dds

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Mon Sep 09, 2013 12:44 pm

Updated. Now decompressing (LZMA only) files while unpacking. DDS with other compression (100% crunch) currently not supported.

Download: See below

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Mon Sep 09, 2013 2:07 pm

Final Build - All compression methods are is supported LZMA/Crunch.

Image

Enjoy :)
You do not have the required permissions to view the files attached to this post.

sarzamin
beginner
Posts: 38
Joined: Fri Nov 19, 2010 3:19 pm
Location: Dubai
Has thanked: 3 times
Contact:

Re: Dragon's Prophet idx and .p### files

Post by sarzamin » Fri Sep 13, 2013 7:58 am

Thanks Ekey. :D

User avatar
howfie
double-veteran
double-veteran
Posts: 930
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 266 times

Re: Dragon's Prophet idx and .p### files

Post by howfie » Fri Sep 20, 2013 11:32 pm

nice ekey, but jesus mother of god, atlas.idx, with only a 30 MB or so p00 file is still unpacking after 20 minutes :D. anything you can do to make this stuff unpack a little faster :D? there's like 9 GB of this stuff.

User avatar
howfie
double-veteran
double-veteran
Posts: 930
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 266 times

Re: Dragon's Prophet idx and .p### files

Post by howfie » Sat Sep 21, 2013 12:00 am

ekey, my friend, i will be more than happy to do this game, it looks very doable.

i see why you were interested in it now LOL!

Image

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sat Sep 21, 2013 9:54 am

howfie wrote:nice ekey, but jesus mother of god, atlas.idx, with only a 30 MB or so p00 file is still unpacking after 20 minutes :D. anything you can do to make this stuff unpack a little faster :D?
Nope :)
howfie wrote:ekey, my friend, i will be more than happy to do this game, it looks very doable.

i see why you were interested in it now LOL!
Well i see now you too are interested, LOL :D

User avatar
howfie
double-veteran
double-veteran
Posts: 930
Joined: Fri Jul 08, 2011 12:06 pm
Location: Torrance, CA
Has thanked: 10 times
Been thanked: 266 times

Re: Dragon's Prophet idx and .p### files

Post by howfie » Sat Sep 21, 2013 5:19 pm

hahahaha well in-game the models actually look quite bad, but i think either the vertex normals or the lighting is bad in the game and that's fixable. the hair has no alpha either so that looks bad too (but neither did saints row: the third and lots of other games, and that's fixable too).

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sat Sep 21, 2013 6:16 pm

howfie wrote:well in-game the models actually look quite bad
Well okay :wmg:

LordDragonus
n00b
Posts: 10
Joined: Sat Nov 16, 2013 1:47 am
Has thanked: 3 times

Re: Dragon's Prophet idx and .p### files

Post by LordDragonus » Sat Nov 16, 2013 8:37 am

Hello!

I'm new here, registered to get this great program. I tested the program and... What should i say?! It's so great! Very fast unpacker :) Thanks for that great work!

And BTW: Do someone know, how to open the .db files? Its not an SQLite databse :(

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1659
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 73 times
Been thanked: 846 times

Re: Dragon's Prophet idx and .p### files

Post by Ekey » Sat Nov 16, 2013 10:39 am

LordDragonus wrote:And BTW: Do someone know, how to open the .db files? Its not an SQLite databse :(
Seems it's custom binary base.

Post Reply