This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TUTORIAL] Custom NPC Greetings  (Read 7653 times)

fellfoxen2

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
[TUTORIAL] Custom NPC Greetings
« on: May 08, 2012, 03:49:35 am »
[center:2bft6105]Remember when you first entered the gates of your capital city and found the faction leader?
Must of been a shame if you was a human; Bolvar Fordragon had a regular human voice  :lol:[/center:2bft6105]
This tutorial is about adding custom greeting/farewell/stoppokingme voices to a custom NPC.

You will need:
~ Some voices.. audio files etc for your NPC.
~ A DBC editor. Taliis is recommended.
~ Three DBC files: SoundEntries.dbc, CreatureDisplayInfo.dbc and NPCSounds.dbc
~ A server emulator to create and test out your custom displayID. (ArcEmu is used here)
~ A bit of strength, stamina and intellect. Drink some Red Bull and get buffed up.

RIGHT! First we must obtain some audio files. You can either record your own voice; steal some off another source or just use placeholder sounds. It doesn't matter, as long as you have audio files!
Once you have all the audio files; ensure that they are named correctly. You have to split your audio between 'greeting', 'farewell' and 'pissed'. My NPC doesn't have a farewell voice, so you may have to envision this yourself.

[center:2bft6105][/center:2bft6105]

Once you have your files; Put them in a folder somewhere within your project directory.
Ex: SoundCreatureCustomcustom_test-1.wav etc etc

Now comes the most integral part of the process. Open your DBC editor and open NPCSounds.dbc, CreatureDisplayInfo.dbc and SoundEntries.dbc...

[center:2bft6105][/center:2bft6105]

First of all, open SoundEntries.dbc and prepare to edit. Copy a row and follow these steps:
Column #1 is simply the ID for your audio. Change it to 20020 or another number.
#2: the type of audio. Change this to 17.
#3: the string which describes the audio. To edit this, click on 'Strings' and notice the bar at the top. Enter your desired descriptive name and click the green + button. Then copy the #offset number and paste it into column 3.

[center:2bft6105][/center:2bft6105]

#4: the string which is the name of the actual audio file. Once again, go into strings and add this.

[center:2bft6105][/center:2bft6105]

#5: every column after #4 is extra space to add extra audio files. Go into strings and add your audio files, then paste the #offsets into those columns.

[center:2bft6105][/center:2bft6105]

Now you must skip to column #23. Once again, we have another string offset. You must edit this to the filepath of your audio files. Go into strings once again and add the filepath.

[center:2bft6105][/center:2bft6105]

Column #24 is the volume of the audio. I have changed it to 1.0, however it is up to you.
Column #26 is the distance of the audio. Keep this the same.
Column #27 is similar to above. Keep it the same unless you feel experimental.
Same applies for the last two columns.

You must repeat these steps for the pissed and farewell sounds.  :twisted:

[center:2bft6105][/center:2bft6105]

Once you have completed this, you must go into CreatureDisplayInfo.dbc. Once again; copy a row from there. Now - my NPC is Stormwind guard with a unique voice; so I have copied the displayID of a Stormwind guard. Choose what you copy carefully. There are guides on this forum which tell you how to create your own NPC with customized armour etc.

Change the ID to 40000 or something similar and then skip straight to column 12. This column points to NPCSounds.dbc and holds the information for your NPC voices. Go into NPCSounds.dbc...

Once again; copy a row and begin editing.

Column #0 is the ID. Change it to 700 or whatever.
#1: the greeting sounds. Enter the ID of your greetings sounds from SoundEntries here.
#2: the farewell sounds. Same as above but with a different ID.
#3: the pissed sounds. Same as above.

[center:2bft6105][/center:2bft6105]

Go back into CreatureDisplayInfo and add the ID of your custom voice to the column.
Save all of your DBC files and create an MPQ with both the voices and the DBC files within.

AT LAST! We have created a 'custom' displayID with custom greeting/farewell sounds! /CHEER!  :D

Now you must implement an NPC into your server's database so we can test that this works correctly.
If you have basic knowledge of how it all works; then this should be a walk in the park.

I use websites like Wow-V to create custom NPCs. When you are in the process of creating your NPC; ensure that it's displayID is the same as the custom row you made in CreatureDisplayInfo (in my case; it was 40000).

