Aller au contenu

Photo

NWN - Dubbing NPC with your own recording...possible without hakpack?


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Alice24

Alice24
  • Members
  • 19 messages

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



#2
Zwerkules

Zwerkules
  • Members
  • 1 318 messages

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.



#3
kalbaern

kalbaern
  • Members
  • 824 messages

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.



#4
Alice24

Alice24
  • Members
  • 19 messages

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?



#5
Zwerkules

Zwerkules
  • Members
  • 1 318 messages

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.



#6
Baaleos

Baaleos
  • Members
  • 1 322 messages

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.



#7
Alice24

Alice24
  • Members
  • 19 messages

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.



#8
Baaleos

Baaleos
  • Members
  • 1 322 messages

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



#9
Alice24

Alice24
  • Members
  • 19 messages

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.