Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: Tuskeh on February 08, 2014, 07:30:04 pm

Title: MPQ Editing - Instance Music?
Post by: Tuskeh on February 08, 2014, 07:30:04 pm
Hey guys, quick - and probably stupid - question.

I'm trying to edit some music for my 3.3.5a Arcemu server, and for all of the outside zones I'm having no issues. However, I want to start editing music for instances - specifically, the Sunken Temple. I can't seem to find an MPQ file containing the music I want to edit. Any suggestions? Thanks!
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 08, 2014, 09:12:27 pm
You're probably having trouble with Sunken Temple because it is a WMO. It has its own music rather than inheriting the zone music. I don't know how to change this though. I tried hex edit and a notepad search and couldn't find anything related to .mp3, .ogg, or .wav in the WMO file. I imagine the music might be designated in another file but I"m not sure.
Title: Re: MPQ Editing - Instance Music?
Post by: Tuskeh on February 09, 2014, 12:51:36 am
Quote from: "Xapzi"
You're probably having trouble with Sunken Temple because it is a WMO. It has its own music rather than inheriting the zone music. I don't know how to change this though. I tried hex edit and a notepad search and couldn't find anything related to .mp3, .ogg, or .wav in the WMO file. I imagine the music might be designated in another file but I"m not sure.

Thanks for the response. I've started looking through DBC files for anything that might help, but so far I've had no luck. Even if I found something suggesting a Sunken Temple sound file in the DBCs, I'm not sure what I could do to edit it. I'm not the most experienced tinkerer out there, but I'd have thought that the actual music files for WMOs would be in some sort of MPQ file.
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 09, 2014, 04:58:33 am
You should be able to find the sound files in the MPQs if you know what the names are. But Idk how to find that out.
Title: Re: MPQ Editing - Instance Music?
Post by: Filipsons on February 09, 2014, 05:07:23 am
Check AreaTable.DBC (export from enUS/enGB locate.mpq)
more info about this DBC here: http://www.pxr.dk/wowdev/wiki/index.php ... aTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=AreaTable.dbc" onclick="window.open(this.href);return false;)
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 09, 2014, 06:14:45 am
You also have to edit this table.
http://www.pxr.dk/wowdev/wiki/index.php ... aTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=WMOAreaTable.dbc" onclick="window.open(this.href);return false;)
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 09, 2014, 06:17:05 am
Quote from: "Filipsons"
Check AreaTable.DBC (export from enUS/enGB locate.mpq)
more info about this DBC here: http://www.pxr.dk/wowdev/wiki/index.php ... aTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=AreaTable.dbc" onclick="window.open(this.href);return false;)
No, it won't work. All the DBCs should be exported from the last locale file. If you have 3.3.5a it should be patch-enGB-3.mpq to export from.
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 09, 2014, 06:47:10 am
Quote from: "Skarn"
You also have to edit this table.
http://www.pxr.dk/wowdev/wiki/index.php ... aTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=WMOAreaTable.dbc" onclick="window.open(this.href);return false;)
I actually checked that table, and found the IDs for Sunken Temple. There are no sound entries in there. It's all 0's
Title: Re: MPQ Editing - Instance Music?
Post by: Tuskeh on February 09, 2014, 07:54:55 am
Thanks for all of the responses.

