Borderlands: Music and Level Streaming - Part 2

Adding Music To Maps

This tutorial assumes a minor-moderate functional use of the editor and tools and does not cover tasks not specifically related to the subject.

Music in custom maps for Borderlands. Perhaps you've heard about it, the whole "it's impossible" thing. I hate to break it to you but this is the internet after all and while it has it's moments, it's not always right.

Marcus' Myth-Bus (ted)

Music in custom maps has apparently long been a roadblock in the mod community and dismissed as "impossible", even going so far to cite official DLC such as Mad Moxxi for straying from the standard ambient to combat dynamic music switching system present in the base game. This though is incredibly shortsighted as several other official DLC (Ned, Knoxx, Claptrap), released both before and after Moxxi all use the standard approach. The music change or specifically how it was used in Moxxi was simply a matter of artistic design. The formula didn't just suddenly break or Gearbox couldn't find another wizard to magic their game up. This is just code run on computers and as often the case, a logical explanation lies behind it.

Getting Down To It

Adding music is a pretty straight-forward process, at least in the logical "there's a reason it doesn't work" kind of way. In Unreal Engine 3, or at least UDK and the UE3 games that have editors, setting up music is a somewhat complex process in contrast to simply writing the filename into a value somewhere in the map. Needless to say there are going to be several steps, both on this page and the next.

Before we go adding music to our map we'll need a couple things. The map. The music. It's obvious but some people need to hear it. The map I'm referring to is what we'll call the persistent map. This is the regular map you would load up if you were playing it. This map should at least be in a decent state of progress, if not finished. The music could be any of the base songs from Borderlands (in \borderlands\WillowGame\CookedPC\Packages\Audio\Music.upk) or custom music you may have made from the previous tutorial .

Once we have these things together go ahead and load your map in BLEd (yes, I'm going to keep calling it that). In the Generic Browser load the music package you'd like to use and pick out an appropriate combat song. From the main file menu, click View and select World Properties. At the top of this window is a section called "Combat Music". Click on that to expand it and then click on the "CombatMusic" value below to activate the buttons over to the right. With the SoundCue of the combat song you'd like to use highlighted (click on it) in the generic browser, click on the green left arrow next to "CombatMusic" to add this song to your map. Save the map, that's all for now.

 

How Deep Does This Go?

Create a new map, additive preferably. Near the edge of the grid, somewhere that would probably be out of the way or outside of your map if you were to copy this one onto it, add a cube (standard 256, not too important). This is being done simply so this can be identified properly as a map to the game. Over in the Generic Browser, click on the Actor Classes tab. Scroll down to and expand Info and then click on to highlight AudioBSPVolumeManager. After that, right-click in the middle of the grid (map) and add an AudioBSPVolumeManager. Once that's been added to the map, double-click it to open the properties window. Expand the AudioBSPVolumeManger section by clicking on it and verify that bManageLevelMusic is checked (if not, check it). Close the properties window and then open the Kismet editor. We're going to be adding one function to play music when the level loads. Copy the following text into Kismet (ctrl+C text, ctrl+P Kismet).

Begin Object Class=SeqEvent_LevelLoaded Name=SeqEvent_LevelLoaded_0
   MaxWidth=172
   OutputLinks(0)=(Links=((LinkedOp=WillowSeqAct_EnableCombatMusicLogic'WillowSeqAct_EnableCombatMusicLogic_0'),(LinkedOp=SeqAct_PlayMusicTrack'SeqAct_PlayMusicTrack_0')),DrawY=2050)
   ObjInstanceVersion=1
   ParentSequence=Sequence'Main_Sequence'
   ObjPosX=2112
   ObjPosY=1984
   DrawWidth=106
   DrawHeight=89
   Name="SeqEvent_LevelLoaded_0"
   ObjectArchetype=SeqEvent_LevelLoaded'Engine.Default__SeqEvent_LevelLoaded'
End Object
Begin Object Class=WillowSeqAct_EnableCombatMusicLogic Name=WillowSeqAct_EnableCombatMusicLogic_0
   InputLinks(0)=(DrawY=1954)
   OutputLinks(0)=(DrawY=1954)
   VariableLinks(0)=(DrawX=2472)
   ObjInstanceVersion=1
   ParentSequence=Sequence'Main_Sequence'
   ObjPosX=2384
   ObjPosY=1920
   DrawWidth=176
   DrawHeight=61
   Name="WillowSeqAct_EnableCombatMusicLogic_0"
   ObjectArchetype=WillowSeqAct_EnableCombatMusicLogic'WillowGame.Default__WillowSeqAct_EnableCombatMusicLogic'
End Object
Begin Object Class=SeqAct_PlayMusicTrack Name=SeqAct_PlayMusicTrack_0
   MusicTrack=(TheSoundCue=SoundCue'Music.Music.Crack_of_Eon_V2_jkCue',FadeInVolumeLevel=0.600000)
   InputLinks(0)=(DrawY=2114)
   OutputLinks(0)=(DrawY=2114)
   ObjInstanceVersion=1
   ParentSequence=Sequence'Main_Sequence'
   ObjPosX=2408
   ObjPosY=2080
   DrawWidth=121
   DrawHeight=45
   Name="SeqAct_PlayMusicTrack_0"
   ObjectArchetype=SeqAct_PlayMusicTrack'Engine.Default__SeqAct_PlayMusicTrack'
End Object

 

Let's leave the Kismet window in the background and move over to the Generic Browser. Load the music package and highlight (click on) the SoundCue for the ambient music you would like to use. Back into the Kismet browser, click on the "Play Music Track" node to display the properties below. Expand MusicTrack and then click on TheSoundCue to enable several buttons to the right. After that click on the green plus sign to add the ambient music to the map. Go ahead and close Kismet and from the Build menu select Build All. You may have already guessed but we are making an audio map to use with our persistent map. This will be arranged with the use of level streaming. After building has completed save the map, preferably with a similar filename as your persistent map using "Audio" at the end. Both maps have been setup to use music now but will not function until streaming has been setup.
Move on to the next section.

Previous | Next