Skip to main content

Audio Integration

This guide explains how to add SFX and music to your game in All On Board!

0. Sound Library for modding​

You have at your disposal a sound library designed specifically for modding, to make it easy to add sound to your game. It’s located in Content/AOB/ModdingSoundAssets.

Modding Sound Assets folder in the content browser

There, you will find some sounds to cover the basics of a board game sound design (dice, cards, coins, victory and defeat SFX…), ready to be added to your Blueprints. Some MetaSound assets you can find there feature a simple internal logic that provides a degree of randomization that you can take as an example or template, and there’s even an attenuation asset designed to make the SFX sound spatialized (3D). Feel free to modify any value or behavior of these assets to make the sound work for you.

You can listen to a preview of the sound by hovering over the audio files or the MetaSound assets until a play icon shows, and then clicking on it.

Previewing a sound with the play icon on hover

If you are interested in any of the sounds we offer, simply look up the audio ID in the DataTable provided in the same Modding Sound Assets folder. Jump to Section 4. Data Table of this guide to learn how to do this, then proceed with the following steps to learn how to use Audio IDs in your Blueprints.

If you wish to work with your own audio files, start with the section following this one and then proceed with the subsequent steps.

1. Importing audio files​

Simply drag your WAV files into the desired folder in the content browser. We recommend importing mono (regular SFX) or stereo (music and ambience) audio files, with a sample rate of 48 kHz and 16 bits of depth.

2. Creating and configuring a MetaSound​

2.1 Creating a MetaSound​

In the Audio folder of your game, right-click in the content browser, select Audio, and click MetaSound Source. It is recommended that you name it starting with the conventional prefix for MetaSounds “MSS_”

Creating a MetaSound Source

Naming the MetaSound Source

2.2. WavePlayer​

Inside the MetaSound, add a WavePlayer: right-click on the graph, type "waveplayer" in the search bar, and choose the suitable waveplayer for your audio file, matching the number of output channels with the channels of your audio file.

Adding a WavePlayer node

By default, a MetaSound offers a single output node for mono audio files. If you need more channels (for stereo, quad, 5.1, or 7.1 audio files), click on MetaSound in the toolbar above, and then choose the output format to add more output nodes. Then, connect them to the corresponding pins in your waveplayer.

Choosing the output format from the MetaSound toolbar

Output format options

Output nodes connected to the waveplayer pins

In the WavePlayer, search for your audio file in the Waveasset Selector.

Waveasset Selector

Connect the input "On play" node to the right pin of your WavePlayer. Then, connect the provided output "On finished" node to the right pin of your WavePlayer.

Connecting the On play and On finished nodes

2.2.1 Looping​

If you want your audio to loop, you don't need to connect this node; instead, mark the Loop Checkbox in your WavePlayer.

Loop Checkbox in the WavePlayer

For MetaSounds on Loop, you don’t need the Output node with the On finished pin, so you can remove it. If you hover over this node, a message will appear explaining that it is necessary for one-shot sounds. If not the case, you can get rid of it.

One-shot message on the Output node

In your MetaSound Asset, the Interfaces tab will usually be displayed on the left of the window; if it’s hidden, click on Window in the toolbar on top and select Interfaces to make it visible.

Showing the Interfaces tab from the Window menu

Then, in the Interfaces tab, click on the trash can icon next to UE.Source.OneShot that comes by default. If you don’t remove it, your looping won’t be affected and will work correctly, but a warning message will be displayed on the Output node and the Play button.

Removing the UE.Source.OneShot interface

2.3 MetaSound configuration​

You can modify some properties for your audio in the waveplayer and in the Source tab in the toolbar, such as pitch, volume, start time, loop start, etc., as well as create some randomization through MetaSound Functions. Check the MetaSounds Reference Guide in the UE5 documentation here to learn more: MetaSounds Reference Guide in Unreal Engine — Unreal Engine 5.8 Documentation — Epic Developer Community

Make sure to set a Sound Class for your MetaSound so it’s affected by global volume changes. For regular SFX, choose 000AOB_SFX_SC; for music or ambience that loops, choose 000AOB_Music_SC.

Choosing the Sound Class for the MetaSound

This way, you can control the volume of the MetaSound from the sliders in your Wristwatch’s settings tab.

Controlling MetaSound volume from the Wristwatch settings sliders

3. Sound Attenuation​

