Page 2 of 6

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 8:55 pm
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?

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 9:36 pm
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

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 9:46 pm
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.

Re: StarWars Battlefront unpacker / audio decoder

Posted: Mon Nov 30, 2015 9:48 pm
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!

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 01, 2015 12:55 am
by JakeGreen
EDIT:Oops didn't see the page 2 LOL

Re: StarWars Battlefront unpacker / audio decoder

Posted: Sat Dec 05, 2015 7:25 pm
by daemon1
Was anyone able to extract all sounds, and particularly, music? If yes, then I just update paths and update the script

Re: StarWars Battlefront unpacker / audio decoder

Posted: Sun Dec 06, 2015 4:16 pm
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?

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 4:10 pm
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 :)

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 4:38 pm
by daemon1
You need python 2.7.x
Somehow this script is not working with python3 and later

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 5:27 pm
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 :/

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 5:42 pm
by daemon1
google says you prob need the 32-bit python

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 7:38 pm
by Loswut
That did it! Extracting the files now, thank you so much for your help and patience :D

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 8:47 pm
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

Re: StarWars Battlefront unpacker / audio decoder

Posted: Tue Dec 08, 2015 11:53 pm
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'
>>>

Re: StarWars Battlefront unpacker / audio decoder

Posted: Wed Dec 09, 2015 4:34 pm
by daemon1
It seems python is VERY sensitive to its version. Try installing exactly the version I have: 32bit 2.7.3