Deathtrap Dungeon

Deathtrap Dungeon

40 ratings
How to fix the same music playing in every level
By TheOddsBodkins
This guide shows you how to fix the problem with the same music track playing in every level.
3
   
Award
Favorite
Favorited
Unfavorite
Introduction
You may have noticed that the same background music plays in every level of the game, despite of the game having several different music tracks in the game files. Steam version of Deathtrap Dungeon uses a patch for the game that makes the game play the background music from MP3 files instead of playing the music from the original game CD. However, this patch is bugged in a way that causes the game to play the same music track every time.

Steam version of the game is based on older version from GOG.com that had the same issue with the music. The GOG version have since been updated with a patch that fixes this issue.

This guide will show you how to install the updated patch that the GOG version uses to the Steam version of the game.
Patching The Game With The Patch Installation Package
I have prepared an automated patch installation package that will copy the patch files to right places and re-encodes the music files from MP3 to OGG (using lame and oggenc) that is required for the patch to work.
  1. Download the automated patch installation package from this link[drive.google.com]

  2. Extract the DDMusicPatchInstall.zip package somewhere on your local hard drive. E.g. C:\DDMusicPatchInstall

  3. Run the MusicPatchInstall.bat file, and if the default install path is set correctly, it should ask you to confirm the patch install and then confirm the re-encoding of the MP3 files.

    If Deathtrap Dungeon install path is not set correctly, right-click on MusicPatchInstall.bat file and select "Edit", in the file you need to set the correct path to Deathtrap Dungeon install directory and then save the file and run MusicPatchInstall.bat again.

    The line you need to change:
    set dungeonpath=C:\Program Files (x86)\Steam\steamapps\common\Deathtrap Dungeon

  4. You can now delete the folder where you extracted the installation package, play the game and you should have different music playing in different levels of the game. :)

To uninstall the patch simply run MusicPatchInstall.bat again and it will prompt you to uninstall previously installed patch.
Patching The Game Manually
If you want to do it the hard way, you can build the No-CD music patch from the source code. Instead of doing that, I recommend that you download the automated patch installer for the patch files, or if you have access to the GOG version, copy the files from the GOG installation of the game. You will also need a program that can re-encode MP3 files to OGG.

The No-CD music patch is called ogg-winmm[github.com] and you can download pre-built binaries or the source code from GitHub. There are multiple forks of this project and the exact version that GOG uses is not known. To compile the source code yourself, you will also need Ogg Vorbis libraries[xiph.org] that ogg-winmm patch uses to playback the music.

The automated patch installer uses lame[lame.sourceforge.io] and oggenc[xiph.org] to re-encode the MP3 files, but any program that can re-encode MP3 files to OGG files should work just fine. In these steps we will use FFmpeg[ffmpeg.org]

Direct Download links:

Step 1: Disable the faulty patch and copy new patch files
  1. Locate the Deathtrap Dungeon install directory ("C:\Program Files\Steam\steamapps\common\Deathtrap Dungeon" by default)

  2. Find a file called mss32.dll in that directory and rename it to mss32.dll.bak

  3. Copy the new patch files libogg.dll, libvorbis.dll, libvorbisfile.dll, MSS32.DLL and win32.dll from the automated patch installer package, or the same files from the GOG installation of the game, to the Deathtrap Dungeon install directory.

    If you compiled the patch yourself, you get MSS32.DLL by using the mss32gog.dll file in the Deathtrap Dungeon installation directory. You may also need to rename your patch file to win32.dll and hex edit the MSS32.DLL file by replacing references to "winmm.dll" with "win32.dll", otherwise the game may crash on some systems.

Step 2: Re-encode the music track
This step is unfortunately required because the patch we are using uses OGG files instead of MP3 files, so we need to re-encode the files.
  1. Extract the FFmpeg package somewhere on your local hard drive. E.g. C:\FFmpeg

  2. Create a new folder called Music in the Deathtrap Dungeon installation directory.

  3. Run FFmpeg with the following command to re-encode each of the MP3 files to OGG files.

    In the command replace <dungeonpath> with path to Deathtrap Dungeon install directory and <ffmpegexe> with path to FFmpeg executable.

    <ffmpegexe> -i "<dungeonpath>\Sounds\0.mp3" -acodec libvorbis -aq 8 "<dungeonpath>\Music\Track02.ogg"

    Notice the file numbering offset (0.mp3 = Track02.ogg, 1.mp3 = Track03.ogg, ...)

    After re-encoding all the files, make sure that you got 15 .ogg files numbered from 02 to 16 in the Music folder.
You can now play the game, and if you have everything set up correctly, you should have different music playing in different levels of the game. :)
Patching The Game by Buying the GOG Version
Buy Deathtrap Dungeon from GOG.com and get the game with a working music patch and with music that is encoded in higher quality as a bonus.

GOG store page:
https://www.gog.com/game/deathtrap_dungeon
25 Comments
Photon Trooper 4 Apr @ 6:28pm 
Thanks for confirming it :) I did a total removal of DD from my pc since I noticed that the NETONLY.EXE also did not work and I believe that this .exe might help me with that. I see that I can use netonly now so maybe a clean reinstall is all that I need. Anyway, thanks a lot for helping us with the music of DD!
TheOddsBodkins  [author] 2 Apr @ 5:41am 
It's been a while, but I remember multiplayer having music. I don't know why it doesn't work for you.
Photon Trooper 29 Mar @ 5:20pm 
Needless to say, this guide is one of my favorites in Steam, very well done. Me and a friend made the Multiplayer work on Hamachi (I looked for someone to play it for years), and the game improves so much when going deathmatch, everyone should try... But to my surprise, there is no music in Multiplayer! Any idea if when you worked for the music patch, you spotted something related to music for multiplayer matches? I never played multiplayer before today so I have no idea if LAN multiplayer had any music at all.
Pierce Dalton 22 Mar @ 12:40am 
Ironically, the game is better but cheaper on GOG. Thanks.
Supreme Leader of Autism 30 Jan, 2024 @ 11:13am 
Thanks for boosting my merories a step further, much appreciated
TheOddsBodkins  [author] 27 Nov, 2022 @ 12:10am 
Track 16 is just a very short track with silence and I doubt if it is actually used for anything in the game. The latest GOG version doesn't include it either, so I don't think it's necessary.
Photon Trooper 26 Nov, 2022 @ 8:56pm 
Hey, one thing: Is Track 16 bugged? I can't play it on Groove Music like any other .ogg file... The rest of the tracks are listenable when I click on it, tough.
Photon Trooper 26 Nov, 2022 @ 8:53pm 
Super! I did it and worked fine! Thanks a lot!
TheOddsBodkins  [author] 24 Oct, 2022 @ 1:10am 
The host I was using to share the patch file has shut down. I'm temporarily sharing the file through my google drive.
SamuraiWesley 1 Feb, 2022 @ 7:43pm 
Great guide