Modding: Audio
Fundamentals |
---|
Basics • Data.wak • Getting started • Lua Scripting • Useful Tools |
Guides |
Audio • Enemies • Environments (Fog of War) • Image Emitters • Materials • Perks • Spells • Steam Workshop • Spritesheets • Using CMake |
Components/Entities |
Component Documentation • Enums • List of all tags • Special Tags |
Lua Scripting |
Lua API • Utility Scripts |
Other Information |
Enemy Information Table • Magic Numbers • Sound Events • Spell IDs • Perk IDs • Material IDs |
This page explains how to: Extract the default audio files; how to Replace the default audio files with your own sounds; and how to Add additional custom audio files.
Extracting existing audio
The .wav
audio files are compressed in 20+ .bank
files within the folder Steam\steamapps\common\Noita\data\audio\Desktop\
.
- Download & extract "Fmod bank tools.zip" (discord link)
- Find any bank you'd like to extract (e.g.
event_cues.bank
) and copy paste it into the bank folder of the zip you extracted. - Run the
Fmod Bank Tools.exe
and set yourBank Source Folder
to the path of the bank folder (full path,C:/.../bank
) and theWav Destination Folder
to the path of the wav folder (full path again). Both of these folders should be in the extracted zip folder. - Click the Extract button in the tool to get all of the audio files in the bank.
- Now you can create music using the game sounds!
Replacing existing audio
There are two methods of doing so:
- By replacing the *.wav files inside the *.bank files using the Fmod bank tools and (temporarily while your mod is loaded) overwriting the original *.bank file by placing your modified one in the same path as the one you want to replace, for instance
mods/yourmod/data/audio/Desktop/animals.bank
. This method has two drawbacks, first of all it will not allow you to change the length of the sound event, which means if the original sound is 1 second long and yours is 3 seconds, your audio will cut off after 1 second and additionally any effects that the original sound has will also be applied to yours. And second of all, it is not compatible with other mods who want to replace sounds from the same bank file, since only one mod can overwrite the file at a time.- To do this anyway, follow the steps on how to extract existing audio, then replace any .wav files you want, edit the
bankname.txt
in the wav folder to have the correct names of your sounds and then in theFmod Bank Tools.exe
click Rebuild. If you get any errors, you can simply Ok through them until its finished. - Get in-game and test (keep in mind this is mainly for replacing rather than adding, as you can do that with FMOD Studio instead with much more features).
- NOTE: Because this replaces the bank, you cannot have multiple sound replacing mods!
- To do this anyway, follow the steps on how to extract existing audio, then replace any .wav files you want, edit the
- By tricking the game into using your sound event instead of the original one. This can be done by creating your own *.bank file and replacing your sound's GUIDs inside your *.bank file with the ones of the sounds you want to replace. GUIDs of the original sounds can be found here: https://noita.wiki.gg/wiki/Modding:_List_of_Sounds. For this method, create your own sounds and one extra sound, which you could call
dummy_sound
. Then build your *.bank file and export GUIDs.txt, open it and note the GUIDs of your sounds events. Then use https://github.com/TheHorscht/FmodBankGUIDReplacer to replace the GUIDs inside your *.bank file with the ones of the sounds you want to replace (don't replace the GUID of your dummy sound though!). After that, place your *.bank file in your mod folder and in yourinit.lua
callGamePlaySound("mods/your_mod/audio/your_audio.bank", "dummy_sound", 0, 0)
. This has to run before the sound plays that you want replaced. If you have done everything correctly, the sounds should now be replaced.
Example for how to use the replacer tool of the second method: Let's say you have these in your GUIDs.txt:
... other stuff
{f7bc4133-a97d-487e-a7a9-b28303f90ffb} event:/boop
{c7d655d8-ec85-4d25-bc91-cf2cca64fbb7} event:/dummy_sound
... more stuff
and you want to replace the sound that plays after a short while when you die, event_cues/game_over_stats/create
, which has the GUID {3c831728-2d37-4b80-bc78-b4d069164ebc}
.
You would use the FmodBankGUIDReplacer tool like this:
guid_replacer.exe your_audio.bank {f7bc4133-a97d-487e-a7a9-b28303f90ffb} {3c831728-2d37-4b80-bc78-b4d069164ebc}
Do not replace the GUID of your dummy sound!
Creating custom audio for Noita
Noita uses FMOD Studio as its sound effects engine, using version 2.01.05. The basic principle is defining FMOD "bank" files consisting of all the sound effects and attaching individual events for each sound. These events are then referenced in the XML / Lua, which play the correct sound effect.
Check out the following directories to get started:
Noita/tools_modding/noita-fmod-project/
Noita/mods/example/
Setup
- Make sure you have the noita-fmod-project folder in your Noita directory.
- Install FMOD Studio version 2.01.05 from the official FMOD website.
FMOD
- Open noita-mods.fspro in FMOD Studio, you should see an snd_mod folder which contains an example
create
event. In Noita, there are many different events, but for now, keep in mindcreate
andloop
, as those are the most common. - Clicking the
create
event in snd_mod will show you the example soundworm_attack_bite_01
which is in Async mode, has Randomization Automation for its pitch, and has Distance and lowpass parameters which can allow for effects in-game such as volume fading. - Noita also has many Routing Groups which add effects to your audio such as reverb and equalization, to access these you'll need to go to the
Window
options and thenMixer
, where you can move your sounds into their respective groups, such asgame_sfx
which housessnd_mod/create
, this group is what you'll likely use the most. - Once you've decided to make a sound in an event, you'll need to add it to a Bank so that Noita can use it as part of its assets. To do this, simply right click the event, go to
Assign to Bank
and click the bank you're going to use (preferably something besides Master Bank). - After all of the above, you can finally Build your FMOD project by going to
File
options and doingBuild
. - We're not done yet, as Noita still doesn't know how to access the events in your bank, so you'll need to go back to
File
options, and then toExport GUIDs
. This will be what you load in your init.lua script so that Noita has the references to your bank's sounds.
Noita
- Go into
noita-fmod-project/Build
and copy and paste the GUIDs.txt into your mod's directory. - Go into
noita-fmod-project/Build/Desktop
and copy and paste thebankname
.bank file (ignore Master Bank) you created in FMOD into your mod's directory. - Open your mod's init.lua file and add with the path to your GUIDs.txt file.
ModRegisterAudioEventMappings("mods/modname/directory/to/GUIDs.txt")
- Open any xml files which you want to add your sounds to and add the respective
AudioComponent
orAudioLoopComponent
depending on the type of event you created in FMOD. An exampleAudioComponent
for a projectile might look like this:<AudioComponent file="mods/modname/directory/to/bankname.snd" <!-- .bank is replaced with .snd --> event_root="foldername/eventname" <!-- in fmod you created an event *folder* which had either a *create* or *loop* event --> set_latest_event_position="1" ></AudioComponent>
- Get in-game and experience success!
List of all default sound effects
See: Modding: List of Sounds (Currently incomplete)