Author Topic: NWN - Dubbing NPC with your own recording...possible without hakpack?  (Read 984 times)

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0


               

Hi guys,


 


I want to add optional audio files that I recorded so players could listen (and not just read) what the NPC is saying where they are conversing with one. 


 


The most important thing for me is that those sounds would be optional to download. If the player doesn't download them, he can still play just won't be able to hear my recording. 


 


Can I do something like that, and if so, how?


 


 


 


 


-NWN fanatic since 2002


Hardcore Role-Play fan



               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #1 on: December 27, 2014, 02:18:00 pm »


               

I'm not 100% sure, but I think if an audio file (other than BMU music) is missing there is no error message, so it should be possible to add optional NPC sound sets. This might not work without a hak though. You could make a hak with an empty file in it that those who don't want to use the sound sets can download and one of the same name that has all those sound files. I'm pretty sure that sound files don't work at all if they are not in a hak.


The recordings need to have a certain bitrate or they won't play. The information is in the CC-Guide and/or the NWN Omnibus.


Once you have all the sound files with the correct bitrate added by a hak you can select those sound files from a tab in the dialog editor.


               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #2 on: December 28, 2014, 05:59:23 am »


               

If its just soundtracks used in a conversation, then you can add them using the override folder. Just make certain that you use a unique naming convention to ensure no conflicts with existing sound files. If you create a new voice set however, that would require a hak.



               
               

               
            

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #3 on: December 31, 2014, 07:55:58 am »


               


If its just soundtracks used in a conversation, then you can add them using the override folder. Just make certain that you use a unique naming convention to ensure no conflicts with existing sound files. If you create a new voice set however, that would require a hak.




 


Well, I made a BMU file through the MP3 to BMU converter...I put that file both in my NWN/music folder and in my NWN/overrride folder. Then I went to Conversation editor -> Other actions -> Play Sound...and couldn't find the file. I simply wrote the name of that file and clicked "Play" but heard nothing. What am I missing here?


               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #4 on: December 31, 2014, 02:18:47 pm »


               


Well, I made a BMU file through the MP3 to BMU converter...I put that file both in my NWN/music folder and in my NWN/overrride folder. Then I went to Conversation editor -> Other actions -> Play Sound...and couldn't find the file. I simply wrote the name of that file and clicked "Play" but heard nothing. What am I missing here?




Music files have to be converted to bmu and placed in the music folder. They are for the background music, not for sounds or voice sets. Those have to be wavs of a certain bitrate to be played, if the bitrate is wrong you can probably select them, but won't hear anything.


Also I'm not sure if you can really have sounds in the override folder. Admittedly all the custom sounds I've used so far were for sound effects and not for NPC voices, but I don't see why they'd be any different. I had to have my sound files in a hak for them to work.


 


If you want to add some music it has to be in the music folder instead of a hak and you have to add it to the ambientmusic.2da or you won't be able to select it.


               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #5 on: January 02, 2015, 12:25:43 am »


               

Audio for npc's is stored in the override directory.


 


I do this myself.


I distribute the audio files as mp3 (because its got a good compression) - smaller downloads


Then I use ffmpeg on client side to convert to uncompressed wav - in order to make them work in nwn client.


               
               

               
            

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #6 on: January 05, 2015, 04:14:03 pm »


               

Not sure how I understand how ffmpeg works with NWN. Do you mind writing in more details about how you integrate them?


 




Audio for npc's is stored in the override directory.


 


I do this myself.


I distribute the audio files as mp3 (because its got a good compression) - smaller downloads


Then I use ffmpeg on client side to convert to uncompressed wav - in order to make them work in nwn client.




               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #7 on: January 07, 2015, 08:47:52 pm »


               

Its not so much integrated with nwn.


My players download a custom application I wrote.


 


It downloads mp3's from my website - which contain the voices / audio files to play during conversation or just sound effects etc


 


Since MP3's are smaller in size than wavs' - its a good form of compression for downloads.


When the download is completed - the same application extracts ffmpeg from itself - and then calls ffmpeg on command line to tell it to convert the mp3 file into a wav file.


 


This is the command line arguments I use


 


string args = "-i \"" + FullPathToFile + originalfile + "\" " + "-y -ac 1 \"" + FullPathToFile + sName + ".wav\"";


 


I do this in C# so you just need to take into consideration that some of that line are variable names, and the whole line is being supplied to ffmpeg.exe


 


This converts mp3 to wav


 


Note: 45 seconds of wav can be about 3-4 mb.


the same file as an mp3 can be as little as 200-300 kb


 


mp3 is more ideal for distributing audio files than just as a the plain wav files



               
               

               
            

Legacy_Alice24

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
NWN - Dubbing NPC with your own recording...possible without hakpack?
« Reply #8 on: January 08, 2015, 04:10:57 pm »


               

Ah, thank you for the explanation. Though, if it requires downloading a special application then I'm thinking to might as well make a hakpak.