Thread: Changing Music
View Single Post
Old 03-26-2005, 03:13 PM   #8
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally posted by Emperor Devon
Thanks. But one thing - if I replace the Sith music on the Ravager bridge with the Darth Nihilus music, would that replace all the Sith music on the other area of the Ravager? I don't want to do that.
The music an area plays is set in the properties of that area. To change it, find the area code of the area/module you wish to change, and open that under the RIM-->Modules category in KotorTool.

For example, to change the bridge of the Ravager, open 852NIH.rim. Under the "Dynamic Area Info" heading, extract the GIT file there, in this example 852nih.git.

Open the GIT file with a GFF Editor, find the catecory called "AreaProperties". Under that category there are three fields to modify. MusicDay and MusicNight is the ambient music played while exploring. MusicBattle is the track played when in combat. The numbers here refer to the row index in the ambientmusic.2da file. To use Nihilus theme set the value to 4.

Note however that it is somewhat risky to modify GIT files since they are not always uniquely named. If you edit one with a name that is used in several RIM files and put it in the override folder, things will probably break, badly.

It's probably safer to change this via scripting instead, if you know how to modify scripts in a module. This script example would change the ambient music track to the Nihilus theme in the current area:

Code:
void main() {
	object oArea = GetArea(GetPartyLeader());
	
	MusicBackgroundStop(oArea);
	MusicBackgroundChangeDay(oArea, 4);
	MusicBackgroundChangeNight(oArea, 4); 
	MusicBackgroundPlay(oArea);
}
The number 4 in the script above also references the row index in ambientmusic.2da, where 4 is Nihilus theme. Since KotOR has no Day/Night transitions, set both to the same value, just to be safe.

The naming conflict thing might apply to area scripts as well though. They are not always uniquely named so be careful when you override them.

EDIT: Too slow. What Xcom already said.

Last edited by stoffe -mkb-; 03-26-2005 at 04:00 PM.
stoffe is offline   you may: quote & reply,