Home - doofus9341/Spel2-FMOD-Template GitHub Wiki
Overview
Spelunky 2 uses FMOD Studio version 2.02.03 as its sound effects engine. Using FMOD Studio instead of the lower level API allows you to use real-time audio effects, control signal chains, and automatically applies vanilla audio effects to music and sound such as automatic fading, smooth music transitions (e.g. when entering a shop), and audio filters (e.g. entering the backlayer, inside pipes, or when paused). Additionally larger mods may potentially benefit from shorter loading times, since FMOD banks load faster than individual audio files.
Setup
- Download FMOD Studio 2.02.03 from the official FMOD website (account required).
- Download Spel2-FMOD-Template.
Creating a simple event
- In the Spel2-FMOD-Template is a folder called spelunky2-mods. This is a blank template project that contains all of the necessary mixer content such as Group Buses and Return Buses that allow you to route audio into Spelunky 2's mixer.
- Open spelunky2-mods.fspro in FMOD Studio.
- In the Banks tab of the event editor, right click and create a new bank. Name it something such as MyMod or MyMod_Music. This is important since it is where you will assign the events that you will create next.
- Go back to the Events tab of the event editor. Right click, select New event and give it a name.
- The event you created is currently
#unassigned
and will not be built with your Bank. To assign it to a Bank, right click the event, select Assign to Bank and browse to the Bank you created earlier. - Now that the event has been assigned to a bank, you can create the event. Select the event you created, and in the events tab click click to add a sheet. For this simple event, choose Add Timeline Sheet.
- In the Timeline sheet, right click the Master audio track and select Add Audio Track.
- Drag an audio file onto the audio track, once it appears, you can select the Logic Tracks section above the asset and select Add Loop Region. Resize the loop region so that the audio loops correctly.
- Select the Master track. Before the Fader, right click and select Add Send > To Mixer > Master_SUM > Master_BGM > BGM_submaster > BGM_front > bgm_normal.
- Next to the Send, turn the volume on the Fader all the way down until it displays -∞ dB. This stops the event from outputting audio to the Master Bus, or Group Bus it resides in which prevents duplicate audio signals. Sends like their name suggests send a duplicate audio signal from their point in the signal chain of a track to a return track, or in this case a return bus.
- Turn up the volume on the Send you created on the Master track to something reasonable such as -5.00 dB.
Building the Bank
- You're not done quite yet, you need to build the Bank in order for FMOD to be able to use it. Make sure to save the project first.
- Select File > Build.
- You will need to get the GUID of your event which is necessary to play it in-game. There are two methods to get the GUID of your event.
- Right click the event, select Copy GUID
- Select File > Export GUIDs... which will export all of the GUIDs of events in your project into a text file.