sábado, 7 de julio de 2012

Tutorial 04: How to add your own music

Today we will see how to add music to our map. To do this, we have to use the "sound layer" in the world editor.


This tool allows us to "paint" a zone of the world and, when the player enter in that zone, an effect will be showed. The "Layer" tool is used for six differnet effects:
   - Fog/Lighting: With this type of layer is possible to add fog to a zone and to change the intensity and the color of the light.
   - Name Layer: This is used to determine the name of the zone. When the player enters in the layer, the name will be showed in the screen.
   - Boss Layer: It seems that this layer is obsolete. I think that originary was used to add a sound effect when a boss appears, but now that functionailty is covered in the Quest Editor.
   - Day/Night Cycle: This layer is used to affect the normal day/night cycle of the game.
   - Bloom Layer: This layer is used to add a "bloom" efect. This is, to add a blinding light.
   - Sound Layer: The one that i will explain in this tutorial.

When we create a sound layer, we have three options:


   - Ambient Music: This is the music that will sound in background in some places. Note that normally the game doesnt have background music. The music only should be used in determinated zones, to increase the tension, for example.
   - Ambient Sounds: These are the sounds that you can hear in background. Like the farm sounds, the sing of the birds, the wind over the trees, etc.
   - Event Music: Event Music is played if you enter a sector for the first time. After that the music is only played again, if you restart the game.

When you click in the button at the side of each type of layer, the editor will show the music explorer and you can select the music or ambient sound that you want.



In this explorer you can find all three types of sounds, so you can search in these folders depends on what kind of sound you need:
   - sounds/ambientpak/: In this folder there are the ambient sounds.
   - sounds/musicpak/*random: In this folder there are the music files.
   - sounds/musicpak/*event: In this folder there are the event sounds.

As you can see, all these files are DBR files. As we saw in the previous tutorial (Tutorial 03: Introducción a los ficheros DBR) all the objects, including sounds, that you place in the world editor are defined as a DBR files.

If you want to use the standard sounds and musics, with this you have enought. But, well, if youre creating a new mod, the funny is to add your own music. So, the first thing you must do is to import an existing DBR file in the Art Manager to add in it your own music.


To do this, follow the next steps:

  1. Open the Art Manager
  2. Import records/sounds/ambientpack/(choose pak) (for example it would be records/sounds/ambientpak/ambgrassland.dbr)
  3. Import records/sounds/sounds/musicpack/(location event)/(musicpak) for example records/sounds/musicpak/greekevent/grkeventhelostheme.dbr
  4. Import one more record records/sounds/musicpak/(location random)/(musicpak) for example records/sounds/musicpak/greekrandom/grassland01mpakgrk.dbr
  5. Build / (F7)
  6. Exit out of Art manager and open Editor
  7. Open your mod
  8. Select the region you want to add the music to and open in Editor mode
  9. Select the area painter (I forget the exact name for it, it's the one in the middle with the red yellow green and blue shapes in it)
  10. For Layer, choose sound layer
  11. Click on new and change default style name to something more descriptive
  12. Click on the elipsies next to the Ambiant music box
  13. In the window that opens choose the ambiant music file you imported to the database (if this window is blank something went wrong with the import and build)
  14. Do the same for Ambiant sound and Event music boxes
  15. Follow current procedures to save and build mod or maps.
  16. Play test, if all went well you should hear some music.


Only one important note. When you import the files in the stes 2, 3 & 4, do not move the DBR files from the folder that the system created. I know that in the tutorial about DBR files i said that you can organize your folders as you want. Well, this is an exception. If you move these DBR files, the world editor will now show them.

With this, we have our own DBR files that will add to our mod. But first we need to import our own music. To do this, we need to follow the next steps:


  1. In Art Manager, Sources Tab right click in the folder list area (left side) on the top item (modename)/sources and choose Create Folder
  2. Name your new folder something painfuly obviously for your sanity (I.E. InGameMusic)
    • Note: Do not name the folder "Sounds" or "Music" by itself
  3. On the right side right click and choose import.
  4. Browse your way to the .mp3 or .wav that you want to use.
  5. Click on on open.
  6. Right click on your now imported file and choose Auto-Create Asset
  7. Repeat until all the files you want are imported.
  8. Build
  9. Your music/sound files should now be avaiable for use in the sounds and music type Database records.
The last step is to include our imported MP3 or WAV file into our own DBR files. When we open the DBR files in the art manager, the most important fields are the following:

Ambient Sound
   - enableNightSounds: If 1 (true) the night parameters are used during nighttimes. Otherwise only the other sounds are used.
   - ambientLoop + volume: Base ambientLoop and Volume
   - frequentSound parameters: A ll noises that are heard often.
   - moderateSound parameters: All noises that are heard not so often.
   - uniqueSound parameters: All noises that are played only once.
   - night parameters: All noises that are played during night time.

Ambient Music
That DBR has a base (drone) theme and the melody files. The melody files are played randomly and always parrallel to the Drone music. You can select only a drone theme and clear the melody selections, but not otherwise.

   - randomizeMelodies: Really i dont know.
   - drone parameters: The drone is the base theme of the music.
   - melody parameters: One melody at a time is play parallel to the drone music.
   - percussion parameters: ?




2 comentarios:

  1. ¿Cuáles crees que son las dos mejores especializaciones para el personaje en el Titan Quest (sin mods y de momento ni immortal throne) y en qué orden?
    ¿Para un guerrero con qué otra especialidad lo acompañarías ?

    ResponderEliminar
    Respuestas
    1. Bueno, una de las mejores cualidades del Titan Quest es lo bien balanceado que está y que no hay una especialización claramente mejor que otra.

      No obstante, Sueño es muy buena y combina bien con casi todas las otras.

      Si tienes Guerra, puedes combinarla con defensa para hacer un "tanque" casi inexpugnable, aunque un poco aburrido de jugar. Mi primer personaje combiné Guerra con Tierra, que es una combinación divertida de jugar porque combina el cuerpo a cuerpo con magia de fuego.

      Eliminar