A dll that adds custom audio support for Scrap Mechanic mods
There are 2 ways to enable the CustomAudioExtension module:
SM-DLL-Injector
- Download the latest release of SM-DLL-Injector and follow the instructions listed in the README file
- Download the latest release of the
CustomAudioExtension.dll
here - Move the
CustomAudioExtension.dll
toSteam/steamapps/common/Scrap Mechanic/Release/DLLModules
directory created by SM-DLL-Injector installer - Launch the game
Manual Injection
- Download the latest release of the
CustomAudioExtension.dll
here - Launch the game
- Inject
CustomAudioExtension.dll
by using a DLL Injector of your choice
- Create
sm_cae_config.json
in the root directory of your mod. - An example of how
sm_cae_config.json
structure should look like:
{
//Make the names more unique to avoid name collisions with other mods
"soundList": {
//You can reference the same sound multiple times, but configure it differently
"ExampleSoundName": {
"path": "$CONTENT_DATA/Effects/Audio/example_sound.mp3",
"is3D": true,
"reverb": "MOUNTAINS", //Reverb is optional, possible parameters: GENERIC, MOUNTAINS, CAVE, UNDERWATER
},
"ExampleSoundName2": {
"path": "$CONTENT_DATA/Effects/Audio/example_sound.mp3",
"is3D": false
}
}
}
- The names specified in
sm_cae_config.json
can then be used in effects!
"ExampleEffect": {
"parameterList": {
"CAE_Volume": 1.0, //1.0 - max volume
"CAE_Pitch": 1.0, //1.0 - normal pitch
"CAE_Reverb": 1.0, //1.0 - max reverb
"CAE_ReverbIdx": -1.0,
"CAE_Position": 0.0 //Measured in seconds
},
"effectList": [
{
"type": "audio",
"name": "ExampleSoundName",
"parameters": [ "CAE_Volume", "CAE_Pitch", "CAE_Reverb", "CAE_ReverbIdx", "CAE_Position" ]
}
]
}
- If you want to add CustomAudioExtension specific effects you can use the
sm.cae_injected
flag to check if the CAE is present