If you want your sound to be spatialized (that is, responsive to the player's head position), you need to set an Attenuation Asset. To create one, right-click on the desired folder in the Content Browser, select Audio, and click Sound Attenuation. The conventional prefix for Sound Attenuations is “ATT_”

Creating a Sound Attenuation asset

Naming the Sound Attenuation asset

Inside this asset, you can configure how the sound is affected by the distance to the listener's position. It’s possible to enable and disable both volume attenuation and spatialization separately: in case you need, for example, a sound to pan (to react to the player’s head orientation) but you don’t want it to react to distance.

To make this Attenuation Asset work properly, you’ll have to set the Inner Radius and Falloff Distance based on the distances used in the game.

The Inner Radius determines how big, from the sound source, the area is that isn’t affected by the attenuation; that is to say, how far from the sound source the player should be for the sound to start to diminish.

The Falloff Distance determines how big the attenuation area is and where the affected sound won’t be audible anymore. You can configure how the sound behaves from the Inner Radius to the Falloff Point by changing the Attenuation Function and the Attenuation Shape.

Inner Radius and Falloff Distance configuration

Check the Sound Attenuation documentation here to delve deeper into this matter: Sound Attenuation in Unreal Engine — Unreal Engine 5.8 Documentation — Epic Developer Community

Now, you can add this Sound Attenuation to your MetaSounds, in the Source configuration.

Adding the Sound Attenuation to a MetaSound

4. Data Table​

You must have your MetaSounds added to a Data Table, which must be loaded into the GameConfigGeneral Data Asset of the game.

Inside your game’s Audio Folder, you’ll find two Data Tables. You’ll use the DT_[YourGame]_Tracks to add your music or ambience MetaSounds (sounds that loop or have a non-ending programming), and the DT_[YourGame]_SFX for regular, action-shot SFX.

To associate your MetaSound with an ID, which will be called by the engine, you must create a New Row in your DataTable by clicking Add+ in the toolbar above.

Add+ button in the Data Table toolbar

Choose your MetaSound from the Audio Cue search bar. Make sure you don't select an audio file instead of a MetaSound Asset. Then, rename the Row: that will be the MetaSound’s ID that you need to use in the Blueprints so the sound can be called by the engine.

Choosing the MetaSound and renaming the Row

Note that if your ID matches one of the All on Board! own IDs (which you can check in DT_000AOB_SFX, DT_000AOB_SFXEvents, and DT_000AOB_Tracks), the game call won’t work properly. To prevent this, make sure to add your own Prefix to your IDs, which conventional recommendation is an abbreviation or alphanumeric code.

5. Background sounds and music implementation​

To have music or sounds playing in the background for your game, you need a Sound Emitter Actor added to your map. If you’ve created your game using one of the provided templates, you will find this asset already placed in the map; if you want to add more or you’re working with your own map, just look for the BP_SoundEmitterActor in the content browser by typing it in the search bar or navigating through the following path: /Content/AOB/BoardGames/000AOB/Sound/BP_SoundEmitterActor, and then simply drag it from the content browser to any point of your map.

Placing the BP_SoundEmitterActor in the map

Music and ambiences are usually 2D, that is, non-spatialized, so they will be heard uniformly and consistently no matter the player’s position relative to the sound emitter’s location, so you don’t need to worry about where to place it. You can add as many sound emitters as you want.

To set the music or ambience MetaSound that will be sent by the Sound Emitter, look for the Sound Emitter Actor of your map in its Outliner, and click on the Scene Root Component

Selecting the Scene Root Component of the Sound Emitter Actor

In the Details tab, scroll down and display the Audio tab; there, you need to select Track in the Audio Type field and to type the Audio ID of your MetaSound, previously added to your DT_[YourGame]_Tracks, in the Event ID field.

Setting the Audio Type and Event ID in the Details tab

Make sure to mark the Broadcast checkbox to make the music audible to every player in the room.

If you mark the On Begin Play checkbox, the music will start playing from the moment the player enters the map, even during the settings flow; if you leave it unmarked, the music will start playing after the game’s configuration is set and the host presses the PLAY button.

6. Use an ID as a variable​

Now that your MetaSound has an identifying ID and appears in the Data Table loaded in your game’s GameConfigGeneral Data Asset, you can use it as a variable in a Blueprint so it can be called by the engine.

Depending on the element you’re creating, it may inherit some IDs. For example, a Card or a Dice will already have some audio variables filled, as you can see in the Details tab on the right side of the editor after looking for the sound properties:

Sound properties filled on a Card element

Sound properties in the Details panel

Other elements, like a Grabbable Game Element, won’t have any of their sound variables filled.

Grabbable Game Element with empty sound variables

You just need to type the exact ID you wrote in the corresponding Data Table for the MetaSound you want to be triggered, and Compile for the changes to be saved.

Most of the sound variables focus on grabbing and slotting, as those are the moments typically sonorized when manipulating items, but you can see a bunch of grabbing and slotting variables that are slightly different, instead of a single variable each. That’s because each one refers to different timings of the process from the moment the player grabs an item from afar until it reaches their hand. We recommend working mainly with “Sound on grab ended” and “Sound on Slotted Travel Ended”, but you can play around to find the perfect timing for your sound!

If you need a behavior for your sound that can’t be achieved with the sound variables provided, you can work in the Blueprint graph through our Audio System. Learn how to here: Sound from Blueprint

7. How to create a Data Table and add it to a Data Asset​

In case you need to create a new DataTable, right-click on the Content Browser, select Data, and click on DataTable. A dialog window will open, where you have to choose the type of DataTable that will be created.

Creating a new DataTable

You must choose DT_TrackData for music or looping tracks intended to work as ambience or background noise; for regular SFX, choose DT_AudioData.

Choosing DT_TrackData

Choosing DT_AudioData

Rename your Data Table.

Renaming the Data Table

Go to your game’s GameConfigGeneral Data Asset, and load all the DataTables you need in the Audio section.

Loading the DataTables in the GameConfigGeneral Audio section

To associate your MetaSound with an ID, which will be called by the engine, you must create a New Row in your DataTable by clicking Add+ in the toolbar above.

Add+ button in the Data Table toolbar

Choose your MetaSound from the Audio Cue search bar. Make sure you don't select an audio file instead of a MetaSound Asset. Then, rename the Row: that will be the MetaSound’s ID that you need to use in the Blueprints so the sound can be called by the engine.

Choosing the MetaSound and renaming the Row

Note that if your ID matches one of the All on Board! own IDs (which you can check in DT_000AOB_SFX, DT_000AOB_SFXEvents, and DT_000AOB_Tracks), the game call won’t work properly. To prevent this, make sure to add your own Prefix to your IDs, which conventional recommendation is an abbreviation or alphanumeric code.