Dynamic Music in DXVetery

One of the main reasons we wanted to do DXVetery was to test out our approach to dynamic music in a Deus Ex based Mod. To achieve this, we decided not to use the default music system of the Unreal Engine, but to implement our own, based on the libmodplug library by Oliver Lapicque.

The Music of Deus Ex

Deus Ex comes with dynamic music that changes according to the gameplay: Per map, there is general music for normal gameplay, for combat situations, for when death strikes, for outro sequences and for conversations.

These five parts make up the music for one map. Transitions from one piece of music to another happen by fading one out, then fading another one in. The five compositions for a map share one thing in common: They are similarily orchestrated; they share a common set of instruments, or "samples" in ImpulseTracker terms. Also, the five compositions for each map are done in a similar style, so they nicely fit together.

This is an intriguing constellation. But it doesn't end there: The map music very intensely sets the "mood" for ongoing gameplay. I have the theory that especially the conversations music is heavily influenced by what might be called a map's or mission's "main conversation". By "main conversation" I mean a conversation the player character JC Denton has that is central to the game's storyline.

One impressive example of this can be witnessed in "Mission 3" of Deus Ex, the mission where you have to trace the NSF's flight route from Battery Park to LaGuardia Airport. My theory is that the conversation music of LaGuardia was composed to fit exactly the Paul Denton conversation. Meeting Paul Denton in that mission is a critical turning point in the story: You find out that your own brother has been a double agent, betraying the organization you dreamt of working for when you were a little child, and now actually work for. Paul -- an agent working for the NSF, people you believe to be terrorists at that stage of gameplay!

This has interesting implications. Because the conversation music's mood fits so very nicely for what we might call the central conversation of a map or mission, conversations before that "central" one already "hint" at what is going to happen.

The DXVetery Approach

For DXVetery, we went a step further and tied the music even closer to the current gameplay. To do so, we first needed to decide on a system that would be flexible enough to our needs. We decided to use the same file format the original Deus Ex game uses: The ImpulseTracker music sequencer format. To have greater control on how our impulse tracker sequences are played back, we used and modified Oliver Lapique's libmodplug library and created a plugin to control playback directly from the Deus Ex/Unreal engine.

The idea behind DXVetery's dynamic music is to directly comment on in-game actions musically, describing how JC Denton feels in certain situations. For example, take a very lonely prison from which you have to escape. To do so, you can hack control panels and pick doors. Every time you pick a door, you get a step further to your goal of escaping and thus returning into a more populated and living world. Now take the same prison, but imagine that your primary enemy is not loneliness but time: You have to escape quickly to be able to defuse a bomb. Same prison, different "mood". By reflecting these facts musically, it is our theory, gameplay can become more intense. We currently take various actions into account; try for yourself!

And if you are into modding, feel free to use our plugin, which is made up of four files: ModPlug.u, ModPlug.dll, libmodplug.dll and bzlib.dll. The source code for this will be published at some point, too. If you know how to use UnrealEd, it is easily possible to use our modplug plugin to play the original Deus Ex game with the DXVetery music. Have a look at the ModPlug and ModMusicManager classes in ModPlug.u!

DXVetery Music Format

Just like the original, we use the ImpulseTracker format. Some high-quality samples are used in the music files, hence their size (between 20 to 40 MB per file). Most of the files are encrypted unfortunately. We had to do this because some of the samples used we may not distribute independently of the music created with them. The encryption was done to comply with that regulation.

If you've got questions or answers, feel free to contact us via e-mail or irc chat!

Leave a comment

(Note: Comments are moderated)