Background Music System #
Background music system #
Migration #

Navigate to your player controller class assigned to your game mode.

Add component “AC_BackgroundMusicSystem_Advanced” to your player controller.
Plugins #
Common UI
Overview #
The Background Music System provides a dynamic and flexible way to control in-game music and ambient sounds. It allows designers to create immersive audio experiences that adapt naturally to gameplay, environment, and world progression.
This system supports multiple playlist types, each serving a unique purpose and reacting to different in-game conditions:
- Time-Based Playlists — Play specific tracks depending on the current in-game time (e.g., calm daytime themes, eerie nighttime ambience).
- Regional Playlists — Change music automatically when the player enters defined regions or biomes (e.g., village, forest, dungeon).
- Default Playlist — A fallback or “general world” playlist that plays when no other conditions are active.
- Battle Music — Dynamic combat tracks that activate when combat begins and fade out seamlessly when the battle ends.
Adding your own playlist #

Navigate to DT_BackgroundMusic_Playlist, which can also be found by following the file path above.

Inside the data table, you will see a variety of example rows. The data table uses the struct “Struct_BackgroundMusic”. So let’s first define what each variable does.
Is Region Specific
Type: Boolean
Purpose: Limits this music entry so it only plays inside specific regions/biomes.
Usage:
- True: Only eligible in the regions listed under Regions This Can Play In.
- False: Eligible anywhere in the world.
Regions This Can Play In
Type: Gameplay Tag Container
Purpose: Which regions/biomes this music is allowed to play in.
Usage:
- Add region tags like Region.Forest, Region.Village, Region.Desert.
- Only evaluated when Is Region Specific is true.
- Useful for area-specific ambience and biome themes.
Is Part of Day Specific
Type: Boolean
Purpose: Chooses whether the track is time-of-day dependent.
Usage:
- True: Pull the track from Music Per Part of Day based on current time.
- False: Use Non Time Specific Music.
Music Per Part of Day
Type: Map (Key: Enum_PartOfDay → Value: Struct_BackgroundMusicEntry)
Purpose: Different music selections for Morning/Afternoon/Evening/Night, etc.
Usage:
- Populate entries like:
Morning → BGM_Calm_Morning
Evening → BGM_Warm_Sunset
Night → BGM_Eerie_Night
- The system picks the matching entry at runtime when Is Part of Day Specific is true.
- Great for seamless day-night mood shifts.
Non Time Specific Music
Type: Sound Base (Sound Cue/Sound Wave)
Purpose: The default/fallback track when time-specific logic is not used.
Usage:
- Provide a looping cue like BGM_Exploration_Default.
- Played whenever Is Part of Day Specific is false.
- Acts as a general theme for regions or global ambience.

I added a new row to the data table and filled out the variables, I want the example to be an ambient playlist that plays throughout regardless of the region or time of day.
Implementing your own playlist #

Locate AC_BackgroundMusicSystem_Advanced that you previously added to your player controller.

Within the details panel you will find “Default Playlists”. Click the row name drop down under default playlist to play, locate the new row you created and assign it.

As you can see and hopefully hear within your project, the new playlist is currently the default playlist. If you want to change the battle music, repeat the same process but change the row name under Default Playlist to Play For Battle.
Battle music #

The Battle Music System is an event-driven example that dynamically changes the active background music outside the normal time-based or region-based playlists defined in the DataTable.
It does this by detecting combat situations and forcing a transition to the Battle Music playlist when a player enters a defined trigger area. To implement this, just drag and drop the blueprint into your desired areas of the map.
Process Overview:
Authority Check – Ensures the logic only executes on the server (to maintain consistency in multiplayer setups).
Cast to Character – Confirms that the overlapping actor is a valid character (e.g. the player or AI with an Attribute Component).
Get Component by Class (Attribute Component) – Retrieves the character’s Attribute Component, which manages state effects and attributes like health, stamina, or conditions. This is simply an interface.
Add State Effect: “In Combat” – Calls a server function (Server_AddOrRemoveStatusEffect) to apply the “In Combat” status effect to the character.
This marks the character as currently engaged in combat.
The state effect can be referenced by other systems (AI aggression, HUD indicators, etc.).
Get Component by Class (Background Music System) – Accesses the Background Music Manager component from the same character (or global actor) to control music playback.
Play Playlist: Battle Music – Calls the Play Playlist function on the Background Music System and passes in the Battle Music playlist.
This overrides any currently playing ambient or regional music.
The function uses a smooth fade to transition into the new combat track.