Start up your server, make sure your MPQ patch is in your Data folder and start up Wow!
Now: go into your server and spawn your NPC. For ArcEmu this is .cr sp 40000 (in my case).

Once your NPC is spawned, click on him/her and you will hopefully hear your custom audio!

[center:2bft6105]SUCCESS!  :D[/center:2bft6105]

I will add a video of my custom NPC soon.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Eluo

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 509
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #1 on: May 08, 2012, 12:01:33 pm »
Nice tut!

Even though i like taliis i'd recommend using MyDbcEditor:
viewtopic.php?f=59&t=782

As you can edit strings in there directly,so if you spelled something wrong you can simply overwrite it again^^

Another intresting thing would be if this is compatible with a cinematic camera.
To if we could use something like the cinematic camera to build up a scene and combine it with sound.

That would be really cool, but i guess the cinematic camera thing is another thing to be solved :/
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
One is a genius, the other\'s insane!

fellfoxen2

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #2 on: May 08, 2012, 05:02:04 pm »
[spoiler:1rufc43d]
Quote from: "Eluo"
Nice tut!

Even though i like taliis i'd recommend using MyDbcEditor:
viewtopic.php?f=59&t=782

As you can edit strings in there directly,so if you spelled something wrong you can simply overwrite it again^^

Another intresting thing would be if this is compatible with a cinematic camera.
To if we could use something like the cinematic camera to build up a scene and combine it with sound.

That would be really cool, but i guess the cinematic camera thing is another thing to be solved :/
[/spoiler:1rufc43d]

Interesting that you should mention cinematic cameras; as I am in the process of writing a tutorial for them :P

I'll take MyDBCEditor into account :D thanks
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Eluo

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 509
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #3 on: May 08, 2012, 06:27:07 pm »
Awsome! :D
So did you test it already? The combination of voiced npcs and cinematics?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
One is a genius, the other\'s insane!

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #4 on: May 08, 2012, 07:54:42 pm »
This is in the wrong category, this has nothing to do with server side modding.

I already wrote a tutorial on cinematic sequences with sound / music. It is called the wiki.
http://wowdev.wiki/index.php?tit ... Camera.dbc -> 3.

Also, as you might remember from that private project, own cinematics are possible and have been done.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #5 on: May 08, 2012, 08:14:06 pm »
What would be needed for this are own new m2 cams.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #6 on: May 08, 2012, 08:30:44 pm »
Which are also possible and exist.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

fellfoxen2

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #7 on: May 08, 2012, 11:39:13 pm »
[spoiler:37ofl88b]
Quote from: "Eluo"
Awsome! :D
So did you test it already? The combination of voiced npcs and cinematics?
[/spoiler:37ofl88b]

Yeah; I've tested it. I took the human narration (in the Wow Alpha there was just the narration :D)  and put some new music under it. I have yet to record voices etc etc.

I don't know too much about making custom m2 cameras. I've tested different cameras on different maps and ofc I can see where a custom one would be completely necessary.

I also wasn't expecting to be the first person to do this. xD yay wiki
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #8 on: May 09, 2012, 08:28:47 am »
Which are also possible and exist.

Exist but there is 0 documentation and everyone i asked cant help. And yes I also asked you :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #9 on: May 09, 2012, 07:21:03 pm »
Quote from: "Steff"
Which are also possible and exist.

Exist but there is 0 documentation and everyone i asked cant help. And yes I also asked you :)
Documentation: M2 file, camera, animation block. Fully existent documentation, complete.

I even wrote a generator which took coordinates and assembled a simple camera animation from that. Nothing hard, based on the documentation.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #10 on: May 09, 2012, 08:45:05 pm »
Yes and I asked your for this converter :) So if you find somewhere ...
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TUTORIAL] Custom NPC Greetings
« Reply #11 on: May 10, 2012, 10:36:41 am »
Quote from: "Steff"
Yes and I asked your for this converter :) So if you find somewhere ...
It is faster and will fit your specific problem better, when rewriting it. Faster than me searching for that thing. It really is nothing more than taking point a and a list of points bi, then doing bi -= a. Then write the camera block with bi and set the cinematic camera to position a in the dbc.

That's it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »