Setting music tracks for a new area
(original thread for discussion: http://www.lucasforums.com/showthread.php?t=153072 )
The values you need to set are in the module's .GIT file's AreaProperties structure
The AmbientSnd fields (day and night) are indices into ambientsnd.2da
Here we see that the sound specified for both is "204tel Ambient Bed".
Here the default model is specified.
Here we see that "Citadel Station" is specified for day and night music, and "Citadel Station Battle" for the battle music.
Changing music in an area or during a certain event
( this post summarizes the discussion of this thread: http://lucasforums.com/showthread.php?t=150387 )
1. Adding your custom track to the game:
It is as simple as adding a line to ambientmusic.2da and dropping the new track in .mp3 format in the streammusic folder. It is also possible to replace an existing track. (more details to come)
2. Changing the ambient music and battle music tracks in an area:
It is possible to edit the .git file of an area as described above by Fred Tetra with K-GFF (make sure you are using this gff editor made especially for Kotor and TSL as other editors will corrupt the file) and repack the module with Kotor tool's ERF builder. However, this method is considered overkill when not creating a custom area but simply editing an existing area. When editing the music of an existing area, we recommend using scripts.
(example by stoffe -mbk- )
The numbers you specify are indexes in the ambientmusic.2da file (for both ambient and combat music).
You can use those functions to set the ambient and battle music to play the same track in the AreaEnter script or somewhere else suitable. Note that using the AreaEnter event will only change the music until the first battle finishes: after the battle, the music will revert back to the original area tracks.
To avoid reverting back to the old tracks, a script like this one could be inserted in the OnHeartbeat event of the area:
(example by Darth333)
3. Changing the music temporarily during a cutscene or other event:
The music played during a cinematic can be specified in the AmbientTrack field of the .dlg or using a script. If you modify the sound file, the music should change in the cinematics as well.
Here is a sample script that will change the music after 3 seconds and revert back to the original track after 45 seconds:
Want to go fancy and add some fade in/out effect during your cutscene?
Here is an example provided by stoffe -mbk-
You'd have to tweak the timing for when the music stops manually, since there is no way of checking in a script if the music has stopped yet.
|All times are GMT -4. The time now is 08:12 PM.|
Powered by vBulletin®
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2015 - All rights reserved.