Forts
Pas assez d'évaluations
FMOD Modding Guide
Par SamsterBirdies et 1 collaborateur(s)
A guide on setting up your FMOD project and getting your first sound into the game. Has an FAQ section.
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Why use FMOD in Forts?
Using FMOD sound banks will expand your options for controlling the audio in your mods.
Some features include:
  • Limiting the amount of instances of a sound event being played at once, set stealing options for when this limit is reached, and adjust the delay required between instances.
  • Automating effects on sounds based on their parameters. This includes distance, phantoms active ability, underwater depth, and custom parameters that can be controlled with script.lua.
  • Adjust a sound's spatializer. This is can be helpful for making sounds that can only be heard up close like the mine's ambient pickaxe sounds, or ui sounds which have no directional sound.
  • Random sounds for each event trigger to make the sound less repetitive.
  • Random pitch and other effects for sounds.
Installing FMOD
Before continuing, it is recommended that you first understand the basics of Forts modding.
The official guide can be found here.
  1. Navigate to https://fmod.com and create a profile.
  2. Navigate to the downloads page[fmod.com] and select FMOD Studio.
  3. Select the correct version that forts uses. At the time of writing this guide it is 2.02.09. Forts will occasionally update the fmod version. You can check the version by opening the game files, right clicking on fmodstudio.dll then properties > details > product version.
  4. Choose the correct download option for your operating system.
Setting up your project
Use the Forts FMOD template.
  1. You will find a download in the Forts Official Discord[discord.gg]. It is in the pinned messages for the Sound thread[discord.com] in #modding.
  2. Extract the zip file to a desired location.
  3. Open the template project by clicking on the .fspro file or by opening FMOD Studio and selecting the .fspro file to open.
You should now have a screen like this:
Now, expand the folders on the left side.
Rename "your mod" to the name of your mod. The naming of these folders aren't important, but have it make sense.
The "your_sound" event is a template event. Don't edit this as you want to copy this for your own future sound events.
You should also rename your project if you wish.
Now, click on the Banks tab and delete the current bank that is in there. Create a new one with a name of your liking. For this guide I will name it "tutorialbank". Now right click on your bank and mark it as the master bank. It should now look like this:
Creating new sound events
To create new sound events, right click on the template event and duplicate it. Then rename it to a desired name. For this example I will use "huge_explosion".
To add sound files to your project, Navigate to File > Import Assets.
After adding your sound file, make sure you have the correct event selected, and remove the test_tone sound from the Audio 1 track. Now, click on the Assets tab and drag your sound into the empty track.
You can click the play button to test out the sound. You can also change the parameter values to hear what it sounds like at a distance, or with phantoms silent active ability on, or its depth underwater.
When you are satisfied with how it sounds, assign the event to the master bank.
Exporting
  1. Click File > Build, or press F7 to build the bank files.
  2. The files will be created in your project folder (wherever you extracted the template .zip to) under Build/data. Copy these bank files.
  3. Navigate to the folder of your forts mod.
  4. Create a folder named "audio" and paste the bank files into it.
Using the event in-game
In the Forts modding guide, sounds are added in an effect file under the Effects table. In that guide, it also shows you how to trigger FMOD events in those effect files. Use SoundEvent with the path of the event that you want to trigger. With the example effect that I have created for this guide, it would be:
SoundEvent = "mods/tutorialmod/effects/huge_explosion"

Now try out the sound in-game. If you hear it, congratulations. You have successfully created your first FMOD sound event for Forts.

The rest of this guide will cover some additional features.
FMOD Live Update
You can connect FMOD studio to the game using FMOD Live Update. This will allow you to modify events and hear them in-game without restarting the match. It also allows you to use the profiler, from which you can record the game and analyze useful statistics like CPU usage, memory usage, total voice count, and more.

The first step is to enable this feature in the game. Navigate to your settings file at Forts/users/<your steam id>/settings.lua and set
FmodLiveUpdate = true,
in the data table.

Within FMOD press F5 or click File>Connect to game...
Keep the default address (localhost) and click Connect. FMOD Live Update should now be connected.

The profiler can be accessed at Window>Profiler or press ctrl+6.
FMOD Studio User Manual
For more help on using FMOD's features, visit the FMOD Studio User Manual[www.fmod.com]
F.A.Q.

  1. Q: The bank file size is large. How can i reduce it?

    A: Select your assets and compress them with Vorbis.
    Refer to 6.3 Compression and Platform Encoding[www.fmod.com] for more information.



  2. Q: My sound is delayed, how to fix?

    A: Make sure the sound is placed at the beginning of the timeline. You can also click and move the edge of the sound to trim it. Also make sure the sound is using "Compressed" or "Decompressed" as its Advanced Loading Mode and not "Streaming"


  3. Q: The in-game volume sliders aren't working with my mod?

    A: Make sure that you are using the most recent project template. Navigate to Window > Mixer or press Ctrl+2. This will bring up the mixer window. Make sure all events are in their proper group bus. If these group buses don't already exist, then you need the new template. You cannot create these unless you know how to manually create them with the correct GUID.
3 commentaires
SamsterBirdies  [créateur] 1 févr. 2023 à 9h52 
Thanks to Harder for creating a Chinese version of the guide! https://steamcommunity.com/sharedfiles/filedetails/?id=2916280298
SamsterBirdies  [créateur] 30 déc. 2022 à 22h31 
You're welcome. If there's anything that you want to add or correct, I have sent you a contributor request.
[DEV] Noze  [dév.] 30 déc. 2022 à 21h45 
Thanks heaps for putting this together Sam :)