I want to make a little sound mod that requires some scripting. It all started when I came across Carnithus' Armamentarium. It has a sweet script that changes the music upon entering the Armamentarium. Better yet, it also disabled the music when leaving the area, even through teleportation and such.
I believe the sound is one of the most importnant thing in any game and sadly gets over looked now days. Especially in Morrowind where its all about immersion. So I want to make a mod that will change the music for different locations, nice cheery music in taverns, mystical tones for the magic guild halls, creepy loops in daedric ruins... you get the idea.
I know there are mods that have attempted to do something like that. But I always found them to be either incomplete, corny, low quality or just too much of everything. I'd like to create my own for my own taste.
Alright, now first of all, I'm a complete newb when it comes to scripting, I've never written one in my life, but I understand the concept and all that, so I'm not completley desperate (yet), just never really tried.
Now looking at Carnithus' Armamentarium, I believe there are only 3 scripts regarding the music and they seem rather simple:
Begin _ar_crn_musicScript
if ( OnActivate == 1 )
"_ar_crn_carnithus"-> equip _ar_crn_myhead_1 1
"_ar_crn_carnithus"-> equip _ar_crn_myboots_1 1
"_ar_crn_carnithus"-> equip _ar_crn_mychest_1 1
"_ar_crn_carnithus"-> equip _ar_crn_mygauntlet_l 1
"_ar_crn_carnithus"-> equip _ar_crn_mygauntlet_r 1
"_ar_crn_carnithus"-> equip _ar_crn_mygreaves_1 1
"_ar_crn_carnithus"-> equip _ar_crn_mypauldron_l 1
"_ar_crn_carnithus"-> equip _ar_crn_mypauldron_r 1
StartScript _ar_crn_musicScriptGlob
Activate
endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Begin _ar_crn_musicScript_2
if ( OnActivate == 1 )
StreamMusic "Explore/mx_explore_1.mp3"
Activate
endif
End
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
begin _ar_crn_musicScriptGlob
short framecounter
float musictimer
if ( musictimer == 0 )
StreamMusic "ARM.mp3"
endif
set musictimer to ( musictimer + GetSecondsPassed )
if ( musictimer >= 480 )
set musictimer to 0
endif
if ( framecounter > 100 )
if ( GetPCCell, "Carnithus' Armamentarium" == 0 )
set musictimer to 0
StreamMusic "Explore/mx_explore_1.mp3"
StopScript _ar_crn_musicScriptGlob
endif
else
set framecounter to ( framecounter + 1 )
endif
end
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The last one looks especially interesting to me. You can see the line
StreamMusic "ARM.mp3"
this is the track that plays upon entering the Armamentarium. So I figure I'd just have to include new tracks and put their name between the " ".
The next thing that grabbed my attention is the following line:
if ( GetPCCell, "Carnithus' Armamentarium" == 0 )
Obviously thats the cell where we hear the music. My rookie senses tell me if I'd place, lets say, "Balmora, Guild of Mages" the track would play there ?
I've done that but it didn't work.
So what I need here is someone with more knowledge to tell me what I have to change to create sevral different tracks for different interior cells.
I learn best from examples. Lets stick with the Balmora Mage's Guild. Just write up all 3 scripts so it'd work for that location. I'll be able to figure the rest out by looking at the changes that have been made.
Cheers!