Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

Star Wars: Battlefront (2004) [Sound Extracting] - *.lvl extract and play extracted files in vgmstream

Featured Replies

Hi there!!!

I need to extract the music and sound files from that game. Maybe anybody knows how to extract that archive. I searched over internet and did not find any possible solution. I need to extracted files should play in vgmstream. I have provided one *.lvl file from each platform: PS 2, XBox and PC.

Samples: PC | PS 2 | XBox

I just need to get better quality, 44.1 kHz or 48 kHz.

 

Please, help.

Edited by leop2p

  • Author

Thanks!

But I've only tested on XBox and PS2 versions. On XBox version, for example bes.lvl, extracted all normal except two tracks, they gives me a noise (like corrupted).

Also for PS2 version there's half not readable tracks in vgmstream, half is mono with 00:00:00 duration (vgmstream info and FFMPEG info). No stereo tracks, but they got to be. 

Also, on PC version, for example inside *.bes.lvl, there's several tracks extracted, some of them are corrupted (noise), but most of them are monos, vgmstream gives an error: 

Quote

RIFF: wrong expected size (report/re-rip?)

With BF 2 the same, almost all the tracks are with 48 bytes. There's only RIFF header. For BF 1 PC too.

Track you attached I successfully extracted. It plays correctly, but try other files, they're almost all with only RIFF-header and nothing more.

I wrote an issue inside repository on GitHub.

Thanks anyway for program. It's possible solution.

Edited by leop2p

  • 2 weeks later...
  • Localization

I've made a QuickBMS script for PS2 version

Spoiler
#Star Wars: Battlefront (2004) [Sound Extracting] - *.lvl extract
#for PS2 version
# script for QuickBMS http://quickbms.aluigi.org

idstring "ucfb"
get EmoName basename
set Counter long 1

for //emo_ cycle
	findloc BaseOffset binary "emo_"
	goto BaseOffset
	get Tag long
	get EmoSize long
	
	//skip wrong emo_
	savepos Header
	get Check long
	if Check != 0x0fb40705 //not data offset ID
		continue //find next emo_
	else
		goto Header //process this emo_
	endif
	
	//header
	for i = 0 < 10
		get ID long
		get Value long
		
		if ID == 0x8d39bde6 //hashed list Name
			math HashedListName = Value
		endif			
		if ID == 0x0fb40705 //data offset
			math OFFSET = Value
			math OFFSET + 24
			math OFFSET + BaseOffset
		endif
		if ID == 0x40fbdebd //files
			math FILES = Value
		endif
		if ID == 0x7816084b //channels
			math CHANNELS = Value
		endif
		if ID == 0x182fd58d //interleave size
			math interleave = Value
		endif		
	next i
	
	//audio files metadata
	for i = 0 < FILES
		get ID long //0x37386ae0
		get HashedName long
		get ID long //0x2fb31c01
		get FREQUENCY long
		get ID long //0x23a0d95c
		get SIZE long
		get ID long //0x1d48feef
		get SizeSamples long
		get ID long //0x809608b6
		get Pad long
		get SampleEnd long //0x2e789fb4
		get Unk3 long	
		
		math SIZE + Pad
		string NAME P "%EmoName%/%Counter%_%i%.ss2"
		callfunction DUMP_VAG //write to file
		math OFFSET + SIZE
	next i

	math Counter + 1

next

# you must provide the following values: OFFSET SIZE FREQUENCY and CHANNELS
startfunction DUMP_VAG
    log MEMORY_FILE 0 0
    put 0x64685353 long MEMORY_FILE
    put 0x18 long MEMORY_FILE
    put 0x10 long MEMORY_FILE
    put FREQUENCY long MEMORY_FILE
    put CHANNELS long MEMORY_FILE
    //xmath interleave "SIZE / CHANNELS"
    put interleave long MEMORY_FILE
    put 0 long MEMORY_FILE
    put 0xffffffff long MEMORY_FILE
    put 0x64625353 long MEMORY_FILE
    put SIZE long MEMORY_FILE
    append
    log MEMORY_FILE OFFSET SIZE
    append

    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE
endfunction

 

 

Here is a extract script for .lvl if you need to

Spoiler
#Star Wars: Battlefront (2004) - *.lvl extract
# script for QuickBMS http://quickbms.aluigi.org

idstring "ucfb"
get Size long
math Size + 8

for
	get Magick long //0x217fb95b
	if Magick = 0x5bb97f21
		get FSize long
		get Tag long //_pad lvl_ emo_ ffx_
		get PartSize long
		savepos Offset
	else 
		set Tag long Magick
		get PartSize long
		savepos Offset
	endif
	string Tag = Tag
	
	if Tag = "emo_"
		string FName P "%offset|x%.emo"
		log FName Offset PartSize
	elif Tag = "_pad"
			
	elif Tag = "lvl_"
		string FName P "%offset|x%.lvl"
		log FName Offset PartSize
	elif Tag = "ffx_"
		
	endif
	
	math Offset + PartSize
	if Offset >= Size
		break
	endif
	goto Offset
next

 

 

SWBf.7z

Edited by Sarinan

  • 3 weeks later...
  • Author

No files found with your script

QuickBMS generic files extractor and reimporter 0.12.0
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org
        (Aug 24 2022 - 10:55:28)

                          quickbms.com  Homepage
                            zenhax.com  ZenHAX Forum
                     @zenhax @quickbms  Twitter & Scripts

- open input file C:\Games\Star Wars Battlefront\GameData\Data\_LVL_PC\BES\bes1.lvl
- open script Z:\Software\Games\Modding Tools\QuickBMS\Scripts\lvl.bms
- set output folder C:\Users\LeoP2P\Desktop\SWBFExtract

  offset   filesize   filename
--------------------------------------

- 0 files found in 0 seconds
  coverage file 0     0%   1408       20698736   . offset 013bd630

Press ENTER or close the window to quit


 

Edited by leop2p

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.