Age of Empires II: Definitive Edition

Age of Empires II: Definitive Edition

93 ratings
Audio Modding Guide
By StepS
A guide to modifying or adding new audio in-game, as well as using them in scenarios.
3
   
Award
Favorite
Favorited
Unfavorite
Introduction
With the release of AoE II DE, many were left wondering about the moddability of the in-game sounds. Understandably, not everyone will like the changes to the sound effects. Some people would like to change which sounds are played where, or introduce new sound effects into custom scenarios. This is where modding comes in handy.

However, modding sounds is no longer as straightforward as simply adding, replacing or substituting .wav or .mp3 files. Because the audio engine is now powered by Audiokinetic WWise, there are some new things to know before attempting to create audio mods. This guide will provide you with the necessary information on how to use existing sound effects in scenarios, add new effects, rearrange audio in the DAT file, and cleanly substitute in-game sounds and music with your own custom files. The goal is to make this process as simple as possible for modders.

NOTE: This guide is still a work-in-progress as more information is added, and older information is updated with game patches. Several known issues with the modding system are listed below, with the development team working on resolving them for future patches.
[REQUIRED] Sound Events and Audio Sources table
Because of the WWise system, sound files no longer have meaningful names. Some of them are visible as .wem files with random numbers in the name, others are packaged as part of soundbanks (.bnk). Moreover, not all of them accurately represent how a sound event is played in-game, because sound events may combine several of these sources with varying settings, configured to play together.

In order to bridge this gap, I've created this spreadsheet[docs.google.com]. What does it include?
  • Every Event Name linked to its Event ID. Event Names are necessary to make soft substitions of audio in drs\sounds and to use stock sound effects in the Scenario Editor. Event IDs are necessary to reassign sound bindings in the DAT file (with Advanced Genie Editor).
  • Audio Source Names linked to their IDs. This is for people extracting the stock files, so that they can know what they are working with. The numbers in the .wem filenames come from here. Note: some of the sources listed there are not actually found in the game, because they are not used. This is normal and they can be ignored.

These will be needed for nearly every type of modding below.
Using stock audio in Scenario Triggers
Let's say you wanted to make use of any existing sound in the game and put it into a scenario.
  • Create a new trigger with the "Play Sound" or "Display Instructions" effect.
  • Check the Audio Spreadsheet (linked at the top of the guide) and input the Event Name that you want.

Notes:
  • Event names are not case-sensitive.
  • There are two types of events: 2D and 3D. At this moment there is no visible separation between them in the spreadsheet, so you will have to keep in mind their characteristics below.
    • 2D events are not bound to any specific location on the map, and are played at the middle of your stereo setup without any panning. Examples are UI sounds (button clicks, notifications, unit select and move orders, etc.). These can be used in both "Display Instructions" and "Play Sound" effects without any restrictions.
    • 3D events make use of in-game coordinates and will have panning. These are normally battlefield effects (explosions/gunpowder, melee/ranged sounds, villager working effects, death screams). They cannot be used in "Display Instructions" effects. They can be used in "Play Sound" as long as Location is set for them to play on the map. The Location requirement for 3D sounds may be removed in future updates.
Pictured: example Play Sound effect with "Play_Chat_Received" as the sound.
Using new (custom) audio in Scenario Triggers
  1. First of all you will need to prepare your source files into WEM files. I cannot provide specific help with that, however user-created guides for doing this are available. A stand-alone converter for wav and opus is in the works and will be posted here once it's done.
  2. Create a new mod in your personal AoE2DE directory. Example: C:\Users\Admin\Games\Age of Empires 2 DE\46461161022890482\mods\local\SoundMod1
  3. Within that mod directory, create folders in the following order: resources\_common\drs\sounds
  4. Place your converted WEM file inside the sounds folder.
  5. When adding your "Display Instructions" or "Play Sound" trigger (see the paragraph above), specify the filename of your sound without the WEM extension. For example, if your file is named "custom1.wem", input "custom1".

When packaging your scenario, package it in the same mod alongside audio files (using resources\_common\scenario).

Pictured: example of the "Play Sound" effect with "custom1.wem" as the custom sound file.
Overriding In-game SFX
  1. First of all you will need to prepare your source files into WEM files. I cannot provide specific help with that, however user-created guides for doing this are available. A stand-alone converter for wav and opus is in the works and will be posted here once it's done.
  2. Create a new mod in your personal AoE2DE directory. Example: C:\Users\Admin\Games\Age of Empires 2 DE\46461161022890482\mods\local\SoundMod1
  3. Within that mod directory, create folders in the following order: resources\_common\drs\sounds
  4. Place your converted WEM file inside the sounds folder.
  5. Check the Audio spreadsheet (linked at the top of the post), the Unit Sounds tab*. Find the Sound that interests you and copy its corresponding File Names. Rename your files to match. Make sure that you cover all variations of your sound with your replaced ones.

* Alternatively, you can use Advanced Genie Editor to check out what sounds with what names are bound through the Sounds tab (see the bottom of the Guide).

Want to have Original Sounds in the game? Check out these mods!

