XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Sep 25, 2017 5:54 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 109 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Mon Nov 02, 2009 12:36 am 
Offline
advanced
User avatar

Joined: Sat Sep 19, 2009 10:26 pm
Posts: 41
Has thanked: 3 times
Have thanks: 8 times














You can make the ads go away by registering

Hello,

I'm trying to uncompress some files found on PC version of Star Wars The Force Unleashed, I figured out the following until now:

Code:
Offset Bytes     Description
0        4          Uncompressed size
4        4          ZSIZE -> Compressed size (file size minus 0xC bytes)
8        4          Checksum?
C        ZSIZE   Contents


I have attached a sample, can some please take a look?

I already have tested quickbms using several uncompression type (ComType xxxxxx), none of them worked. Maybe contents are encrypted?

Thanks!


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Nov 03, 2009 12:25 am 
Offline
advanced

Joined: Wed Nov 14, 2007 5:56 pm
Posts: 61
Has thanked: 0 time
Have thanks: 27 times
The compressed data is XOR FF'd.
The compression looks like LZSS.


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Nov 03, 2009 1:13 am 
Offline
advanced
User avatar

Joined: Sat Sep 19, 2009 10:26 pm
Posts: 41
Has thanked: 3 times
Have thanks: 8 times
GameZelda wrote:
The compressed data is XOR FF'd.
The compression looks like LZSS.


Thanks!

But didn't work. I tried:

get SIZE LONG
get ZSIZE LONG

comtype lzss
filexor "\xff"
clog NAME.txt "\x0c" ZSIZE SIZE


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Thu Nov 05, 2009 4:33 am 
Offline
VVIP member
VVIP member
User avatar

Joined: Thu Dec 08, 2005 12:26 pm
Posts: 1925
Location: www.ZENHAX.com
Has thanked: 4 times
Have thanks: 630 times
the correct script would be:
Code:
comtype lzss
get SIZE long
get ZSIZE long
get DUMMY long
savepos OFFSET
filexor 0xff
clog "dump.dat" OFFSET ZSIZE SIZE
but can't work because the algorithm is not lzss, it's something else


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Thu Nov 05, 2009 3:08 pm 
Offline
advanced
User avatar

Joined: Sat Sep 19, 2009 10:26 pm
Posts: 41
Has thanked: 3 times
Have thanks: 8 times
Thanks, aluigi.


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Thu Nov 05, 2009 9:51 pm 
Offline
veteran

Joined: Thu Nov 05, 2009 8:46 pm
Posts: 121
Has thanked: 9 times
Have thanks: 104 times
Hi
Can someone make an unpacker for the game .lp files?
Sample:http://www.zshare.net/download/6802877050e22834/


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Sun Nov 08, 2009 6:33 pm 
Offline
advanced

Joined: Wed Nov 14, 2007 5:56 pm
Posts: 61
Has thanked: 0 time
Have thanks: 27 times
Code:
# Star Wars The Force Unleashed / .lp container
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

# The container format seems pretty strange and I don't understand it much, but this script works...

# File Header
IDString "kaPA"
Get @version long
If @version != 5
   Print "@version = %@version%, expected 5."
   CleanExit
EndIf
Get @nFiles long

GoTo 0x1C
Get @fileNameTableSize long
Get @fileOffTableOff long
Get @dataOff long

# Calculate some useful stuff
Set @fileNameTableOff 0x50

Set @fileInfoTableOff @fileNameTableOff
Math @fileInfoTableOff += @fileNameTableSize

# Extract the files
For @i = 0 < @nFiles
   # Get the file name (there's an offset to it at 0x14 of the file info table)
   Set @fileNameOffOff @i
   Math @fileNameOffOff *= 0x40
   Math @fileNameOffOff += @fileInfoTableOff
   Math @fileNameOffOff += 0x14
   GoTo @fileNameOffOff

   Get @fileNameOff long
   Math @fileNameOff += @fileNameTableOff
   GoTo @fileNameOff

   Get @fileName string

   # Get the file size (it's at 0x28 of the file info table)
   Set @fileSizeOff @i
   Math @fileSizeOff *= 0x40
   Math @fileSizeOff += @fileInfoTableOff
   Math @fileSizeOff += 0x28
   Goto @fileSizeOff

   Get @fileSize long

   # Get the file offset (it's at 0x04 of the file offset table)
   Set @fileOffOff @i
   Math @fileOffOff *= 0x10
   Math @fileOffOff += @fileOffTableOff
   Math @fileOffOff += 0x04
   Goto @fileOffOff

   Get @fileOff long
   Math @fileOff += @dataOff
   
   # Extract the data, finally
   Log @fileName @fileOff @fileSize
Next @i


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Nov 24, 2009 8:14 pm 
Offline
ultra-n00b

Joined: Thu Nov 05, 2009 8:10 am
Posts: 2
Has thanked: 2 times
Have thanks: 0 time
And can I use this script to extract and also pack that archive? In that case, can someone explain me how please?

