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

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: TWC Tutorial: Everything related to Sound!
posted 06-25-07 09:55 PM EDT (US)   


Everything related to Sound!
by Hiawatha, the boring Iroquois




Hiawatha says: Yesterday, the white pigeon of peace told me to start working on a tutorial. It'll teach you everything related so Sound in Age of Empires III: Music, voice, AI's phrases. But STOP right now! You won't mod without these stuff:
  • Searched on Google and downloaded AoE3ED.
  • Read my List of Modding No-nos, that will tell you everything that you can't do when modding. Modding is an art, but it's limited: don't think higher than the pointed peaks of cold mountains.

    Extract the Aoe3ED files. It's a .zip. Put them in a folder easy to find. You'll get two programs:



    Archive Viewer is used to open .bar files, compressed AoE3's files, just like a .zip or a .rar. File Converter is used to convert from AoE3 file types to Photoshop/Notepad readable files and vice-versa.

    Hiawatha says: There are five file types that you must know, they are: .tga, .ddt, .xml, .xmb and .txt. TGA is an image, usually texture, that can be read and edited by Photoshop, but cannot be read by AoE3. It can be converted into a DDT by the File Converter. AoE3 reads DDTs. XMLs are the texts that contain all kinds of information, and we'll use them a lot when modding. It can be read by Notepad and AoE3. However, you won't find XMLs inside the .bar files, but XMBs, which are a compressed form of XMLs. They're smaller, but cannot be read by Notepad and must be converted into XMLs. TXTs are Notepad files, we may use them sometimes. AoE3 cannot read TXTs, so we need to convert them into XML. Easy task, just rename them:



    To convert a XML, XMB, TGA or DDT, you may open the File Converter and select the files or just drag them over the program's icon.

    Hiawatha says: AoE3ED is a very powerful tool and extremely easy to use. It reads .xml, .xmb, .ddt, .tga, .txt and .wav files. Before opening any file, activate the preview function, so you'll be able to preview the file you're selecting. This will make things easier, you won't need to extract XMLs anymore, just copy texts directly from AoE3ED.



    The most important .bar files we'll use are:

  • Sounds.bar and SoundXML.bar, found inside the sound folder.

    When modding, we'll always consider the main AoE3 folder, found inside Program Files\Microsoft Games\Age of Empires 3. So, don't make questions about the "My documents" folder or I'll get really sad.

    Hiawatha says: Time to work, the grass says. Let's learn everything related to Music. AoE3's songs are .mp3 files, and are located inside the Sound folder, found inside AoE3's main folder. However, putting a song there is not enough to the game play it. You need to extract a file called playlist.xmb found inside SoundXML.bar. Convert it into a .xml and open.

    Installing a new song to the game

    You need to edit playlist.xml or replace the default songs to make them play in the game.


    A view of playlist.xml


    In yellow, you see the ten songs that play during gameplay. To add a new song, all you need to do is to copy and paste the tags:<musicset name="Muptop">
    <file volume="1.0" mood="normal">Music\Standard\Muptop.mp3</file>
    </musicset>

    And edit them:<musicset name="Starwars Imperial March">
    <file volume="1.0" mood="normal">Music\Starwars\Imperialmarch.mp3</file>
    </musicset>

    Yellow stuff should be with yellow stuff: place your new tags with the yellow ones, or your song won't play correctly.

    Purple tags show songs that'll play during a battle (when attacking a trading post or a town center). The green tag shows the song that'll play in the post-game screen. The orange tag shows the song that plays when you win a game through revolution or trade monopoly. This is not present in the vanilla game. Lastly, the blue tag shows the song that plays when you lose the game.

    The songs not listed in this file, such as the intro song or the revolution! song, are not editable. You'll have to replace them. To do so, remove the old song and place the new one with the same name.

    Hiawatha says: This is the list of songs you must replace:

    Sound\music\interface\Credits.mp3 - the credits.
    Sound\music\interface\Noddinagushpa.mp3 - the main menu song.
    Sound\XPack\Music\Interface\Geddovmagushpa.mp3 - the main menu (x-pack).
    Sound\XPack\Music\Interface\DidntSeeItComing.mp3 - the credits (x-pack).
    Sound\XPack\Music\Strategy\Revolootin.mp3 - the revolution song.
    Sound\XPack\Music\Strategy\SomeOfAKind.mp3 - trade monopoly song.

    Hiawatha says: Now that we finished talking about music, let's talk about in-game sounds: the voices. When you create an unit, you'll notice it's completely mute. The only sounds you'll hear from it are the gunshots and the victory cry - this one cannot be changed, but can be replaced!. You must create a .xml file telling the game that your unit has a voiceset. To do so, open SoundXML.bar, choose a file (musketeer_snds.xmb for example), extract it, convert it, place in the Sound folder, rename it to myunit_snds.xml - It's essencial that you name this file correctly, using the name found in proto.xml. Then, open the file and rename this tag...<protounit name="Musketeer"> into this: <protounit name="Myunit"> I repeat, it's essencial that both names match! Otherwise, it'll not work. Open the game and you'll see your unit now has the soundsets of a musketeer.

    It's also possible to create your very new voiceset. Find a couple of .wav files, and using Windows' Sound Recorder, convert them to CD quality.

    File > Properties > Convert > CD Quality > OK


    Some .wav files won't play if not converted. Open SoundXML.bar and extract Soundsets.xmb. Convert it, place it in the sound folder, and open it. Copy and paste one of the tags. Edit it accordingly:<soundset name="BillyHolmeGrunt" volume="0.6000" maxnum="1" distance="1.0000">
    <sound filename="xpack\BillyHolmeGrunt1.wav" volume="1.0000"/>
    <sound filename="xpack\BillyHolmeGrunt2.wav" volume="1.0000"/>
    <sound filename="xpack\BillyHolmeGrunt3.wav" volume="1.0000"/>
    </soundset>
    ...into this:<soundset name="DarthVaderOK" volume="0.6000" maxnum="1" distance="1.0000">
    <sound filename="Starwars\vadersaysok1.wav" volume="1.0000"/>
    <sound filename="Starwars\vadersaysok2.wav" volume="1.0000"/>
    <sound filename="Starwars\vadersaysok3.wav" volume="1.0000"/>
    </soundset>
    Then, edit myunit_snds.xml to match the new voiceset.

    <soundtype name="Select"> - plays when an unit is selected.
    <soundtype name="Grunt"> - plays when an unit is hurt.
    <soundtype name="Death"> - plays when an unit is killed.
    <soundtype name="Creation"> - plays when an unit is created.
    <soundtype name="Acknowledge"> - plays when an unit is going to do something.

    Hiawatha says: There's also some sound reference in the unit animation files:<anim>
    Charge_attack
    <assetreference type="GrannyAnim"><file>animation_library\range\charge\cacadore_charge_attackA</file>
    <tag type="Attack">0.53</tag>
    <tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.42</tag>
    </assetreference>
    <component>ModelComp</component>
    </anim>
    <tag type="SpecificSoundSet" checkvisible="1" set="Swoosh">0.42</tag> This means that the soundset "Swoosh" will play 0.42 seconds after the unit starts attacking. Change it just like above.

    Hiawatha used to be a noob at modding, but after training a little, he saw how obvious things are. Let's take a deeper look at soundsets.xml:

    <soundset name="HC_CityAmbience5" volume="0.2500" maxnum="2" distance="1.0000">
    <sound filename="homecity\CrowdDinNoWater.wav" volume="1.0000"/>
    </soundset>


    In red, we see the name of the soundset you created. In blue, the volume (you do NOT need to change the volume of the file using a recorder) and in green you see from how far you're able to hear it.

    Hiawatha says: Hiawatha hugged a sheep and noticed that it says "baaah" every few seconds. You can change this by editing a file called ambientsounds.xmb found... you know where. Open it, put it... you know where and add tags if needed:<sound type="Pig" timemin="20" timemax="35" num="1" stereo="1">PigSelect</sound> This is important for any wild animal you create, it'll look more realistic.

    Hiawatha says: Do you want to edit an AI? So, he needs a voice that matches his personality. Let's turn Elizabeth into Darth Vader. Open a folder called AI (or AI2 if you got the x-pack) and find a file called elizabeth.personality. Open it. Change this... <chatset>elizabeth</chatset>into this: <chatset>gall</chatset>You can create your own voiceset, but I personally don't believe you want to record 427 dialogs for your new politician. Save the file, close it, then open My documents\my games\AoE3\AI and delete the elizabeth.personality file found there. Now, your Elizabeth has Gall's voice. Or you may record some real Darth Vader voices and edit AI/chatsets.xml, the file that contains all dialogs.

    Lord Tahattus - Register yourselves at the WotTA forum!
    WOTTA WEBSITE!
    War of the Triple Alliance Beta!
    Flags for new Civilizations, The Asian Dynasties, Knights and Barbarians and Napoleonic Era
    TWC Tutorials: Basics of Modding - The List of Modding No-nos - Adding a Nation - Music and Sounds - Initilization Failed

    WotTA back to active!

    [This message has been edited by Lord Tahattus (edited 06-25-2007 @ 11:41 PM).]

  • Replies:
    posted 06-25-07 10:13 PM EDT (US)     1 / 9  
    I dont know nothing about modding, and don't really care about sound, but i LOVE how you make this guides.

    With beautiful titles and beautiful images, creativity, they are great.
    i have read de modding no-nos although i didint understand nothing, your guides are just great, if you only wrote strategies..

    you are Great Lord Tahattus!

    [This message has been edited by Eicho (edited 06-25-2007 @ 10:14 PM).]

    posted 06-25-07 10:22 PM EDT (US)     2 / 9  
    OH MY GOD KISS ME NOW!

    *ermmm* Just kidding, of course, Argentines aren't my type!

    I'll also rework an old tutorial I did some time ago.

    Lord Tahattus - Register yourselves at the WotTA forum!
    WOTTA WEBSITE!
    War of the Triple Alliance Beta!
    Flags for new Civilizations, The Asian Dynasties, Knights and Barbarians and Napoleonic Era
    TWC Tutorials: Basics of Modding - The List of Modding No-nos - Adding a Nation - Music and Sounds - Initilization Failed

    WotTA back to active!

    [This message has been edited by Lord Tahattus (edited 06-25-2007 @ 10:35 PM).]

    posted 06-25-07 11:04 PM EDT (US)     3 / 9  
    I'm guesing it's the one on making a unit. Next up should be Gall...

    And I love this one, should be loads of help later on.

    "Arvy is randomly full of win." - Skarr
    |
    "I don't watch cartoons, those are for third class people." - Arvy
    "Yeah, children, those third class people." - Sails
    And because I bet Blatant he wouldn't be orange in two days and lost... HEIL BLATANT!
    posted 06-26-07 03:30 AM EDT (US)     4 / 9  
    Hiawatha hugged a sheep and noticed that it says "baaah" every few seconds.
    Haha!

    Nice tutorial, of course I already knew as good as everything, but hey!

    || argalius.elpea.net
    || Cherub at AoE3H
    || In honor of FlipBizcut
    || Mod: The Age of Crusades
    posted 06-26-07 07:06 AM EDT (US)     5 / 9  
    by Hiawatha, the boring Iroquois
    Why don't we learn Hiawatha English, so he can tell anyone he's bored?


    peugeot407

    |> Robert Faber (aka peugeot407)
    |> Humble Creator of: Knights and Barbarians, Danish Civ Mod, Several Tutorials and the Tutorial Database
    |> November 2007 Modding Contest: 2nd place (me: 360 pts, Captain_Soanso: 365 pts!)
    |> January 2008 Modding Contest: first place!

    When in doubt, flat out! (Colin McRae)
    posted 06-26-07 01:05 PM EDT (US)     6 / 9  
    Nice tutorial, of course I already knew as good as everything, but hey!
    Hey, I tought you how to add songs! :P
    I'm guesing it's the one on making a unit. Next up should be Gall...
    Yep, Gall and other Warchiefs (Huayna Capac, Cunhambebe...)

    Lord Tahattus - Register yourselves at the WotTA forum!
    WOTTA WEBSITE!
    War of the Triple Alliance Beta!
    Flags for new Civilizations, The Asian Dynasties, Knights and Barbarians and Napoleonic Era
    TWC Tutorials: Basics of Modding - The List of Modding No-nos - Adding a Nation - Music and Sounds - Initilization Failed

    WotTA back to active!
    posted 06-26-07 02:58 PM EDT (US)     7 / 9  
    Even if I already knew how to do this stuff, I've to agree - your tutorials are the best! I'll call you a profile neurotic, but it's not pejorative, you're doing your job very good.

    Photoshop r0xx

    » The Ancient Age | Napoleonic Era «

    » Modding is art! «
    posted 06-26-07 03:52 PM EDT (US)     8 / 9  
    Are you using Vista, by any chace, Lord Tahattus?

    "Arvy is randomly full of win." - Skarr
    |
    "I don't watch cartoons, those are for third class people." - Arvy
    "Yeah, children, those third class people." - Sails
    And because I bet Blatant he wouldn't be orange in two days and lost... HEIL BLATANT!
    posted 06-26-07 04:48 PM EDT (US)     9 / 9  
    Are you using Vista, by any chace, Lord Tahattus?
    No, too expensive. But yes, my XP pretends it's Vista
    Even if I already knew how to do this stuff, I've to agree - your tutorials are the best
    Thank you so much.
    Photoshop r0xx
    God invented it

    Lord Tahattus - Register yourselves at the WotTA forum!
    WOTTA WEBSITE!
    War of the Triple Alliance Beta!
    Flags for new Civilizations, The Asian Dynasties, Knights and Barbarians and Napoleonic Era
    TWC Tutorials: Basics of Modding - The List of Modding No-nos - Adding a Nation - Music and Sounds - Initilization Failed

    WotTA back to active!
    Age of Empires III Heaven » Forums » Modding Discussions » TWC Tutorial: Everything related to Sound!
    Top
    You must be logged in to post messages.
    Please login or register
    Hop to:    
    Age of Empires III Heaven | HeavenGames