Known Issues:
  • Individual Civilization Jingles (short audio cues that play when you press "Start Game" in single player, and not the Civ Themes) cannot be modded at this time. However, you can place a file called "Civilization_Jingle.wem" to override all civilization jingles at once.
  • Looped sounds (burning fire) are currently not supported with this. The loop will not be preserved and the sound will play just once. This is a known issue that is being looked into.
  • Various in-game effects, such as sword clanks, arrows, mango shots etc., and some UI effects are not properly capped to cancel one another when a lot of them are played at the same time. There is a workaround in place to prevent them from stacking up volume, however. This is a known issue that is being looked into.
  • It may not be always possible to preserve the same variety of randomly-picked sounds for certain effects compared to the vanilla DE soundbanks. Some sounds (like all DLC birds after AoC) are bound to one same entry like in the legacy game. These can be corrected/expanded with a data mod however, and will be slowly addressed with game updates.

Pictured: Arrow sounds overridden as in the "Original Sounds" mod pack.
Overriding and Adding Music
  1. First of all you will need to prepare your source files into WEM files. I cannot provide specific help with that, however user-created guides for doing this are available. A stand-alone converter for wav and opus is in the works and will be posted here once it's done.
  2. Create a new mod in your personal AoE2DE directory. Example: C:\Users\Admin\Games\Age of Empires 2 DE\46461161022890482\mods\local\MusicMod1
  3. Within that mod directory, create folders in the following order: resources\_common\sound\music
  4. Place your converted WEM file inside the music folder.
  5. Check the list below to rename your file accordingly.

If you want to have original music in the game, check out this mod:

You can add up to 99 tracks (01-99) for each type of music, except ingame. They will be randomly picked.
Valid music filenames (## = number, e.g. 01):
  • credits##.wem - used in the Credits and Mod Manager menus.
  • frontend##.wem - also known as "Open", the main menu opening music.
  • history##.wem - history background tracks.
  • lobby##.wem - played when in lobby or lobby browser.
  • lose##.wem - music files when losing.
  • map##.wem - played when a campaign map is open.
  • win##.wem - music files when winning.
  • ingame##.wem (01 - 30) - in-game music.
  • Aztecs_theme.wem (and other civilizations, check the spreadsheet) - civilization themes.

All music filenames are currently CASE-SENSITIVE (as displayed above and on the spreadsheet).

Known Issues:
  • Modded menu music lacks fade-ins and fade-outs when changing between menus.

Pictured: first 8 ingame music tracks replaced through modded WEM files.
Adding New Taunts
  1. First of all you will need to prepare your source files into WEM files. I cannot provide specific help with that, however user-created guides for doing this are available. A stand-alone converter for wav and opus is in the works and will be posted here once it's done.
  2. Create a new mod in your personal AoE2DE directory. Example: C:\Users\Admin\Games\Age of Empires 2 DE\46461161022890482\mods\local\TauntMod1
  3. Within that mod directory, create the following folders:
    • resources\<language>\sound\taunt (for all languages that you want to support)*
  4. In the taunt folders, name your files as follows: "<taunt number> <Flavored taunt text>.wem". Example: "324 This is a very special taunt!.wem". Typing the number 324 will result in the taunt playing in-game.

If you want to override existing taunts, you need to use files such as "Taunt_98.wem" in resources\_common\<language>\sound\taunt (for a specific language) or in resources\_common\drs\sounds (to override the taunt in all languages).

* If you did all of the above, and the taunts are not working, you may have to duplicate all sounds you added in taunt to the resources\_common\drs\sounds folder. This is a known issue that is being investigated.
Changing or adding sound bindings in the Data File
  1. Open your AoE2DE directory.
  2. From the "Tools_Builds" folder, launch "AdvancedGenieEditor3.exe".
  3. Enter the correct paths to the "empires2_x2_p1.dat" and "key-value-strings-utf8.txt" files and proceed.

To add a new sound into the game and bind it to unit/graphics:
(This procedure is nearly the same as in AoE II: HD Edition, with the two exceptions that files are encoded in WEM instead of WAV, and that they are referred to by their literal filenames declared in Sound entries instead of "Data Resource IDs".)
  1. Create a new group on the Sounds tab.
  2. Add filenames, delays and probabilities as needed. Notes:
    • The files will be looked up at resources\_common\drs\sounds in either your mod directory, profile directory or game directory.
    • The file extension does not matter and can be left empty here, however must be WEM in the target folder, and if you choose to use a different one, the game will replace it by .wem during file lookup anyway.
    • Don't forget to "Auto-odds" when done adding files if you want each file to be randomly played with even odds (up to the maximum of 100). For example, with 4 files, setting auto-odds will mean 25, 25, 25, 25 for each file, with the maximum of 100. At the same time, using 4 files with low odds like 1, 1, 1, 1 for idling animals will mean that the sound will rarely be played at all.
  3. Fill the sound ID into the Dark Blue cells of unit or graphics Sounds you wish to replace.
  4. Optional: if you want people who somehow don't have your audio file to still hear something as a fallback, you can add an Event ID into the cyan box nearby, that will play one of the built-in sound events (please refer to the Spreadsheet for Event IDs).

To remap an existing sound to another sound:
  • Unit sounds: choose the unit you want and change the blue and cyan boxes in the "Sounds" section: these are the new Sound fields. The values inside the cyan box represent Event IDs (refer to the spreadsheet) for those who are not using modded sounds, while values inside the blue box refer to modded Sound groups on the Sounds tab, with filenames bound to files in resources\_common\drs\sounds (created only by mods). You should remap both IDs to make sure that both unmodded and modded users hear what they are expecting to hear. Example below for the Fishing Ship:

  • Graphics sounds: choose the needed graphic at the "Graphics" tab and edit the sound boxes (both for the main Sound and for the frame-specific angle Sounds) in the same way as Unit sounds. Example below for Man-at-Arms's angle sounds.

Note: as you probably know, data mods require all players to have the same file to play online, so changing sound bindings with this method should only be done if absolutely necessary for your mod.
Overriding Voice-Overs
  1. First of all you will need to prepare your source files into WEM files. I cannot provide specific help with that, however user-created guides for doing this are available. A stand-alone converter for wav and opus is in the works and will be posted here once it's done.
  2. Create a new mod in your personal AoE2DE directory. Example: C:\Users\Admin\Games\Age of Empires 2 DE\46461161022890482\mods\local\VoiceMod1
  3. Within that mod directory, create folders in the following order:
    • For intro/outro slides: resources\<language>\campaign\sounds
    • For in-game narration: resources\<language>\sound\scenario
    • If you want to replace for all languages at once, then everything goes here: resources\_common\drs\sounds
  4. Place your converted WEM file inside the folder of choice
  5. Check the Audio spreadsheet (linked at the top of the post), the Scenario & Campaign Events tab. Scenario Dialogue is in the first table, while intro/outro slides are in the second table after it. Rename your WEM files in accordance with the files you want to replace (Note that the "PLAY_" in the name is optional and not required).

If you want original campaign narration in original AOK/AOC campaigns, check out this community-created mod:

Known Issues:
  • It is not currently possible to use the "Previous"/"Next" slide functionality with custom intro/outro voice-overs.
< >
122 Comments
Goose McBroose Jun 10 @ 7:06am 
Eventually figured it out, for anyone else who runs into same issue tracks ingame22, ingame23, & ingame24 play in between ingame10 & ingame11 and then track ingame21 jumps straight to ingame25.
Mammad Gamenet May 27 @ 2:56am 
i misss the OLD audio SO mUch :steambored:
Tupaquinho Apr 14 @ 5:08pm 
I have been changing many civilization themes but I'm having no luck with the Bohemians one. Does it have some other paticular format? Tried changing the CAPS with no luck
Tupaquinho Nov 5, 2021 @ 6:17pm 
Hi, thanks a lot for your guide, this allowed me to finally achieve my first mod! Would you mind adding the new civilization themes in the spreadsheet? They probably just have the same format as the other ones but just in case. Thanks once again!
かnje_NE Oct 3, 2021 @ 2:04pm 
Anyone has "known issues" or troubleshooting guide on how to submit an update to the mod? I'm struggling getting my .zip file up there, I know I'm doing something wrong but can't check where's the problem. The first folder in the zip file is the "resources" one, then there's _common and so on, that's how it's supposed to be, right? Like this: upload.zip/resources/_common/sound/music/*.wem

Is that the expected folder structure? Can't remember from the last submit I did.
かnje_NE Oct 3, 2021 @ 1:59pm 
@Goose McBroose, there's likely a problem with your .wav/.wem files and the system defaults to native tracks, would suggest you check your files and see if there are different .wav properties for those 2 that don't work, and try to get them into the right format
Build_Gates Aug 12, 2021 @ 6:49am 
I dont understand how to find which audio files are tied to an in-game play event. 3056116981 is the ID for PLAY_FOG_AMBIENCE. How am i supposed to find which sound ID is tied to it ?
Goose McBroose Jul 15, 2021 @ 6:36pm 
Works well, but for some reason a default track playes in between ingame10 and ingame 11, has anyone else run into this problem and if so do you have a fix?
かnje_NE Jul 10, 2021 @ 12:30pm 
Ok, I just solved the problem with the file sizes. Somewhere someone said not to pay attention to a video around that instructs to choose "Vorbis High" (or similar) in WWise, but instead to choose from the "PCM" settings.. well I finally figured that's what was making the files 10x bigger, so I went and tried the Vorbis high setting: the .wem files work , and they're so much smaller.

So, just go by what the video says, choose Vorbis and don't pay attention to whoever said to choose PCM instead.
かnje_NE Jul 8, 2021 @ 5:09pm 
Thanks a lot for this post!
I have a question: how do you guys manage to get the .wem files to be so small? I go mp3 > wav, then wav > wem and my .wem files are 30~50 mb each! If I try to "compress" the wav, then WWise tells me the .wav files are not supported because they're in 8-bit resolution.

But I still see those ~5mb. .wem files when I subscribe to mods, so they figured it out! My mod is here: https://www.ageofempires.com/mods/details/35685/
Any help will be appreciated, thanks so much!!