//EDIT: Ok, I can extract that archive, thank you for script, but can I get it back to the archive?


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Mon Nov 30, 2009 12:20 pm 
Offline
veteran
User avatar

Joined: Sun Jul 05, 2009 12:58 pm
Posts: 129
Has thanked: 13 times
Have thanks: 0 time
The script don't work for larger files.

Quote:

QuickBMS generic files extractor 0.3.9a
by Luigi Auriemma
e-mail: aluigi@autistici.org
web: aluigi.org

- GUI mode activated, remember that the tool works also from command-line
where are available various options like folder scanning, filters and so on

- select the input archive/file to extract
- select the output folder where extracting the files
- open input file E:\Games\Star Wars The Force Unleashed\LevelPacks\tem_jeditemp
le_b_pc.lp
- open script D:\[SNP] Ripping Tools\quickbms2\starwars.txt
- set output folder E:\[Archives] Extracted Files\[PC] Star Wars Force Unleashed


offset filesize filename
------------------------------

- 0 files found in 0 seconds

Press RETURN to quit


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Dec 01, 2009 7:22 pm 
Offline
beginner

Joined: Tue May 26, 2009 1:27 pm
Posts: 39
Has thanked: 1 time
Have thanks: 0 time
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Fri Dec 04, 2009 9:50 pm 
Offline
ultra-n00b

Joined: Fri Dec 04, 2009 8:44 am
Posts: 1
Has thanked: 0 time
Have thanks: 2 times
Hi,

I did a more generic script to extract files from files .lp

