Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Decompressing using Quick BMS

Page: 1 of 1
 DarthSlinky
01-17-2010, 2:25 PM
#1
As most of use know some the TFU can be unpacked using QuickBMS and a script by GameZelda and PantheraKing on the XeNTaX forum (http://forum.xentax.com/viewtopic.php?f=10&t=3823&st=0&sk=t&sd=a&sid=08b94774f35082f89623757eff6d834b)

The script
# 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


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


The script works but as of now there is no way to recompress the files and very few of the models have been opened because LucasArts seems to have invented or modified an already non standard format.

This thread is to post your ideas, results and projects concerning the decompressing of TFU

Keep in my this only decompresses .lp files and the QuickBMS has no user interface to speak of, so this process is not for a novice computer user.

Good luck!

Edit: the link to QuickBSM is categorized as Malware by some website advisers, its clean.
 Crixler
01-17-2010, 5:31 PM
#2
There are files in there suggesting they were working on multiplayer at one point. In scum\runtime\scripts. I found them while looking through some Hoth stuff, but it could probably be found in a lot more than that. This is interesting.
 DarthSlinky
01-17-2010, 10:28 PM
#3
Wow working on a multi-player!:mad: they didn't release it. Imagine TFU capture the flag.
 Crixler
01-17-2010, 10:35 PM
#4
I personally have never been a huge fan of multiplayer, but it's extremely popular, I wonder why they stopped. It could have really helped the game's popularity and sales, I imagine.

I'm really interested in integrating the DLC into the main campaign, with the Tatooine and Hoth ones being Dark side only, of course. Looking through the files, I imagine it may be possible, assuming we're able to recompress the files eventually. The biggest problem may just be the placement of the Jedi Temple level, and how to fit it with the cutscenes!
 DarthSlinky
01-17-2010, 11:45 PM
#5
Multiplayer would have been amazing, and really added to the games longevity.

Just looking that the files, its a mess, downloadable content folders, lack of organization, cryptically names folders and files.

Is the PC version a converted 360 version?

Some multi-player powers I found

A "Team Heal"--Heals members of your faction within 15 meters by 50 percent.

Felucian Warrior Summon--Summon a Felucian Warrior that will resurect dead players and attack enemies of the player.

Shadow Guard Summon--Summon a random ShadowGuard type and attack enemies of the player.

Storm Squad--Summon a squad of stormtroopers that do your bidding.

Other (was in the test code but was commented out)
Lightning Shield
Vampire Attack
Confusion
Defensive Turrents
Imperial Interrogator
Jump Trooper
Junk Titan
Imperial Incinerator
Scrap Sentinel
Wookie Hero
Felucian Warrior
Shadow Trooper
Felucian Shaman
Rancor Rampage
Tie Bomber Run
Star Destroyer Bombardment
Sith Rage
Jedi Combat
Blinding
Mind Trick
Super Lightning
Super Push
Earthquake
Super grip

Multiplayer modes--
Holocron Gather (JO anyone?)
Melee

By the looks of the files they had a working multiplayer or were close to making one finished :mad:

Don't ask me what any of this means, this is all taken from Lucasarts code (even vampire attack)


Crixler: try TheForceUnleashed.scumcampaign.xml in Scum/Runtime/Prefs

Edit: The frame rate is set (at 30 fps) in AnimSystemOptions.animoptions.xml in Scum/Runtime
Good news for those with high end graphics cards
 Crixler
01-17-2010, 11:58 PM
#6
Yeah, I noticed the stormtrooper squard mentioned in the files, but I didn't look too much into it, since I knew it was a multiplayer thing. That's interesting though.

I did, however, notice in the multiplayer scripts, that there was some sort of mention in comments about something not working and that being a serious problem. Perhaps that's part of why it was dropped?

Alright, going to extract that now...

Edit: oh, didn't read that well enough, it's something I should already have. yeah, I think I already looked at that. It's a bit messy, but I think I could probably give it a shot. I'll wait until we can recompress though, before I really do a whole lot besides look through it.

Edit 2:
I just went through all the cutscenes, looking for a place to squeeze the temple in, but there's no easy place. Maybe I'd be able to get a bit more creative and use some audio from the Wii version and edit the cutscenes a bit. I've only done about 2 levels on the Wii, but I understand the Jedi Temple shows up a few times there, so there must be some suitable audio. The video wouldn't work very well though.

Ok, I just watched the cutscenes before each temple visit... 2 of them have Vader sending you there, and the third assumes you've already been there before. I don't think the Vader ones are overly appropriate. Reading what the Wii missions contain, I think the DLC version is more or less a more epic version of the Wii/PS2's 3rd visit, so perhaps I could just use the audio from that, and cut out the word "again". If you've never played the wii or ps2 versions, or just don't remember, here's the scene: http://www.youtube.com/watch?v=sNmlU9hZjNE) it's at about 1:36. it's very... brief... But I may be able to figure something out.

I'm venturing off this thread's topic now though, so if I have any more developments, I guess I should just post a new thread.


More on topic, yes, I do believe you're right when you asked if it's a port of the 360 version. There are 360 buttons hidden in the files, plus to me, anyway, it makes more sense than the PS3 version, because I imagine since 360 and PC are both Microsoft, there must be less work involved. Perhaps I'm wrong and it is just a coincidence though.
 DarthSlinky
01-18-2010, 9:36 AM
#7
No I look like the 360 version. Lucasarts would not stop just because something wasn't working right, maybe they just didn't have time to fix it before the release date.

Jedi Temple #3 is were is sees the visions-ghost thing right? wasn't that replaced by the little cut scene on Kashyyyk?

They change the story so much between the versions of the game I think the most canon form is the novel.

the Video has been disabled.

Does anyone know were the sound files are?
 Crixler
01-18-2010, 5:28 PM
#8
Well, I watched the cutscene after the 3rd visit as well, and it's the one saying you've landed on Kashyyyk, with a short line about what you found on Coruscant, and Kota cutting you short saying it's none of his business. So the new scene takes place between that and the one at the end of Bespin. We can't really edit it into the Bespin one, because the dialogue is between Starkiller and Juno, and we can't put it in the other one because that's right after. Maybe I could look for a quick clip of just those two in the ship, preferably with their backs to the camera to explain the poor lipsyncing.

The video may be disabled, but you can click the little box in the bottom right, and copy the url, and watch it right on youtube.

I think the Wii version uses live cutscenes, so I think you could just turn off music and effects, and there's the audio. I'm not sure if you can replay levels on the Wii though, so I'd have to have it set up beforehand I guess.

And yes, the 3rd visit has you going and you fight a simulation of your father. I never thought about how well the Jedi temple goes before the cutscene in your old house on Kashyyyk though. I don't know if the Wii has that part. If it does, then it should work fine, but if it doesn't, I may think about this more.
 reapper
01-18-2010, 6:04 PM
#9
I saw and read the XeNTaX forum it seems confusing if you dont know any scripting like me but maybe some one will make it easier to rip the models?
 DarthSlinky
01-19-2010, 10:00 PM
#10
As I interpreted it , the format of the models is not fully understood yet. Neither I nor anyone else I know has a clue how to use the format.

So whether we like it or not we have to wait until some computer genius to find a way to open the models, and find a way to recompress the assets.

Keep in mind to project is in its infancy, its no were near finished so if anyone is looking for a working system or even a beta test is in for a surprise.
 Crixler
01-19-2010, 10:05 PM
#11
Something I've been wondering about... Extracting different lp files, there are a lot of duplicates in them. Such as the shadow stormtrooper skin. It's in more than 1 .lp. So I wonder what I would have to do to potentially release a non-texmod version of my mod. Would I have to make a new version of every instance of it? That would kill simple mod compatibility, pretty much. I don't expect an answer to this, more of just thinking aloud.
 DarthSlinky
01-20-2010, 12:43 AM
#12
I noticed that as well, perhaps each level runs independently of each other.
 reapper
01-21-2010, 5:09 PM
#13
I guess your right darthslinky wait until some computer genius figure it out but I cant wait for it but have to....I just like the Sith Stalker armor!!! you know I tried ripping the models using 3d ripper dx but for some reason it didnt work perphs it doesnt like vista I havent tried it on xp thou
 jedimike2234
01-24-2010, 12:57 PM
#14
DarthSlinky,Crixler,i wanted to ask could it be the havok and dimm and euphoria that could be preventing all the compresion? And causing all these problems? Im just asking,if the game were to be moddable so to speak how would those programs be able to work if say someone were able to make a map? it would be so great to be able to make maps and different skins and put in different sounds and such but it seems that we cant for the moment. again just asking.
 Psyk0Sith
01-24-2010, 1:36 PM
#15
I think the chances of putting in new content are slim, custom models usually need an SDK/exporters/compilers.
 Crixler
01-24-2010, 3:50 PM
#16
DarthSlinky,Crixler,i wanted to ask could it be the havok and dimm and euphoria that could be preventing all the compresion? And causing all these problems? Im just asking,if the game were to be moddable so to speak how would those programs be able to work if say someone were able to make a map? it would be so great to be able to make maps and different skins and put in different sounds and such but it seems that we cant for the moment. again just asking.

I'm not an expert, but I wouldn't think that's the cause of the strange compression. But I imagine it would cause problems for adding new content, due to all the extra complexity.
 DarthSlinky
01-24-2010, 6:51 PM
#17
Havok lets you use there physics for free (non-commecial) so its not them, DMM releases trials...euphoria may be it, maybe that was part of the condition of use for euphoria.

Source www.havok.com)
 DarthSlinky
03-03-2010, 7:06 PM
#18
No, the models can be viewed, its only a matter of time.

The format is a modification of an already existing model format, and at least two of the models have been successful imported.

rogueclarkey is currently trying to extract that animation data, and it seems possible

Also QuickBMS can repackage files, so all someone would have to do is to write a script to do it, so if anyone is good at QuickBMS scripting, please please write one.
 ARAJediMaster
02-07-2015, 9:20 PM
#19
Excuse me for bothering you all on this thread, but can you help me in extracting the sound files of the game? I am no programmer, but I want to do this for a friend. Any help would be appreciated.
Page: 1 of 1