Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

Painkiller 2004 PL Demo PAK File Unpack

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Eggtooth
ultra-n00b
Posts: 6
Joined: Sat Jun 05, 2010 7:20 pm

Painkiller 2004 PL Demo PAK File Unpack

Post by Eggtooth »

Hello!

I tried everything (MultiEX, Painful) to unpack first Painkiller Polish demo from 2004 (Three levels).
Why i need it? Because there is a Windowed option that i need to the New Painkiller Redemption (I am a Developer).
So if someone know how to unpack this file, please help me :( PainFull and Multi EX giving me error: Archive not identified. Please some one unpack this file, or give me a soft to unpack it. I need scripts from this PAK file.

There you can download this file: http://www29.zippyshare.com/v/83629131/file.html

Please help :(
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times

Re: Painkiller 2004 PL Demo PAK File Unpack

Post by WRS »

format is very simple but the compression is unknown by me.
zip archive or w/e:

Code: Select all

signature - 8 bytes
file headers - for each record: 20-bytes + length of filename + size of compressed data + 10-bytes
central directory - for each record: 46-bytes + length of filename
end of central directory - 22 bytes
my current setup is too bad to do much more. hopefully i can write a bms script for tomorrow.

edit:
1432 records.
see attachment for file name dump (1327 records) - the others are folder names.
You do not have the required permissions to view the files attached to this post.
Useful tool links:
Eggtooth
ultra-n00b
Posts: 6
Joined: Sat Jun 05, 2010 7:20 pm

Re: Painkiller 2004 PL Demo PAK File Unpack

Post by Eggtooth »

Yeah, that's the files i need.
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times

Re: Painkiller 2004 PL Demo PAK File Unpack

Post by WRS »

deflate algorithm. it is a zip file.... :|


quick note on my last attachment - it's wrong as some folders do have different checksums. not that it matters..

Code: Select all

idstring "PainPack\x0\x0"

get EOCDRP asize
math EOCDRP -= 22
goto EOCDRP

# end of central directory record
# no need to parse the cdr

idstring "PAIN"
get IGNORING long
get FILES short
goto 0xA

comtype deflate # 8

for i = 1 to FILES

  get UNKNOWN long # some sort of checksum
  get UNKNOWN long
  get ZSIZE long
  get SIZE long
  get FNLEN long
  getdstring FNAME FNLEN

  savepos DATASTART

  if ZSIZE > 0
    if ZSIZE == SIZE
      log FNAME DATASTART ZSIZE
      print "WARNING: No compression on last file"
    else 
      clog FNAME DATASTART ZSIZE SIZE
    endif
  endif

  math DATASTART += ZSIZE
  goto DATASTART
  getdstring UNKNOWN 10

next i

also found a reference to a windowed mode option in English.txt:
# video config
225: The higher resolutions, the faster PC and 3D card is required
226: Set to low if you have performance issues
227: Uncheck if you want to run the game in window mode
leave a comment!
Useful tool links:
Eggtooth
ultra-n00b
Posts: 6
Joined: Sat Jun 05, 2010 7:20 pm

Re: Painkiller 2004 PL Demo PAK File Unpack

Post by Eggtooth »

Can u just unpack file? I need it quick. But thanks for help. Yea, checksums are different but i tried several programs to unpack. Can u do it? I need a scripts from the archive :) Is it possible to unpack?
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times

Re: Painkiller 2004 PL Demo PAK File Unpack

Post by WRS »

Eggtooth wrote:Can u just unpack file? I need it quick. I need a scripts from the archive :) Is it possible to unpack?
i posted a bms script to unpack it for you.

download quickbms to run it on your file - http://aluigi.org/papers.htm#quickbms
Useful tool links:
Post Reply