Author Topic: NPC themes  (Read 543 times)

Legacy_Parteloc

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
NPC themes
« on: July 13, 2014, 09:55:44 am »


               

Hi!


I'm new to this forum, but not totally new to NWN building. I've been working on my single player NWN module for about six months now. For every problem I've encountered, I've found a solution from either this forum, the NWN vault or from one of the tens of tutorials out there, but there is one issue for which I can't find any helpful material at all. 

 


The issue is, I would really like to add theme music to some of my NPCs (namely henchmen), that would start during the dialogue. Sort of like it works in the official campaign when talking to Aribeth or Aarin Gend. I would like to use my own music not any of the themes included in the original campaign.


 


I do know how to add placeable sounds and area background music, but I've got no idea how to add a custom theme song to a character. Can anyone please give me any advice on this?



               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
NPC themes
« Reply #1 on: July 13, 2014, 02:44:10 pm »


               

Go to the root of the conversation of the NPC that should have a theme. Then select the "Current File" tab and enter a script like this for "Normal" and "Aborted":


 


#include "NW_I0_PLOT"

#include "NW_I0_GENERIC"


void main()

{

    PlayOldTheme();

    WalkWayPoints();

}

 


-------------------------------------------------------------


 


The WalkWayPoints(); is just an example for an NPC that will resume walking waypoints after the conversation is ended.


 


In the "Actions Taken" tab of the first line of conversation enter a script like this:


 


#include "nw_i0_plot"


void main()

{

   PlayCharacterTheme(79);

}

 


----------------------------------------------


The 79 points to a line in ambientmusic.2da where you can add entries for your own music which has to be a bmu-file.


Simply renaming the file extension of an mp3 file to bmu might work for converting mp3 to bmu, but there is also a program that will convert mp3 to bmu which you can find at http://neverwinterva...utility-package



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
NPC themes
« Reply #2 on: July 13, 2014, 03:17:23 pm »


               

Maybe you can also use the Other Actions tab where is play sound button, but that does play onle short sounds...



               
               

               
            

Legacy_Parteloc

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
NPC themes
« Reply #3 on: July 14, 2014, 05:57:42 pm »


               

Zwerkules, you just made my day! It works exactly like you said it would. Thanks a million!