Important information: this site is currently scheduled to go offline indefinitely by end of the year.

StarWars Battlefront unpacker / decoder

The Original Forum. Game archives, full of resources. How to open them? Get help here.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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 »

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: 164
Joined: Sun Aug 22, 2010 10:14 pm
Has thanked: 40 times
Been thanked: 11 times

Re: StarWars Battlefront unpacker / audio decoder

Post by JakeGreen »

EDIT:Oops didn't see the page 2 LOL
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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: 257
Joined: Fri Jan 20, 2012 5:43 pm
Has thanked: 49 times
Been thanked: 139 times

Re: StarWars Battlefront unpacker / audio decoder

Post by erik945 »

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 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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 »

That did it! Extracting the files now, thank you so much for your help and patience :D
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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 »

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
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: StarWars Battlefront unpacker / audio decoder

Post by daemon1 »

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