Join also our Discord channel! Click here.

StarWars Battlefront unpacker / decoder

The Original Forum. Game archives, full of resources. How to open them? Get help here.
daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Mon Nov 30, 2015 8:55 pm

I assumed data chunks to be in these dirs:

\starwars\data\mp\cas.cat
\starwars\data\sp\cas.cat
\starwars\data\initial\cas.cat

Is that so? Also do you have a console or PC?

nilentry
ultra-n00b
Posts: 3
Joined: Mon Oct 12, 2015 4:50 am
Has thanked: 1 time

Re: StarWars Battlefront unpacker / audio decoder

Post by nilentry » Mon Nov 30, 2015 9:36 pm

daemon1 wrote:I assumed data chunks to be in these dirs:

\starwars\data\mp\cas.cat
\starwars\data\sp\cas.cat
\starwars\data\initial\cas.cat

Is that so? Also do you have a console or PC?
I am using a PC, Windows 8.1 64-bit.

The cat files are in these locations.
C:\Program Files (x86)\Origin Games\STAR WARS Battlefront\Data\Win32\installation\initialexperience\cas.cat
C:\Program Files (x86)\Origin Games\STAR WARS Battlefront\Data\Win32\installation\mp\cas.cat
C:\Program Files (x86)\Origin Games\STAR WARS Battlefront\Data\Win32\installation\sp\cas.cat

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Mon Nov 30, 2015 9:46 pm

You have to find these lines

cat1Path = r"mp\cas.cat"
cat2Path = r"sp\cas.cat"
cat3Path = r"initial\cas.cat"

and change them to

cat1Path = r"Win32\installation\mp\cas.cat"
cat2Path = r"Win32\installation\sp\cas.cat"
cat3Path = r"Win32\installation\initialexperience\cas.cat"

Sorry, I don't have time to reupload the script now.

nilentry
ultra-n00b
Posts: 3
Joined: Mon Oct 12, 2015 4:50 am
Has thanked: 1 time

Re: StarWars Battlefront unpacker / audio decoder

Post by nilentry » Mon Nov 30, 2015 9:48 pm

daemon1 wrote:You have to find these lines

cat1Path = r"mp\cas.cat"
cat2Path = r"sp\cas.cat"
cat3Path = r"initial\cas.cat"

and change them to

cat1Path = r"Win32\installation\mp\cas.cat"
cat2Path = r"Win32\installation\sp\cas.cat"
cat3Path = r"Win32\installation\initialexperience\cas.cat"

Sorry, I don't have time to reupload the script now.
Thank you, that worked perfectly!

JakeGreen
mega-veteran
mega-veteran
Posts: 163
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 39 times
Been thanked: 11 times

Re: StarWars Battlefront unpacker / audio decoder

Post by JakeGreen » Tue Dec 01, 2015 12:55 am

EDIT:Oops didn't see the page 2 LOL

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Sat Dec 05, 2015 7:25 pm

Was anyone able to extract all sounds, and particularly, music? If yes, then I just update paths and update the script

erik945
mega-veteran
mega-veteran
Posts: 252
Joined: Fri Jan 20, 2012 5:43 pm
Has thanked: 46 times
Been thanked: 110 times

Re: StarWars Battlefront unpacker / audio decoder

Post by erik945 » Sun Dec 06, 2015 4:16 pm

Thank you for ubdate tool.
I unpack cas files. How I can restore body of data files (3d models) from *.mesh and chunks?

Loswut
ultra-n00b
Posts: 4
Joined: Sat Nov 28, 2015 3:55 am
Has thanked: 3 times

Re: StarWars Battlefront unpacker / audio decoder

Post by Loswut » Tue Dec 08, 2015 4:10 pm

First of all, thanks for your efforts. Really appreciate it.

Sadly, it seems I'm making a mistake somewhere as it will not let me extract the files. I've replaced the bfDirectory targetDirectory and cat paths, but when I then try run the script it gives me a syntax error popup, saying invalid syntax. Specifically, it highlights this part in the script:

#Deal with the chunks which are defined directly in the toc.
#These chunks do NOT know their originalSize.
#Available fields: id, offset, size
for entry in toc.chunks:
targetPath=targetFolder+"/chunks/"+hexlify(entry.id)+".chunk"
if prepareDir(targetPath): continue
if toc.get("cas"):
try:
catEntry=cat[entry.sha1]
if checkchunk(catEntry.path,catEntry.offset):
LZ77.decompressUnknownOriginalSize(catEntry.path,catEntry.offset,catEntry.size,targetPath)
except:
print "chunk not found", hexlify(entry.sha1)
else:
if checkchunk(sbPath,entry.offset):
LZ77.decompressUnknownOriginalSize(sbPath,entry.offset,entry.size,targetPath)

I probably made some silly error or forgot something totally obvious, but any help would be greatly appreciated :)

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Tue Dec 08, 2015 4:38 pm

You need python 2.7.x
Somehow this script is not working with python3 and later

Loswut
ultra-n00b
Posts: 4
Joined: Sat Nov 28, 2015 3:55 am
Has thanked: 3 times

Re: StarWars Battlefront unpacker / audio decoder

Post by Loswut » Tue Dec 08, 2015 5:27 pm

Thanks for the answer.
I'm afraid I've hit another bump though :(

Traceback (most recent call last):
File "C:\BattlefrontDump\swbf_dump\sw_dumper.py", line 45, in <module>
LZ77 = cdll.LoadLibrary("LZ77")
File "C:\Python27\lib\ctypes\__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application

Yeah, I'm pretty bad at this sort of thing :/

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Tue Dec 08, 2015 5:42 pm

google says you prob need the 32-bit python

Loswut
ultra-n00b
Posts: 4
Joined: Sat Nov 28, 2015 3:55 am
Has thanked: 3 times

Re: StarWars Battlefront unpacker / audio decoder

Post by Loswut » Tue Dec 08, 2015 7:38 pm

That did it! Extracting the files now, thank you so much for your help and patience :D

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Tue Dec 08, 2015 8:47 pm

Loswut wrote:That did it! Extracting the files now, thank you so much for your help and patience :D
Let me know if sounds get converted

Loswut
ultra-n00b
Posts: 4
Joined: Sat Nov 28, 2015 3:55 am
Has thanked: 3 times

Re: StarWars Battlefront unpacker / audio decoder

Post by Loswut » Tue Dec 08, 2015 11:53 pm

The extraction worked flawlessly as far as I can tell.

When I use the Fb3decoder to conver the files I get this:

>>>
XAS1 dll detected.
EASpeex dll detected.

Traceback (most recent call last):
File "C:\BattlefrontDump\fb3decoder\fb3decoder.py", line 100, in <module>
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
AttributeError: 'module' object has no attribute 'STARTF_USESHOWWINDOW'
>>>

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2274
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1901 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 » Wed Dec 09, 2015 4:34 pm

It seems python is VERY sensitive to its version. Try installing exactly the version I have: 32bit 2.7.3

Post Reply