The Forum is up for sale: XeNTaX Forum looking for new owner

painkiller .pak files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Guest

Post by Guest »

where did you post the files?
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Huh? Look up in this thread. You can see them! Three posts ago! :? :eek:
You must register on the forum to see them I guess. :think:
Guest

Post by Guest »

dumbass me!

I should leave now..later for sure.
Comrade
ultra-n00b
Posts: 1
Joined: Mon May 03, 2004 6:08 pm
Location: Moscow

Post by Comrade »

...Brilliant! Gone moddin`...
Got Vodka?
Cluster
ultra-n00b
Posts: 2
Joined: Mon May 03, 2004 7:41 pm

Post by Cluster »

Thank YOU!!
time to get my hands dirty =)
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

The encryption method:

Oh, a Xor method preceded by a inclusive (the new bit will be set) shift-left of the size (in bytes) of the filename (a size which is saved neatly in the PAK file, right before the encrypted resource name), and subsequently is incremented by either -2, -1, 0, 1, 2 depending on the two different hexadecimal parts of the size of the filename (in bytes) and then by the relative filenumber in the archive (the first file is 1, the second is 2 etc.).

Ok, so if I would write a filename of exactly 255 bytes in length in hexadecimal I would get FF. Hexadecimal is 0, 1...9, a, b, c, d, e, f. F = 15 in decimals. F F = 15 * 16 + 15 = 255. The byte is 255. But the two hexadecimal parts of the byte are F F or 15 15.
So, create a two-dimensional table in which [0, 0] = -2, [0, 1] = -1, [0, 2] = 0, [0, 3] = 1, [0, 4] = 2, [0, 5] = -2, [0, 6] = -1 etc until [15, 15]. (Thus, [1, 0] = -1).

So, to decode, read the size variable (a long, 4 bytes) of the filename first. Multiply it with 2. Add 1. Add the number from the above created table. Add the relative filenumber (the first resource in the archive gets a 1) and you have a variable which you will XOR with the first byte of the filename, the resulting byte is the first byte of the actual filename. Now keep adding two to the XOR-byte before you XOR it with a subsequent byte of the filename (giving you actual bytes of the filename) and repeat it in total until you reach the end of the filename. Voila , you have the decrypted filename string.

If there are any questions, don't hesitate. ;)
Guest

Post by Guest »

where are the files ? :(
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

They are only visible to registered users. Registration is free. :|
slider
ultra-n00b
Posts: 1
Joined: Wed May 05, 2004 1:02 am

Post by slider »

Where's that dutch article you wrote? Is it up somewhere to download?

Thx
-Slider
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

About the article, no, it's in the magazine. It's not online.

About the Painkiller *.PAK progression, I have updated painkiller.dll to be able to replace resources in the GRA. It's not implemented in MultiEx Commander yet, although my personal DLL plugin Tester has shown that it works (I replaced sounds of some creature with those from C&C Generals, and the game used them perfectly). :wink: It makes all the difference if this creature says "We will take what is ours" before it bashes your skull in. :D
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Okay, I just finished a stripped-down version of my plugin-tester and called it "PainFull". Here's the details , a screenshot, and the file. To see the screenshot and file, you must register.

[EDIT] FIXED BUG, SEE NEXT POST FOR FILE!
readme wrote:PainFull Extractor
Done in 2004 by Mike Zuurman
AKA Mr.Mouse/XeNTaX

*Purpose

Small archiver to extract stuff (and import files one by one)
into *.PAK files from the Painkiller game by DreamCatchers.
Use this for domestic purposes only ! It's a tool for the standard
fan of the game that just wants to mess about with some of the
resources.

>>>> Remember and respect the authors' copyrights on these files! <<<<

If you want to do something big, be sure to contact them first.

*Installation
Install MultiEx Commander (http://multiex.xentax.com) first,
you may not need it, but it will ensure you have dlls that you're gonna need.

Then install the all the files in this zip file in one directory of your choice.

Start with Painfull.exe

*Manual

Just browse to a PAK file of your choice at the left side
of the tool, select it in the file-list, and hit "Open Painkiller PAK".
You will notice the contents (entries) listed to the right.

- Extraction
Just select all files at once, clicking on the top file first
followed by a click on the last while holding down shift.
Alternatively just select the files you want, by holding ctrl.

To extract, click the button below and in between the two lists,
with "<<" on it. Voila. It will extract the files into the current path.

- Replacement
Select a file in the file list that you want to use to replace a file
in the open archive. Second, select the file you wish to replace in the
contents list. Click the ">>" button, and wait until it's finished.
Done.

Important Note! PainFull will automatically import the new file, and will
NOT create a backup. If you want to mess around with any PAK file,
be sure to back it up first and store it somewhere save!

( http://www.xentax.com, 2004 )

Thanks to Mambox for the initial hint! :)
You do not have the required permissions to view the files attached to this post.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Here's the updated file!

[EDIT]

Version 1.1 available!

Fixes the bug mentioned 2 posts down. (Could not extract from MAPS.PAK). Have fun!
You do not have the required permissions to view the files attached to this post.
Last edited by Mr.Mouse on Fri May 07, 2004 7:42 pm, edited 2 times in total.
Cluster
ultra-n00b
Posts: 2
Joined: Mon May 03, 2004 7:41 pm

Post by Cluster »

And again
Thanks Mr.Mouse, great tool!
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Thanks. I'll have to fix another bug though, in the MAPS.PAK file of the demo are directories that have extentions in their names like "mmoops\level.mpk\sounds\blah.txt"; the extractor fails to extract those, because of my quick and dirty coding. I will get to that small bug as soon as possible. :wink:
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Okido, fixed the bug. Scroll up for the new version (1.1). :)
Post Reply