This page will guide you through the creation of custom asset mods for Devil Daggers. This guide is aimed at Devil Daggers Asset Editor 0.46.0.0+, and will be inaccurate for any older versions. If you are not running the latest version, it is highly recommended to download the latest version.
There is some basic information that you need to know in order to understand how to create asset mods for Devil Daggers.
Devil Daggers uses custom binary formats to read asset data from asset files. There are 4 of these files that contain assets:
- devildaggers\res\audio contains all audio
- devildaggers\res\dd contains all textures, all models, and most shaders
- devildaggers\core\core contains UI-related shaders
- devildaggers\dd\particle contains all particle effects (not much is known about these now)
Where devildaggers is the installation folder for Devil Daggers. The default location for this folder is C:\Program Files (x86)\Steam\steamapps\common\devildaggers.
All of these files can be modded using Devil Daggers Asset Editor (also known as DDAE). These files are referred to as "binaries" in the application. If you're interested how these files are structured and how DDAE operates with them, I've documented how they work here.
As of the V3.1 update, Devil Daggers allows partial mods. This means that you don't need to create the entire binary anymore, but can make a "partial" binary containing only the modded assets. This is useful because it makes the files much smaller. These partial mods are saved in the devildaggers\mods folder and their file name must be begin with the binary file type they are targetting, for example "dd_blue_gem", or "audio_trumpet_gigapedes". This feature also allows you to stack multiple partial mods and play them at once. The mods are loaded alphabetically, so if you have two partial mods replacing the same assets, the last one will actually replace the asset. For example, if you have two texture mods named "dd_blue_gem" and "dd_yellow_gem", which both change the color of the gem texture, "dd_yellow_gem" will be the effective one.
There are 6 types of assets that Devil Daggers uses:
- Audio (.wav)
- Model bindings (.txt)
- Models (.obj)
- Particles (binary)
- Shaders (.glsl)
- Textures (.png)
The asset editor
I've created Devil Daggers Asset Editor to make it easier to mod the game's assets.
The first thing you will see when you open DDAE is a list of assets. These are all the default assets present in the binaries. Note that there are 7 different tabs at the top:
- dd/Model Bindings
DDAE orders the assets by binary file, and then by asset type. So "dd/Models" will contain all model assets present in the "dd" file.
Since binaries can be huge, DDAE works with mod files, which, instead of holding all the raw asset data, are basically just lists of user-specified asset paths. Mod files have the extension .ddae and are written in JSON format, so they can be opened using a text editor. Note that if you change the locations of assets, it will break the mod file. You can open the mod file using a text editor and globally replace all the paths with the new path to fix it (unless you also renamed the files themselves).
How to create a mod
Extracting the original assets
It is useful to extract the original assets so you know what assets you can mod.
- It is recommended to set the Devil Daggers root folder in the program, so it can locate the files. Go to "Options > Settings" and set "Devil Daggers root folder" to the directory containing "dd.exe". Again, this is C:\Program Files (x86)\Steam\steamapps\common\devildaggers by default. If you're not sure where Devil Daggers is installed, you can launch Devil Daggers and click "Auto-detect" and DDAE will automatically detect the correct directory.
- Now that the settings are correct, we can extract the binaries. Click on "File > Extract binaries".
- A new window will appear, and if the Devil Daggers root folder is correct, there should be 4 paths pointing to all the asset files. If the paths are incorrect, make sure to set them to the correct asset files using the "Browse" buttons.
- Once the paths are correct, click on "Browse", under "Assets output directory", to set the folder where you want the original assets to be extracted to.
- Click on the "Extract binaries" button. This will create the asset files in the assets output directory.
Making your own mod
Step 1: Modifying assets
- Go to "File > New mod" to create a new mod. Select an asset from the lists you wish to mod and click the "Browse" button on the right to replace it with a custom asset.
- In the open file dialog, select a compatible file. There are some requirements for certain assets, such as audio files. These can be found under Compatibility at the bottom of the page. After you've done that, your asset should show up in the lists. Most assets can also be previewed by selecting them.
Step 2: Saving your mod
- Since you may want to work on this mod again, it's a good idea to save it to your computer. Go to "File > Save mod" to do so.
- In the save file dialog, select a folder that will contain your mod files. Give your mod file a name and save it inside the folder. Your mod should now be saved as a .ddae file containing the paths to the assets you specified in the editor.
Note: You can set a default path for mod files in "Options > Settings" for convenience. This is purely optional; this path will be used as default location when opening mod files.
Step 3: Making your mod into a binary to be played in Devil Daggers
- To test your mod, make sure it's opened. If it's not, open it by going to "File > Open mod".
- You will now see all your custom files being listed in the asset editor. To turn these files into a binary, go to "File > Make binaries".
- A new window will appear. Type the name of the mod in the text box under "Mod name". If your settings are correct, the paths should now automatically point to the "mods" folder.
- Click "Make binaries".
- Launch Devil Daggers to see if it starts up correctly. If it does not, a list of common known causes can be found under Crashes.
Note: When you want to test a new version of your mod, you will need to restart Devil Daggers after making the binary again, as they are only loaded when Devil Daggers starts up.
Devil Daggers will crash if there's something wrong with your mod. DDAE should automatically display an error message in some cases, such as when it cannot properly convert your model to the custom binary format Devil Daggers uses for models. However, some causes are uncaught. Here's a list of some other known causes that will cause Devil Daggers to crash:
- You have replaced one of the original files instead of created a new one in the "mods" folder. It is never recommended to modify the original files and it will most likely crash the game on start up.
- There might be something wrong with one of your custom audio asset. Be sure to check if all files are compatible under Compatibility.
- Your custom shader asset might not compile.
- Your particle asset might not be 188 bytes long. Particles have a fixed byte length of 188.
Future versions of DDAE should include more warnings and error messages for these issues.
Only .wav files are supported. The .wav files need to meet the following requirements in order to play correctly:
- 2 channels
- 44.1kHz sample rate
- 16-bit PCM format
You can convert the .wav files to the correct format using software such as Audacity.
Only .png files are supported. The files can be whatever dimension, though having files larger than 512x512 is not recommended since it will make the binary huge. Transparency is supported and used for UI textures, splash screens, etc, but does not work for model textures by default.
Only .obj files are supported. The files can consist of triangles or quads, though NGons are not supported for now. You can create models using software such as Blender.
- Custom "polarity" audio files are known to crash the game after a couple minutes of playing.
- The Devil Daggers title screen music seems to start playing at some hardcoded offset.