lfnetwork.com mark read register faq members calendar

Thread: Changing Music
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 03-24-2005, 08:10 PM   #1
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
Changing Music

TSL is supposed to be a much darker game than KOTOR, and has some very dark music. The only problem is that the dark music isn't used enough. What I want to do is:

Replace the music of the first two areas in Onderon with the Dxun music.

Replace the area with Dhagon Ghent's and the Cantina's music with the Harbinger music.

Replace the Ravager bridge music with the Darth Nihilus theme music.

Replace the Royal palace music with the Sith tomb music.

Replace the Khoonda planes, Khoonda, and Enclave courtyard music with the Sith music.

Replace the music from the area on the Harbinger where you meet Sion with the Sion's theme music.

Replace the Enclave sublevel music with the Sith music.

Replace the Trayus Core music with the Kreia's dark theme music.

How can I do this? It'll give TSL a much darker feel.


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 03-24-2005, 10:12 PM   #2
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
No answers? I'd really like to do this.


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 03-25-2005, 07:46 PM   #3
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
NO ANSWERS!?


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 03-26-2005, 06:49 AM   #4
Lundquist
 
Lundquist's Avatar
 
Join Date: Dec 2002
Location: the world's oldest kingdom
Posts: 171
I think a way to do it is to first rename the extension of musicfiles in the streammusic folder to mp3 (then they can be played without just hearing static) to find out the names of the musicpieces.
then when you've found the name of the music pieces you want to change you just rename them.
e.g. if we say darth Nihilus theme is mus_nihilus and the nameof the music played on the ravager is mus_sith, you just rename mus_nihilus to mus_sith - ofcourse you might want to rename a copy of mus_nihilus, so that there will still be a mus_nihilus file.

Hope this makes sense, I'm very tired as I write this, which tends to make my english kind of groggy.
Lundquist is offline   you may: quote & reply,
Old 03-26-2005, 10:41 AM   #5
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
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.


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 03-26-2005, 02:38 PM   #6
Lundquist
 
Lundquist's Avatar
 
Join Date: Dec 2002
Location: the world's oldest kingdom
Posts: 171
Oh, now I see the bigger problem. Yes it would replace the music on the enire ravager - assuming that it is the same music playing, which I can't remember if it is.
Sorry, with that I can't help you.
Lundquist is offline   you may: quote & reply,
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,
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,
Old 03-26-2005, 03:40 PM   #9
Xcom
k_ai_master
 
Xcom's Avatar
 
Join Date: Dec 2001
Location: scripts.bif
Posts: 1,011
Well, you explained it in greater detail anyway.

I just remembered that editing GIT file is somewhat undesired because of cameras . The GFFEdit will corrupt Camera Entries, so you'll need to use tk102 camedit tool to reimport original camera data. If you don't do that, most cinematics (if there are any) will be messed up.

Also, maybe it's possible to simply change the entries in ambientmusic.2da. Don't know if they are uniquely used though.

Xcom is offline   you may: quote & reply,
Old 03-26-2005, 03:52 PM   #10
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 Xcom

Also, maybe it's possible to simply change the entries in ambientmusic.2da. Don't know if they are uniquely used though.
Doing that would have the same effect as renaming the sound files though, changing the music for all areas using that particular track and not just the one you are interested in. Unless I misunderstand what you meant...
stoffe is offline   you may: quote & reply,
Old 03-26-2005, 04:26 PM   #11
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
Quote:
Originally posted by Lundquist
[B]I think a way to do it is to first rename the extension of musicfiles in the streammusic folder to mp3 (then they can be played without just hearing static) to find out the names of the musicpieces. B]
What do you mean? Should I just add mp3 to the names of the music?

Quote:
Originally posted by Xcom
[B] There are following commands available

*edited for space*

B]
AAAAAAHH! SCRIPTING! *hides in a corner* F**k, looks like I'll have to settle for Nihilus music on both Ravager areas. Ah, well. It would suit the ship more anyway.


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 03-26-2005, 07:03 PM   #12
Emperor Devon
36 Wings, 365 Eyes
 
Emperor Devon's Avatar
 
Join Date: Oct 2004
Posts: 5,479
Current Game: Ass Effect
Contest winner - Fan Fiction 
Quote:
Originally posted by Lundquist
I think a way to do it is to first rename the extension of musicfiles in the streammusic folder to mp3 (then they can be played without just hearing static) to find out the names of the musicpieces.
then when you've found the name of the music pieces you want to change you just rename them.
e.g. if we say darth Nihilus theme is mus_nihilus and the nameof the music played on the ravager is mus_sith, you just rename mus_nihilus to mus_sith - ofcourse you might want to rename a copy of mus_nihilus, so that there will still be a mus_nihilus file.

Hope this makes sense, I'm very tired as I write this, which tends to make my english kind of groggy.
I did that, but there is one problem: I replaced the music in the Khoonda planes with the Sion theme music, but when I load the level, it plays the Khoonda and Sion music at the same time. Is there any way I can fix this?


Quote:
Originally Posted by Sabretooth
We will be great failures one day, you and I
Emperor Devon is offline   you may: quote & reply,
Old 01-31-2013, 09:42 AM   #13
dmmm123
Rookie
 
Join Date: Jan 2013
Posts: 11
I have a question regarding the MusicDay and MusicNight tracks, if I may.
Let me explain my situation first.

I entered a few custom songs into the list in ambientmusic.2da, and then I copied and renamed the tracks to the "streammusic" folder. I extracted each and every one of the .GIT files for the levels and changed the values for the MusicNight tracks, leaving the MusicDay values alone. The delay when repeating the same track, or when changing between tracks was too long for me, so I set the MusicDelay values to 0 in every .git file. The results were:
1. All of the custom tracks work, and there are no camera problems.
2. There is no delay when changing tracks, either from MusicDay to MusicNight and vice-versa, or from the area track to the MusicBattle track and vice-versa, which is what I wanted anyway.
3. The MusicNight track for the area ALWAYS PLAYS FIRST, when entering/loading an area, and it repeats at least 5-6 times before it switches to the MusicDay track for the area.

My question is: Is there a way to control how many times the MusicDay/MusicNight track repeats before switching to the alternate track? I'd like to set it to NOT repeat at all, just play once and switch to the next track, and for the next track to switch back after playing once. I'm not that good with scripting, so If the solution is somewhere in the .nss file, I need some help.
dmmm123 is offline   you may: quote & reply,
Old 01-31-2013, 08:37 PM   #14
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 537
Current Game: Master of Orion 2
Helpful! 
Show spoiler


This is purely abstract theory, so take it if you think it'll help you. When I opened a map file for map editing in KT(after downloading it from the site, which is no longer up. Use Deadlystream.com) a while back, I found an option that set how long a "game hour" is in real-time minutes. I am going out on a limb here and will say that your night track is "X" minutes long(where "X" is an unknown number) and there are six times as many minutes available during a night cycle. And whether the module starts in day/night time is in the .IFO, .ARE, or .GIT files, if I were to guess.

Now a scripting solution you might examine is the PlaySound function and a counter, like this:

Show spoiler


Then use the with ExecuteScript() for the module load script.


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!

Last edited by Fair Strides 2; 01-31-2013 at 08:39 PM. Reason: Added a comment
Fair Strides 2 is offline   you may: quote & reply,
Old 02-01-2013, 05:21 AM   #15
dmmm123
Rookie
 
Join Date: Jan 2013
Posts: 11
Thank you for all the help. I'll try to get it to work somehow.
dmmm123 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Changing Music

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:40 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.