It works with any .lp files (If not just tell me but i've tested it on almost all files)
If you can figure out some of the "UNKNOWN" fields please tell me, because i'm writing a SWTFU Tool like Kotor Tool

Code:

# Star Wars The Force Unleashed PC / .lp extractor
# script for QuickBMS http://aluigi.org/papers.htm#quickbms


# OFFSET TABLE LAYOUT - SIZE=0x10
#
#   0x00 - FILE INDEX - 4
#    0x04 - FILE DATA OFFSET - 4
#   0x08 - ALWAYS 0 - 4
#   0x0C - ALWAYS 0 - 4

# INFO TABLE LAYOUT - SIZE=0x40
#
#   0x00 - UNKNOWN - 4
#   0x04 - UNKNOWN - 4
#   0x08 - ALWAYS 0 - 4
#   0x0C - UNKNOWN - 4
#   0x10 - UNKNOWN - 4
#   0x14 - NAME OFFSET - 4
#   0x18 - UNKNOWN - 4
#   0x1C - ALWAYS 0 - 4
#   0x20 - ALWAYS 0 - 4
#   0x24 - ALWAYS 0 - 4
#   0x28 - FILE SIZE - 4
#   0x2C - FILE SIZE CHECK? - 4
#   0x30 - ALWAYS 0 - 4
#   0x34 - UNKNOWN - 4
#   0x38 - ALWAYS 0 - 4
#   0x3C - ALWAYS 0 - 4

getdstring   IDSTRING      4
get      FILE_VERSION      long
get      NUM_FILES      long

get      UNKNOWN1      long # Seems to be always 0x00000000
get      UNKNOWN2      long # Seems to be always 0xFFFFFFFF
get      UNKNOWN3      long # Seems to be always 0x00000000


# The header seems to change depending of this value
# It seems to be the extra header size
# Default header size is 0x50, to get the correct offset for the name table, you have to do
# 0x50 + EXTRA_HEADER_SIZE

get      EXTRA_HEADER_SIZE   long
get      NAME_TABLE_SIZE      long
get      OFFSET_TABLE_OFF   long
get      DATA_OFF      long
get      UNKNOWN4      long
get      UNKNOWN5      long
get      DATA_OFF_2      long # Seems to be always the same value as DATA_OFF
get      WHOLE_FILE_SIZE      long # Seems to be the size of the whole file
get      UNKNOWN6      long # Seems to be always 0x00000000
get      UNKNOWN7      long # Seems to be always 0x00000000
get      UNKNOWN8      long # Seems to be always 0x00000000
get      DATA_OFF_3      long # Seems to be always the same value as DATA_OFF
get      WHOLE_FILE_SIZE_2   long # Seems to be always the same value as WHOLE_FILE_SIZE
get      UNKNOWN9      long # Seems to be always 0x00000000

set      NAME_TABLE_OFF      EXTRA_HEADER_SIZE
math      NAME_TABLE_OFF      += 0x50

set      INFO_TABLE_OFF      NAME_TABLE_OFF
math      INFO_TABLE_OFF      += NAME_TABLE_SIZE

########### FILE CHECKS ##############

if   IDSTRING != "kaPA"
      print "File type check error\nThis is not a SWTFU .lp file\n"
      cleanExit
endif

if   FILE_VERSION != 0x00000005
      print "File version is not supported!\nExpected version: 5\nThis version: %FILE_VERSION%\n"
      cleanExit
endif

if   WHOLE_FILE_SIZE != WHOLE_FILE_SIZE_2
      print "File size check error: %WHOLE_FILE_SIZE% - %WHOLE_FILE_SIZE_2%\n"
      cleanExit
endif

if   DATA_OFF != DATA_OFF_2
      print "Data offset check error: %DATA_OFF% - %DATA_OFF_2% - %DATA_OFF_3%\n"
      cleanExit
elseif   DATA_OFF != DATA_OFF_3
      print "Data offset check error: %DATA_OFF% - %DATA_OFF_2% - %DATA_OFF_3%\n"
      cleanExit
endif

########### EXTRACTION ###############

for   i = 0 < NUM_FILES
   
      set   FILE_INFO_POS      i
      math   FILE_INFO_POS      *= 0x40 # Size of INFO_TABLE struct for each file
      math   FILE_INFO_POS      += INFO_TABLE_OFF

      set   FILE_OFFSET_POS      i
      math   FILE_OFFSET_POS      *= 0x10 # Size of FILE_OFFSET struct for each file
      math   FILE_OFFSET_POS      += OFFSET_TABLE_OFF

      # GET FILE NAME

      set   TEMP_POS      FILE_INFO_POS
      math   TEMP_POS      += 0x14
      
      goto   TEMP_POS
      get   FILE_NAME_OFFSET   long
      math   FILE_NAME_OFFSET   += NAME_TABLE_OFF
      
      goto   FILE_NAME_OFFSET
      get   FILE_NAME      string

      # GET FILE SIZE
      
      set   TEMP_POS      FILE_INFO_POS
      math   TEMP_POS      += 0x28
   
      goto   TEMP_POS
      get   FILE_SIZE      long
      
      # GET FILE DATA

      set   TEMP_POS      FILE_OFFSET_POS
      math   TEMP_POS      += 0x04
      
      goto   TEMP_POS
      get   FILE_DATA_OFFSET   long
      math   FILE_DATA_OFFSET   += DATA_OFF

      # WRITE FILE

      log   FILE_NAME FILE_DATA_OFFSET FILE_SIZE

next i


######################################


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Dec 08, 2009 2:06 am 
Offline
beginner

Joined: Tue May 26, 2009 1:27 pm
Posts: 39
Has thanked: 1 time
Have thanks: 0 time
Have you been able to figure out anything for the pcp/pcd files?


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Dec 08, 2009 8:33 am 
Offline
ultra-n00b

Joined: Thu Nov 05, 2009 8:10 am
Posts: 2
Has thanked: 2 times
Have thanks: 0 time
PantheraKing wrote:
Hi,

I did a more generic script to extract files from files .lp

It works with any .lp files (If not just tell me but i've tested it on almost all files)
If you can figure out some of the "UNKNOWN" fields please tell me, because i'm writing a SWTFU Tool like Kotor Tool

Code:
.
.
.


That script don't work for me. QuickBMS shows "Error: invalid command "elseif" or arguments 3 at line 86" I'm noob, so I don't see any problem on that line...


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Dec 08, 2009 10:52 am 
Offline
VVIP member
VVIP member
User avatar

Joined: Thu Dec 08, 2005 12:26 pm
Posts: 1925
Location: www.ZENHAX.com
Has thanked: 4 times
Have thanks: 630 times
in case of problems like this check EVER if exist a newer version of QuickBMS (0.3.10 at the moment):
http://aluigi.org/papers.htm#quickbms


Top
 Profile  
 
 Post subject: Re: Star Wars The Force Unleashed - PC Version .z files
PostPosted: Tue Dec 15, 2009 9:28 pm 
Offline
beginner

Joined: Thu Oct 22, 2009 8:54 pm
Posts: 33
Has thanked: 2 times
Have thanks: 4 times
Image

Chrrox and I have been working on the Unleashed model format. Here is a picture of a StormTrooper that we ripped. The ripping is not yet automated, yet if you would like the script it will be posted on my blog when complete: http://uberblack3d.blogspot.com/

WE NEED YOUR HELP!

What is left to do?

We would like to get some help finding the bone format and integrating this into our 3DSMAX script. Also animation is very possible and we also need help with this. If you are interested in helping in this project let Chrrox or me know or just edit our script and post it.

Also if anyone is good at figuring out the sound format that would be awesome too.

Note: All the mesh formats with UV's have been discovered and is able to be imported into max via Script.

Very special thanks to Luigi for a great BMS script to extract the assets.

The first link is for the Storm Trooper model, and Animations. I have also included the Alpha of the 3DSMax script that we are still working on for other's to critique or improve. The second is a PCP & PCD file which I think is sound.

Storm Trooper Mesh & Animations
http://www.sendspace.com/file/gvvi7s

Storm Trooper Sounds
http://www.sendspace.com/file/ytdr37


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 109 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: yiwang and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group