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?
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
StarWars Battlefront unpacker / decoder
-
- 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
I am using a PC, Windows 8.1 64-bit.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?
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
-
- 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
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.
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
Thank you, that worked perfectly!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.
-
- 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
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
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
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
-
- 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
You need python 2.7.x
Somehow this script is not working with python3 and later
Somehow this script is not working with python3 and later
Re: StarWars Battlefront unpacker / audio decoder
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 :/
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 :/
-
- 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
That did it! Extracting the files now, thank you so much for your help and patience
-
- 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
Let me know if sounds get convertedLoswut wrote:That did it! Extracting the files now, thank you so much for your help and patience
Re: StarWars Battlefront unpacker / audio decoder
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'
>>>
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'
>>>
-
- 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
It seems python is VERY sensitive to its version. Try installing exactly the version I have: 32bit 2.7.3