Ground effects, music and additional things
THIS TUTORIAL IS UNDER CONSTRUCTION
Part 1. Ground effects
Ground effects is the essential thing for most maps to make them look complete. They are basically small autoplaced doodads (models) that are bound to a certain texture in an .adt file. Most often they are used for creating grass, small shrubs, stones and other clutter on the ground. In this tutorial we will learn how to add existing ground doodad sets to your maps and how to create new ones.
Step 1. Creating a new ground effects set
Basically, every ground effects set consists of 4 detail doodad models and a bunch of various setting configuring their appearance in the game. They are stored in "World/NoDXT/Detail/" folder of your client and can be viewed in WoWModelViewer.
So, pick up any 4 models that work well together and write down their file names somewhere.
Those are the ones I picked up:
Now we need to find the model ID for each model in GroundEffectDoodad.dbc. If the model is not listed there, we will have to add it.
Open "MyDBCEditor" in "Tools" folder of WoWDevKit.
Search for "elwgra01" and write down the number of the string which is going to be our ID.
If the search function does not find anything, you need to add a new line to the end of the table.
So, for me it is:
- elwgra01.mdl is 4
- elwgra02.mdl is 5
- elwgra03.mdl is 6
- elwflo01.mdl is 1
Now open the GroundEffectTexture.dbc, go to the end of the file and create a new string. Write down its ID somewhere, we will need it later.
Fill the string with your data according to the following pattern:
- Coloumns 2-5 (red) stand for model IDs we figured out before.
- Coloumns 6-9 (blue) define the amount of time each paticular doodad appears in a group.
- Coloumn 10 (green) controls the groundeffect density of this group. In most cases 24 is an optinal value, but you can actually experiment with some values like 0, 1, 2, 4, 8, 16, 24, 48, 128. Though, after 24 doodads show up in a kind of weird way.
- Coloumn 11 links to TerrainType.dbc which control different additional effects like footstep sound, dust or snow particles appearing while walking and so on.
Step 2. Injecting ground effect data.
Make a backup of your map files and copy the ADTs to the following folder:
- Launch "groundeffects.bat".
You will see the following CMD windows which pops up for every .ADT located in that folder. It asks you for groundeffects ID you want to apply for each texture that the ADT contains. So, apply the ID of the set we created to your grass texture, for example. In order to skip the texture type in "-1" and press "Enter". Type in "0" if you don't need any set applied at all.
- Run the "groundeffects_fix.bat" in the same folder after you are done with the previous step.
- Move the new files to your patch or working directory.
Part 2. AreaID.
AreaIDs are basically DBC string values that get written to the chunks of an .ADT and are resposible for showing up the zone name in the game and some other zone related things. So we are going to learn how to both create a new AreaID entry and how to assign it to your map as well.
Step 1. Creating a new AreaID entry.
- Extract the latest "AreaTable.dbc" from the latest locale patch and open it with MyDBCEditor.
Create a new empty line in the end of the file and write down its ID.
Write in your MapID from Map.dbc into the coloumn number 2.
Coloumn 3 is a link to the parent area. For example, if your newly created area is located in Kalimdor it should link to the AreaID of Kalimdor in this same table.
- Coloumn 4 should better stay as any unique number but not bigger than 4500.
- Coloumn 5 contains different flags which are explained on our wiki.
- Coloumns 6-10 stand for various music settings we are going to talk later.
- Coloumn 11 defines the zone level. (Level of a character required for the zone being explored).
- Coloumn 12 contains the name that shows up in the game.
- Everything else is not necessary to know at first, but you can read about it on our wiki.
- Coloumn 3 is a link to the parent area. For example, if your newly created area is located in Kalimdor it should link to the AreaID of Kalimdor in this same table.
Step 2. Assigning AreaID to your map.
AreaIDs can be painted with Noggit. In order to do that. Switch to the AreaID painter mode by selecting it on the toolbar or pressing "5" on your keyboard.
Press "X" in order to reveal the AreaID selector. Now you will see a windows full of different entries. Those are all AreaIDs that exist in the game and are currently loaded by Noggit. Select any AreaID and paint it on the ground by holding "Shift + LMB". Save the work and go in game to test it.
Part 3. Music
The picture below shows the connections between the DBC we will have to edit in order to assign music to a zone.
Open all those DBCs (AreaTable.dbc, SoundAmbience.dbc, ZoneMusic.dbc, ZoneIntroMusicTable.dbc, SoundEntries.dbc) in MyDBCEditor or an other editor you prefer to edit DBC tables with.
In order to add any type of music to your zone, the AreaID to which you assign the music should be "painted" on .ADTs as well. Otherwise, your changes won't affect anything.
At first we will learn how to add ambience to a zone.
- Go to "SoundEntries.dbc"
- Go to the end of the table and memorize the ID of the last string.
Right click on any line and select "Copy line to" in the dropdown menu. Enter the new string ID (last used ID + 1). Do it twice (create two new strings for day and night ambience).
Do steps #4 - #14 for both day and night entries.
- Change the value of coloumn #2 in both string to "50" which stand for the ambience sound type.
- In coloumn #3 enter any description of your sound you want.
- In coloumn #4 you should enter the name of your sound file with an extension (e.g. "MyAwesomeTrack.mp3"). No path here! Only the file name. Coloumns #5 - #13 can stay empty for now but you can read about their usage in our wiki.
- Coloumns #14 - #23 should contain the value "1".
- In coloumn #24 we enter the folder path to your music file (e.g. Sound\Ambience\Custom). You should not have a backslash (\) in the end of the value!
- Coloumn #25 controls the sound volume. Most ambience sounds are set to "0.69" by default.
- Coloumn #26 is responsible for sound flags. Set it to "0" for now, but you can read the information about them on the wiki.
- Coloumn #27 defines the minimum sound distance. In most cases Blizzard use "8.0" value.
- Coloumn #28 defines the maximum sound distance. In most cases Blizzard use "45.0" value.
- Coloumn #29 adds EAX for the sound reflection and realistic feeling. Set it to "0" for now.
- Coloumn #30 should stay as "0".
Write down the IDs of both strings and save the table.
- Switch to "SoundAmbience.dbc"
- Create a new string in the end of the file. Write down its ID somewhere.
- Fill in the day ambience ID from SoundEntries.dbc to coloumn #2.
- Fill in the night ambience ID from SoundEntries.dbc to coloumn #3.
Write down the ID of the string and save the table.
- Switch to "AreaTable.dbc"
- Find your AreaID string and fill in the SoundAmbienceID into coloumn #8.
- Save the table.
- Go to "SoundEntries.dbc".
Create two strings for day and night as we did with ambience. Everything works exactly the same except for some differences that I will list below.
- Coloumn #2 should contain the value "28" which stand for the "BackgroundMusic" soundtype.
- Coloumn #24 is responsible for the volume. Mostly Blizzard uses "0.6" for music entries.
Coloumn #28 should be set to "2".
- Switch to "ZoneMusic.dbc".
- Create a new string.
- In coloumn #2 enter any name you would like and understand.
- Set coloumns #3 and #4 to "180000", coloumns #5 and #6 to "300000".
- Enter the ID from "SoundEntries.dbc" for the day music.
Enter the ID from "SoundEntries.dbc" for the night music.
- Switch to "AreaTable.dbc".
- Find your AreaID string and fill in the ZoneMusicID into coloumn #9.
- Save the table.
- Open "SoundEntries.dbc".
Make only one string for the intro music using the same settings as for zone music we assigned in the previous step.
- Switch to "ZoneIntroMusic.dbc".
- Create new string.
- Type in any name into coloumn #2.
- Type in the SoundEntriesID to coloumn #3.
- Type in the value "1" into coloumn #4
- Type in the value "60" into coloumn #4.
Save the table and write down the ID of the string.
- Switch to "AreaTable.dbc".
- Find your AreaID string and fill in the ZoneIntroMusicID into coloumn #10.
- Save the table.