Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Help with 15 days resource.xxx unpacking and repacking

The Original Forum. Game archives, full of resources. How to open them? Get help here.
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

The contents of this post was deleted because of possible forum rules violation.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

I's possible, that the game uses the same method, just like the other games from that company.
(Mistery of the Druids, The Moment of Silence, Overclocked)
Here is a XeNTaXviki link: http://wiki.xentax.com/index.php/The_Moment_Of_Silence
So, there must be a descriptor file, named RESOURCE.MAP
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

But no this kind of resource.map in game.
You do not have the required permissions to view the files attached to this post.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

I managed to create a simple unpacker. Works with resource.000 and resource.907. Tested with the german version of the game.
Important #1: The resoure.000 file also contains the file informations of these files:
resource.100; resource.101 and resource.200, so if you want to unpack, you need more than 3,5 GigaBytes of free disk space.
Important #2: The resource.907 is a standalone archive, contains only its own information.
Important #3: There are no file extensions in the file information tables, so I gave the '.dat' extension to most of the files, except some '.wav'; '.dds' and '.tga' files.

Updated! Now I see, that you don't have the resource.907 file!!! You have resource.909!
Could you send me a little piece of that file? The important part is about the last 256 kilobyte of the file.
Here is a file cutter tool:http://www.xentax.com/downloads/tools/filecutter.zip
Last edited by bacter on Sun Jun 27, 2010 2:24 pm, edited 1 time in total.
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

The contents of this post was deleted because of possible forum rules violation.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

No luck.
Could you give me one more information? What is the exact size (in bytes) of that resource.909 file?
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

The contents of this post was deleted because of possible forum rules violation.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

O.K. I successfully updated the extractor!
Now it supports these languages: german (resource.907), english (resource.909) and french (resource.912).
(And of course also supports the general, resource.000 file.)
Little modification: The unknown extensions are marked with _01, _02 ... instead of .dat extension.

[The atteched file deleted. Please check my latest post for the most recent version.]
Last edited by bacter on Tue Sep 07, 2010 11:43 am, edited 2 times in total.
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

bacter wrote:O.K. The extractor program now handles the resource.909 file too!
Little modification: The unknown extensions are marked with _01, _02 ... instead of .dat extension
Wow, thanks very much for your good work!
And can you post a file format of resource.000 and resource.90X here?
May be useful later.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

Here is some pseudo-code of those files:

Code: Select all

-> Open the file "resource.000" or "resource.9xx"
-> Seek to FILE_END - 4
-> Read: int32, this is the DATASTARTPOS
-> Seek to DATASTARTPOS
-> The DATA_size = RESOURCEFILE_SIZE - DATASTARTPOS - 4
-> Read the DATA (DATA_size)

-> Now we have the DATA, which is a zlib compressed block, with a little trick: it contains 4+4=8 plus bytes,
   in the middle of the DATA, so first we have to remove these bytes.
   So this is the structure of the DATA:
     First part: SOME_AMOUNT of bytes
     Number1 : 4 bytes
     Second part: SOME_AMOUNT of bytes
     Number2 : 4 bytes
     Last part : the rest of the bytes (DATA_size - 2 * SOME_AMOUNT - 8)
   The value of SOME_AMOUNT is: "resource.000" = 100 "resource.907" = 14
   (The formula for "resource.9XX" files: SOME_AMOUNT = XX * 2)
-> If we deleted the Number1 and Number2, we can decompress the ZLIB_compressed DATA
-> No we have the decompressed directory data, so let's go on.

-> the next step is only for the "resource.000":
   - There is an information table of the resource.xxx files:
      REPEAT
        Read RESOURCE_FILE_INFO: (112 bytes)
               ExtensionNumber : Int32 // 0=resource.000 100=resource.100 200=resource.200 201=resource.201
               UnknownNumber : Int32
               Dummy : Array[0..103] Of Byte // zero bytes
        IF (ExtensionNumber==0) AND (UnknownNumber==0) THEN THIS_IS_THE_END
      UNTIL THIS_IS_THE_END

-> now comes the information of the stored files:
      REPEAT
        Read EXT_id : Int32 // this means the extensions of the following files. 5=.tga 11=.wav 13=.dds and so on.
        Read NrOfFiles : Int32
        IF (EXT_id==0) AND (NrOfFiles==0) THEN THIS_IS_THE_END

        IF NOT THIS_IS_THE_END THEN:
            FOR 1 TO NrOfFiles
              Read FILE_INFO (76 bytes for each file)
                      FileName : Array[0..62] Of Char // with padding zero chars
                      FlagByte : Byte // this means the containing resource.XXX file -> see note #1
                      StartPos : Int32
                      OriginalSize : Int32
                      ZlibCompressedSize : Int32 // 0, if not compressed
        ENDIF
      UNTIL THIS_IS_THE_END
-> the next step is only for the "resource.907":
        Read RESOURCE_FILE_INFO: (112 bytes)
               ExtensionNumber : Int32 // 907=resource.907
               UnknownNumber : Int32
               Dummy : Array[0..103] Of Byte // zero bytes

-> the next step is only for the "resource.000":
   There are some unkown bytes at the end, maybe some useless, unimportant junk.

note #1:
The FlagByte: If we have the "resource.907" then this is 0, so no problem.
but if have the "resource.000" then this is 1,2,3 or 4, see the previously read RESOURCE_FILE_INFO blocks,
take the appropriate ExtensionNumber, and that means the correct resource.XXX file.
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by stevenx »

Very very thanks!
Can you figure out which file is the dialog subtitle file in these files?
emirdar
ultra-n00b
Posts: 1
Joined: Tue Jul 13, 2010 11:20 pm

Re: Help with 15 days resource.xxx unpacking and repacking

Post by emirdar »

thank you :keke:
duktom
ultra-n00b
Posts: 1
Joined: Sat Jul 24, 2010 4:29 am
Has thanked: 1 time

Re: Help with 15 days resource.xxx unpacking and repacking

Post by duktom »

thanks .:)...
Sheen
beginner
Posts: 25
Joined: Tue Mar 02, 2010 7:29 pm
Has thanked: 8 times
Been thanked: 3 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by Sheen »

Hi bacter, I need your help.

I have this game in two languages: English and spanish, but spanish language is blocked into resource.910 I guess.

Can you help me to get the spanish subtitles from .910? Your actually extractor works wonderful with all files less with 910 one, of course.

This is the head and tail of that file. If you need the full file tell me and I'll upload this one to megaupload or hotfile.

resource.910

Thanks a lot in advance.

Regards.
bacter
veteran
Posts: 142
Joined: Mon Feb 22, 2010 8:42 pm
Has thanked: 2 times
Been thanked: 83 times

Re: Help with 15 days resource.xxx unpacking and repacking

Post by bacter »

I updated my tool. Please check if it works.
Theoretically it has to work, but if not, then first I need one more information to test your file: the exact size of
the pak file, in bytes. (So I can make a fake file and try to load the file information table)
Last edited by bacter on Thu Jun 23, 2011 6:31 pm, edited 1 time in total.
Post Reply