I've extracted the areatable from patch-enUS-3.MPQ, and I've found the Sunken Temple (and the Temple of Atal'hakkar, which is its name in-game). According to the posted link to the AreaTable.dbc, columns 9 and 10 are the zone music and zone intro music.

However, these do not pertain to any specific files - in the case of the Sunken Temple, Column 9 is "3" and Column 10 is "0". I don't really have much experience in editing DBC files (I can, naturally, convert them to and from CSV and change some zone names, but that's about it), so do you guys have any suggestions for how to change the music?
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 09, 2014, 09:27:28 am
It can be an iRefID (ID from another DBC file) from ZoneMusic.dbc or something else. But I guess you need not just AreaTable.dbc but WMOAreaTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php ... aTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=WMOAreaTable.dbc" onclick="window.open(this.href);return false;)) because SunkenTemple map doesn't have any adts (it consists only of one wmo model). So, it cannnot have the usual AreaID (I doubt now because you had found some entrys on that, but I have some ideas how it can work). That's why you also have to look at WMOAreaTable.dbc (Coloumn 11 is an iRefID to AreaTable.dbc (now we know what was stored in that table in SunkenTemple string). Coloumns 8 and 9 there are the IDs of ZoneIntro music and ZoneMusic iself. So, you have to take these IDs and look to the following DBC files to learn filenames: http://www.pxr.dk/wowdev/wiki/index.php ... cTable.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=ZoneIntroMusicTable.dbc" onclick="window.open(this.href);return false;)  and http://www.pxr.dk/wowdev/wiki/index.php ... eMusic.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=ZoneMusic.dbc" onclick="window.open(this.href);return false;) These files contain iRefIDs to SoundEntries. dbc (http://www.pxr.dk/wowdev/wiki/index.php ... ntries.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=SoundEntries.dbc" onclick="window.open(this.href);return false;)). Here you can finally get your filenames.  :)  Sorry, the post is a bit messy and can be wrong in some aspects. I'm not a very good DBC editor :)
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 09, 2014, 10:35:09 am
While yes, your method does lead to the track that plays on the Sunken Temple map (109), it still doesn't explain the separate tracks that play throughout the WMO instance in different locations. Using your method, there's only one iRefID to be found in WMOAreaTable.dbc for Sunken Temple and that is 1477. If traced back to the AreaTable/SoundEntries it all boils down to za_zulaman_amb10.mp3, and that's not the music inside the instance. It only plays on the outside of the instance. For example if I use the .gps and .go commands to teleport outside, that's the only time the music starts to play.
Title: Re: MPQ Editing - Instance Music?
Post by: schlumpf on February 09, 2014, 11:05:13 am
Please note that a WMO has multiple entries in WMOAreaTable.dbc: One entry with root_id set and group_id being -1 and many entries with root_id and group_id set.
To find out which piece of sound is to be played, the client first looks for (root_id, group_id) of the WMO and group WMO it is in, if there is no entry, it takes (root_id, -1).
Like this, there can be different music per group WMO, explaining why the entry you found is only heard outside of any group WMO (i.e. outside).
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 09, 2014, 11:27:45 am
Yeah schlumpf, I noticed there were a lot of duplicate entries. But still they all have the same iRefID in Column 11. =
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 09, 2014, 11:12:33 pm
Yes, because it's their "parent" iRefID from AreaTable.dbc. It will be the same for all entries of this WMO. You should just look to 8 and 9 coloumns of WMOAreaTable.dbc. This way you can track the filenames.
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 09, 2014, 11:55:50 pm
Quote from: "Skarn"
Yes, because it's their "parent" iRefID from AreaTable.dbc. It will be the same for all entries of this WMO. You should just look to 8 and 9 coloumns of WMOAreaTable.dbc. This way you can track the filenames.

For WMOAreaTable, columns 8 and 9 are empty for me. The WoW dev wki also says they're unknown columns.
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 10, 2014, 07:13:01 am
Look to the structure below.
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 10, 2014, 07:16:30 am
Quote from: "Skarn"
Look to the structure below.
Looks like you were right. Turns out there are two Sunken Temple .wmo files that I hadn't realized. One has the wmo ID 1329 and the other is 1330. The latter is the only one with any ZoneMusic entries in column 8.


So, to Tuskeh, the song files that you're looking for are in the MPQs under the following:

Lair of the Chosen - SoundMusicMusical Momentsbattlebattle02.mp3

The Pit of Sacrifice - SoundMusicMusical Momentsbattlebattle06.mp3

Chamber of the Dreamer - SoundMusicMusical Momentsbattlebattle05.mp3


(These ones are only for the outside of the dungeon I think)

The Temple of Atal'Hakkar (Day) - SoundMusicZoneMusicSoggyPlacesoggyplace-zone2.mp3

The Temple of Atal'Hakkar (Night) - SoundMusicZoneMusicSoggyPlacesoggyplace-zone1.mp3


(These ones have no specified music)

Hall of the Cursed
The Pit of Refuse
Hall of Serpents
Sanctum of the Fallen God
Hall of Bones
The Broken Hall
Chamber of Blood
The Butchery
Hall of Ritual
Hall of Faces
Den of the Unholy

If you want to put music into any of the unspecified zones I think you're gonna have to edit WMOAreaTable.dbc and ZoneMusic.dbc. Some of them are listed under wmo ID 1329 and others are under 1330. Really I'm not sure what's going on with that. Just remember column 8 in WMOAreaTable.dbc references the ZoneMusic.dbc entry. And columns 7 and 8 in ZoneMusic.dbc reference the soundtracks specified in SoundEntries.dbc. Column 7 is for days, column 8 is for nights.

Also if you ever decide to do this for another wmo or instance you're gonna have to use 010 Editor to find the wmo IDs.
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 10, 2014, 08:56:36 am
Yeah, that's exactly what I ment. It should work properly, However, there also should be an AmbienceID but I don't know how to define it yet.
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 10, 2014, 09:00:29 am
Ambience is defined in column 7 which points to SoundAmbience.dbc. :)
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 10, 2014, 12:06:13 pm
Yeah, you're right.
Title: Re: MPQ Editing - Instance Music?
Post by: Tuskeh on February 10, 2014, 01:52:32 pm
Thanks very much guys! I really appreciate all of the work you've done to figure this out. You've saved me a hell of a lot of hassle.
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 10, 2014, 02:20:24 pm
So, it works?  ;)
Title: Re: MPQ Editing - Instance Music?
Post by: Tuskeh on February 10, 2014, 02:53:38 pm
I'll try it out later on today, once I get home.
Title: Re: MPQ Editing - Instance Music?
Post by: Steff on February 11, 2014, 07:01:45 am
Would be nice if this working group experience would lead to some tutorial :)
Title: Re: MPQ Editing - Instance Music?
Post by: Milly on February 11, 2014, 07:12:59 am
Quote from: "Steff"
Would be nice if this working group experience would lead to some tutorial :)
Soon I hope to start making lots of Cataclysm tutorials :) You can do almost anything in Cata that you could in WotLK and I wanna help share that knowledge. Hopefully that will encourage others to move on to 4.3.4. Plus there's more to explore!
Title: Re: MPQ Editing - Instance Music?
Post by: Skarn on February 11, 2014, 11:43:16 am
Yes, I was thinking about creating some tutorials. I will look at it when I have enough time.
Milly, that's great. I'm using 4.0.0 11927 Cata alpha as a base for my project but I'm thinking about moving to 4.3.4? I would be very happy if you make a tutorial on this.