Thread: Changing Music
View Single Post
Old 03-26-2005, 03:09 PM   #7
Xcom
k_ai_master
 
Xcom's Avatar
 
Join Date: Dec 2001
Location: scripts.bif
Posts: 1,011
I think there are a few ways of doing it.
1. You need to unpack <modulename>.git (Dynamic Area File) for a specific area, look at AreaProperties and change its MusicDay, MusicNight values. Those values point to a rownumber in ambientmusic.2da. Then you need to repack all this back into a rim file. It's not a good idea to dump GIT into Override.

2. I *think* you can also do that with scripts.

There are following commands available
Code:
// 425: Play the background music for oArea.
void MusicBackgroundPlay(object oArea);

// 426: Stop the background music for oArea.
void MusicBackgroundStop(object oArea);

// 427: Set the delay for the background music for oArea.
// - oArea
// - nDelay: delay in milliseconds
void MusicBackgroundSetDelay(object oArea, int nDelay);

// 428: Change the background day track for oArea to nTrack.
// - oArea
// - nTrack
void MusicBackgroundChangeDay(object oArea, int nTrack, int nStreamingMusic = FALSE);

// 429: Change the background night track for oArea to nTrack.
// - oArea
// - nTrack
void MusicBackgroundChangeNight(object oArea, int nTrack, int nStreamingMusic = FALSE);
I think you utilize OnEnter script for certain area and start the music you want. Not 100% sure, but I'm guessing it will probably override the defaults in the GIT file. The good thing if that it works, you can simply put the scripts in Override folder.

Xcom is offline   you may: quote & reply,