Capturing the ambience of Star Wars: Battlefront II (2005)
This guide explains how to combine PC visuals and PS2 audio.
Extracting sounds
Existing community efforts
I was unable to find a perfect solution for extracting per-LVL streams (e.g. data_lvl_pc\sound\cor.lvl) on PC. There is a tool that endeavors to do so, but I found very mixed results with it. I found someone's in-game recordings of each ambient stream, but this didn't include all assets and I noticed some assets weren't recorded at their full length.
A modder going by "BAD-AL" is the most knowledgeable about this, still working periodically on stream extraction. You can run his fork of the tool yourself (tricky) or download the results of that work here. I found some of the streams had the wrong frequency compared to in-game, don't loop perfectly out of the box, and exhibit some noise. Nonetheless, these outputs will serve as a great reference point for validating our own rips.
There's a bunch of information about how sounds work in the game's primary modding community, including a guide to custom ambient sounds. There's a tool which decomplies ("unmunge"s) LVLs but this doesn't support audio.
My solution: vgmstream
I ended up giving up on decoding PC's streams, and running the PS2 version's LVLs through vgmstream instead. We'll tell vgmstream to interpret the entire LVL binary as an audio stream, and then select the actual audio data we want in an editor program e.g. Audacity.
This strategy is complicated by the fact that our TXTH file still needs an accurate interleave value, however. Some experimentation in MFAudio, In Cube and PSSound led to 16384, aka 0x4000 at the correct value. From here you can empirically guess-and-check num_sample values.
Set start_offset to 2048. I used ADPCM Ripper V1 and V2 as a starting point to help me determine this, and empirically tweaked it until the results sounded error-free.
Here's my Utapau TXTH for example:
codec = PSX
interleave = 16384
channels = 2
sample_rate = 42500
start_offset = 2048
num_samples = 7931676
Stream sample rates
When using in-game recordings as reference I found, inexplicably, that each stream ran at a different speed rather than standard sample rates e.g. 44100 and 48000. I was therefore only able to determine these values empirically, i.e. by recording about ~3mins of audio from desired map areas.
Environmental sound effects
In addition to streams, each LVL contains the environmental sound effects for its map. For convenience I recommend just using one of the community downloads above for these, although I supposed they could be extracted one-by-one using the vgmstream method.
Appendix 1: Extracting individual MIB files
VGMToolbox, with it's brute force PS2 stream ripper tool, is capable of plucking individual MIB streams out of LVL archives. However, these are apparently headerless as they lack frequency and interleave information, so we still need to provide a TXTH to inform vgmstream's decoding.
Also, frustratingly, these MIBs always seem to lack the last sample in their right channel. I guessed that this was a symptom of an improper interleave_last value in my TXTH, but this setting didn't seem to make a difference.
Appendix 2: Dolby Pro Logic streams and front/back stereo pairs
My understanding of Pro Logic is limited - it seems to offer simulated or compact surround sound in an asset that's the size of a traditional stereo stream? Each PS2 LVL should contain one of these per stream.
Streams are quadrophonic on other platforms, i.e. they come in pairs of front/back stereo assets.
Capturing footage
Installing Mod Tools
The community has applied some fixes to BF2's official mod tools such that they work on newer operating systems. You can find those fixes yourself (vistamunge, "No DVD" EXE) or download an all-in-one package with these fixes pre-applied. Install its files into your GameData directory.
Hiding the HUD
By launching BF2_modtools_NoDVD.exe you'll have a version of the game with a developer console. Press ~ to activate. You'll find lots of commands and options here, but for the purposes of this guide we're interested in debugmenu.ToggleDisplay or Interface.Enable to disable the HUD. SetFov changes the field of vision.
(Not) entering cheats
Supposedly you can also disable the HUD via the "usetheforceluke" cheat during mission select. Before typing, park your cursor near the position below, and press Enter to submit. However, this didn't work for me - it may have been patched out at some point.
Free Camera mode
The developer version of the BF2 also has additional pause menu options. We can activate Free Camera mode, or bring up the "Fake Console" which is essentially a GUI for common commands. While in Free Camera, the game will pause by default, but you can toggle this with the M or Backspace key. Press WASD to directionally, and HOME and END to move vertically.
There are additional commands inside the console that you can choose to engage, depending on your preferences. For example Blur.Enable.
To disable AI spawning, set AI Units Per Team to 0. This setting is respected by most game modes.
Full-screen captures
You'll notice, however, that BF2_modtools launches itself into a small window and seemingly cannot toggle fullscreen. There are probably third-party programs to force the application into fullscreen; I didn't explore this. Luckily the community has made an EXE that launches to fullscreen.
Additional mods and projects
The unofficial "1.3" patch is considered the definitive way to play the game on PC, especially for multiplayer. It introduces the Mod Tools' developer features to your installed game in addition to expanding BF2's base capabilities.
The PC conversion of BF2 has some issues not found on Xbox/PS2. There are community mods to address some of these issues.
The Xbox version of BF2 got some exclusive DLC; the community has worked to port this to PC.
BFBuilder, Pandemic Studio's map editor. There is also WorldEdit, a community-made BF2 map editor.
Phoenix, a re-implementation of SWBF2 in Unity3D.
2 notes
·
View notes