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.39.11.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.
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, since the binaries can be huge in size, cannot easily be edited, and one mistake will prevent the game from starting. The sole purpose of DDAE is to make the transition between the binaries and actual asset files easier.
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 are written in JSON format, and can be opened using a text editor. Mod files can have the extension .ddae. 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
Creating a default mod file
Before diving any further into DDAE, it is recommended to set up a default mod file. This is a one-time process which will make things a lot easier in the future. The idea is that you extract all the original assets to a local folder, so that you can use these when creating a new mod. Devil Daggers has many assets, so this saves a lot of work since you would usually only replace some of the assets when creating a mod.
In this example we will set up a default mod file. Let's go through it step by step:
- First, we need to make sure a setting is enabled. Go to "Options > Settings", and make sure the setting "Automatically create mod file when extracting binaries" under the heading "Extracting binaries" is enabled.
- We also need to make sure that your Devil Daggers root folder is correct. In the same settings window, make sure "Devil Daggers root folder" is set 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.
- We're all set now. Click on "File > Extract binaries".
- A new window will appear, and if our settings are 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 your default assets to be extracted to.
- Click on the "Extract binaries" buttons. This will create the asset files in the assets output directory.
- Now, because we enabled the setting in step 1, there should be a mod file in the same folder you selected in the previous step. Open this mod file by going go "File > Open mod" and selecting the .ddae file. This will open the files in the editor.
Making your own mod
Step 1: Modifying assets
- Since we opened the default mod file in the previous step, you will see the location for every default asset file in the list of assets. You can select the assets to preview them. To use your own custom assets, change one or more paths by clicking the "Browse" button on the right.
- 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.
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.
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. Now we will create the binary. Go to "File > Make binaries" to do so.
- A new window will appear. If your settings are correct, the paths should automatically be set to the right files. If they're not, set them by clicking the "Browse" buttons and choosing the correct file.
- Before we click the "Make binaries" button, note that it is recommended to save a back-up of the original files so you can easily go back to the originals without having to re-install Devil Daggers.
- When you've done that, click "Make binaries".
- Launch Devil Daggers to see if it's working. If it does not, a list of common known causes can be found under Crashes.
- 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 might not have specified all assets. Devil Daggers will crash if it tries to load an unspecified asset. Make sure all used assets are specified. It is possible to specify an empty asset, such as an empty model, or empty audio file, if you don't want to make use of these assets.
- 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
- PCM format (32-bit or 16-bit shouldn't matter, but 32-bit is known to work)
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. I am not sure if anyone has looked into this, but you can probably make transparency work using modified shaders.
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.
- The "polarity" audio files are known to crash the game when modified.
- The Devil Daggers title screen music seems to start playing at some hardcoded offset.