Custom Music

D2X-XL can play user supplied music in the menus and levels of the game. MP3 and OGG/Vorbis music formats are supported. To supply a menu song, specify the full path to it in d2x.ini with the '-introsong' switch. To supply level songs, specify a playlist in d2x.ini with the '-playlist' switch. Enable custom music playback by placing

  • -sdl_mixer 1

in d2x.ini.

A playlist is a plain text file specifying a music file per line. Lines not ending with '.mp3' or '.ogg' are simply ignored. The filenames can be given with or without a folder. If the folder is omitted, D2X-XL assumes that the file resides in the same folder as the playlist. When playing a mission, D2X-XL will play one song from the playlist for each level, repeating the song if necessary, and will cycle through the songs from the playlist, starting over with the first if it has reached the end of the list.

The required d2x.ini entries could look something like this:

    -sdl_mixer 1
    -introsong c:\program files\descent 2\music\my intro song.ogg
    -briefingsong c:\program files\descent 2\music\my briefing song.ogg
    -creditsong c:\program files\descent 2\music\my credit song.ogg
    -playlist c:\program files\descent 2\music\my level songs.txt

A song list (e.g. "my level songs.txt") could look like that:

    my level song 1.ogg
    my level song 2.ogg
    my level song 3.ogg
    my level song 4.ogg

D2X-XL would look for these songs in the folder where the song list resides.


MP3


The (open source) mp3 playback library D2X-XL is using is buggy, so using mp3 music in D2X-XL is not recommended and may not work.