The madness of the Blood music pack
After creating a few music packs for XCOM 2, I started to go a little crazy. The standard Music Modding System uses the Unreal Engine 3 (UE3) sound cue system. This system has a number of limitations, which are the reason game developers usually adopt a middleware solution such as Audiokinetic Wwise (the system used for XCOM 2’s native music and other sounds).
Among the issues with the UE3 system is the semi-flexible flowchart system used to compose music segments. It does not support recursion, nor does it have a direct way to play one segment followed immediately by another. It works ok (not great) for simple cases such as a music tracks that play an intro section and then an infinitely looping section. All other MMS music packs that I am aware of stick to that level of complexity.
The following image is an example of what that standard pattern looks like:
Note how even this simple case requires a workaround with 5 nodes…and I wanted a lot more.
Pushing the limits
The Blood soundtrack contains a lot of ambience and recurring themes. When I started editing it for my Blood Music Pack, I realized that it could be broken up into smaller pieces which could overlap or interact in interesting ways.
In the end, each sound cue became a unique monster of hacks to get the lopping and randomization behavior I wanted. One example was my implementation of the track Father Time.
The original track sounds like this:
What I came up with was three segments which are selected at random, with each pairing of segments having a unique transition. So if we played segment A, then randomly selected segment B, the special segment A→B would play in-between
The following image shows what that looks like in the sound cue editor:
Most of the eight tracks in the Blood Music Pack have a similarly complex flowchart.
That wasn’t the only challenge either; The UE3 sound cue system is nowhere near sample perfect. In fact, I have seen music segments start anywhere up to a full second early or late. Thus, each segment had to be carefully edited so that it would still sound good no matter when the next segment started.
The Result
I pushed this system much farther than it was ever intended to go, and in the process created something I am very proud of. No other XCOM 2 music pack that I have encountered evolves and flows the way this one does.
On the other hand, I didn’t want to do that again. For my next project, I developed a new music modding system called Wwise Mms.
Using Wwise Mms, the flowchart above is simplified to this: