You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
Welcome! You are not logged in. Please Login or Register.5 replies
Age of Kings Heaven » Forums » Scenario Design and Discussion » A Guide to Definitive Edition Custom Sound Files (with some unanswered questions)
Bottom
Topic Subject:A Guide to Definitive Edition Custom Sound Files (with some unanswered questions)
Oafy the Great
Squire
posted 04-26-20 05:19 PM CT (US)         
Getting custom sound files to work in the Definitive Edition is a lot less simple than in the original game. I did a lot of googling, but I couldn't find a simple, noob-friendly tutorial on accomplishing this task. I finally figured out how to get them to work, but I still face some significant bugs. I'm going to share a detailed, hopefully simple explanation of what I did to get them to play, and then talk about the problems I have with them.

Getting the files to play

1) Everything that is created by users is considered a mod

I was confused by this at first. I was used to mods referring to things that changed the graphics of the game or the game play. In definitive edition custom campaigns and scenarios are also considered mods.

2) Two different directories

When you install the definitive edition from steam, there are two different directories in which the game's files will be stored.

a. The first is the typical steam directory that you'll be used to from other games:
"C:\Program Files (x86)\Steam\steamapps\common\AoE2DE"

b. The second is the one you'll be using for scenario design:
"C:\Users\[your PC user name]\Games\Age of Empires 2 DE"

3)Where your scenarios get stored

Within this second directory there is a folder with a name like "76561198141085165." Everyone's number will be unique. This is the folder that will contain all your mods (both user created and downloaded). Go into this folder, then into "common", then "scenario." If you go into the scenario editor in the game and create your own scenario, this "scenario" folder will contain it. The directory is as follows:
"C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\resources\_common\scenario

4) Making your scenario into a mod

a)Where your mods get stored

In order to be able to access custom sound files in the scenario editor, you first have to make your scenario into a mod. To do this, go back to the following directory:
"C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165"
Then enter the "mods" folder. Within this folder you will have a "local" folder and a "subscribed" folder. The subscribed folder is for other mods from the community that you subscribe to. The "local" folder is where you will put the mods you create while you're working on them. If you have not made any of your own mods yet, this folder will be empty.

b)Creating the right folders for your mod

I'm going to use an example for this next part, as I think that's the easiest way to explain it. Say you have created a scenario in the editor. This scenario is called "The Beginning." You intend this to be the first of seven levels in a campaign that you plan to call "A hero's journey." This scenario will be saved in "C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\resources\_common\scenario" as "The Beginning.aoe2scenario". You need to get this scenario into the mods folder in order to be able to use sound files with it. So you need to do the following:

I. Go to the following directory: "C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\mods\local".

II. Create a folder and name it "A hero's journey". You could call it anything, but that's what you're going to want to call your campaign eventually.

III. Inside this folder create another folder called "resources".

IV. Inside "resources" create "_common"

V. Inside "_common" create "drs"

VI. Inside "drs" create "scenario"

VII. Copy "The Beginning.aoe2scenario" from "C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\resources\_common\scenario" to this new scenario folder you just created.

VIII. Go back to "C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\mods\local\A hero's journey\resources\_common\drs". Create a folder called "sounds".

IX. Put whatever sound files you want in this new "sounds" folder. The sound files must be ".wem" files. You can convert ".wav" sound files to ".wem" using the program "Wwise." There are straightforward, easily accessible, noob-friendly tutorials online for this.

5) Playing sounds in the game

Finally, you're going to need to know how to play sound files with triggers in the editor. As far as I know, there are three effects that can do this: "Play sound", "Send chat", and "Display Instructions". All three of these effects have a text box labelled "Sound (Event) Name." Simply type the name of a sound file that you have saved in the following directory:

"C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\mods\local\A hero's journey\resources\_common\drs\sounds".

Do not include the ".wem" extension. If your sound file is called "deathscream.wem", then you should type "deathscream". As far as I know, you you will only be able to play files that are in:

""C:\Users\[username]\Games\Age of Empires 2 DE\76561198141085165\mods\local\A hero's journey\resources\_common\drs\sounds".

6) The peculiarities/bugs with the system:

Lastly, I want to talk about some of the difficulties and bugs I've encountered. Maybe other people have a fix for these, or maybe we need to bring them to the attention of the developers. I'll discuss how each of the three effects work.

a) Play sound: This effect has a "set location" option. If you use this, then the sound you play will be fixed to that location. This means that if you move your view away from that location, the sound will get quieter and quieter. If you move the view far enough away, you won't be able to hear the sound at all. If you move your view back, you'll be able to hear the sound again. (Note: I'm talking about long sound files such as music pieces. Short sound files may be over before you even have a chance to change the view). If you don't set a location, then the sound will be fixed to whatever location the player is viewing when the sound gets played.

b) Send chat: This effect works like play sound but without the ability to set location. The sound will be fixed to whatever location the player is viewing when the effect is triggered.

c) Display instructions The sounds played here will not be fixed to any location. The sound will maintain the same volume no matter how you change the view. Unfortunately, I have noticed two problems with this effect. One, the sound will not play unless some text is written in the display instructions box, even if that text is just blank spaces (these blank spaces will show up as a blank dialogue box on the screen when the effect activates). Two, while the sound is playing, no other display instructions will show up on the screen. If you play a 2 minute piece of music, for example, no display instructions will be able to show up on screen for two minutes.

The end result of these problems is that it is almost impossible to have custom music in a campaign, as the music will either be tied to a specific location or will prevent further display instructions from working. Please leave a comment if you have any solutions to these problems, or if you want clarification on anything I wrote here.
AuthorReplies:
duyhung2h
Squire
posted 05-01-20 10:42 PM CT (US)     1 / 5       
Thank you for the useful information. Apparently I haven't known that the "send chat" effect can play a sound file anywhere on the screen, so I've been using display instruction for my music... At least it worked well with what I was trying to create.

My aspiring new creation for DE:
Gensokyo: Season of Calamity
El Nath (Winner of ZeroEmpires designer contest)
More are in the work...
BOT_Alan
Squire
posted 05-02-20 09:51 AM CT (US)     2 / 5       
thank you Oafy you are really Great!!
Oafy the Great
Squire
posted 05-05-20 03:07 PM CT (US)     3 / 5       
@duyhung2h When you use display instructions for music, you aren't able to follow it up with more display instructions are you?
duyhung2h
Squire
posted 05-06-20 08:05 AM CT (US)     4 / 5       
@Oafy The Great I used display timer on my scenario. The dialogue could be a little harder to read, but it's a trade-off I'm willing to make.

My aspiring new creation for DE:
Gensokyo: Season of Calamity
El Nath (Winner of ZeroEmpires designer contest)
More are in the work...

[This message has been edited by duyhung2h (edited 05-06-2020 @ 08:26 AM).]

Oafy the Great
Squire
posted 05-07-20 01:56 PM CT (US)     5 / 5       
@duyhung2h Oh, I see. That's a difficult choice to make. Hopefully, they'll fix "play sound". I did get this reply from one of the developers on a steam thread:

"Currently, Play Sound works a bit differently from flat 2D playback. When no location is set, it will play the sound at the location of the map which coincided with the middle of your camera when the sound was set to play.
This was done to ensure that 3D-only sound events would still play correctly, but has an unintended side effect that long sounds that should continue playing are not handled as expected.
We are now tracking the issue and hope to address this in the future."
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames