Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Tutorials => Topic started by: Eatos on October 25, 2012, 03:40:26 pm

Title: [TUTORIAL] Custom NPC
Post by: Eatos on October 25, 2012, 03:40:26 pm
Since the old guide is a bit broken and kinda useless i decided to write my own guide for this.The things we need for this task are:
   * WoW Model Viewer any version :)
   * Photoshop editor
   * Tallis
   * Blp to Png converter

First we will start by opening WoW Model viewer and creating our creature :)
Go to Characters->The Pick the race you want for your own creature
Next thing we gonna do is add equipment to it or well we can set his appearance: skin, hair, facial features and so on.
In this example i have chosen worgen male.
(http://www.essencegaming.org/Eatos/Patch/worgen.JPG)
And chose all equipments what do you want him/her to have.
(http://www.essencegaming.org/Eatos/Patch/worgen2.JPG)
Now before i export it I usually make a list and write displayids of the items i have chosen for his/her's equipment.
Next thing we need to do is to export a texture for our creature but before that write in a notepad displayids of the following items type: Shoulder,Cloak ,Weapons,Helm.
And Set them to none.
(http://www.essencegaming.org/Eatos/Patch/worgen3.JPG)

Now go to File->Export Model -> 3DS
and save it.You will see a .tga file open it in photoshop.Sometimes Model Viewer bugs when you export certain races but i have found a solution for it.
(http://www.essencegaming.org/Eatos/Patch/worgen4.JPG)
If you want to export or to create for example BloodElf but model viewer is not exporting it right. simple export any other race then search in bakednpctextures for a texture of already existing bloodelf and change heads! (Will explain this method later)
Then save it as .png
(http://www.essencegaming.org/Eatos/Patch/worgen5.JPG)

Now start Tallis and open CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc
Those 2 we will need to edit.
In CreatureDisplayInfo.dbc you are interested only in 4 fields.
field #0 - DisplayId
field #1 - Modelid
field #2 - Soundid
field #3 - ExtraDisplayInfo

-In field1 you need to add exact modelid of your creature: If you have chosen Human for your base your modelid would be either 49 or 50 depending on the gender.
In my case i have chosen Worgens which are custom therefor my modelid is also custom.If you dont know what modelid is for your creature you can always find it out by going to CreatureModelData.dbc and first field represent your modeldid
So for my worgen modelid is 5005(male), 5006(female)
Moving on.
In field#2 i leave it blank and in filed#3 i put a unique number such as for example 21407.
And this is how should it look when you first edit CreatureDisplayInfo.dbc
(http://www.essencegaming.org/Eatos/Patch/worgen6.JPG)

Now lets start editing CreatureDisplayInfoExtra.dbc
But first to define fields:
field0 - id ( The number from field3 in CreatureDisplayInfo - in our example 21407)
field1 - race id of your creature in our example again it is my custom value and it is 26
field2 - gender 0 male , 1 female
filed3 - Skin Color
field4 - Face Type
field5 - Hair Type
field6 - Hair Style
filed7 - Beard Style
field8 - Helm (displayid)
field9 - Shoulder (displayid)
field10 - Shirt (displayid)
filed11 - Chest(displayid)
field12 - Belt (displayid)
field13 - Legs (displayid)
field14 - Boots( displayid)
filed15 - Rings (displayid)
field16 - Gloves (displayid)
field17 - Wrist (displayid)
field18 - Cape (displayid)
field19 - CanEquip ( 1 - if you do .morph in this creature you will be able to see all other of your equipments , or 0- for not)
field20 - Texturename

Now all these informations you can gain from Model Viewer.
Skin as you can see is 0
Face type  = 1
Gender = 0
Hair color = 3
Hair style = 1
facial feature = 4
Helm - 59184
Shoulder - 60505
Shirt - 0
Chest - 59128
Belt - 0
Legs - 0
Boots - 0
Braces - 0
Gloves - 39644
Wrist - 0
Cloak - 58988
(http://www.essencegaming.org/Eatos/Patch/worgen7.JPG)
(http://www.essencegaming.org/Eatos/Patch/worgen8.JPG)

Now save those .dbc files and close Tallis.
Now drag your saved .png files onto blp converter and convert it to .blp
(http://www.essencegaming.org/Eatos/Patch/worgen9.JPG)
Now it is time to patch it all.
Download Ladik MPQ
and create new patch
we will need first to create new folder call it DBFilesClient and put in there CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc
Then Create another folder name it Textures-> Inside it create new folder name it BakedNpcTextures and in that folder place your converted .blp file.
(http://www.essencegaming.org/Eatos/Patch/worgen10.JPG)


Now On TC there are sometimes problems when you are creating new creatures especially with new models, keep that in mind you need to fill 2 tables creature_template and creature_model_data

Now place CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc in your server dbc folder too and if you have done everything right your creature should appear fine

(http://www.essencegaming.org/Eatos/Patch/WoWScrnShot_102512_153356.jpg)
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on October 25, 2012, 06:59:48 pm
Nice. Will try this.
Title: Re: [TUTORIAL] Custom NPC
Post by: LordAres on January 02, 2013, 06:13:04 am
What MPQ are these in CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc
Title: Re: [TUTORIAL] Custom NPC
Post by: Ascathos on January 02, 2013, 03:34:14 pm
Quote from: "LordAres"
What MPQ are these in CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc
All .dbc files in pre-cataclysm are within local files.
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on January 03, 2013, 12:40:42 pm
@LordAres

Modcraft tutorial part 2. Extracting clien tfiles :)
Title: Re: [TUTORIAL] Custom NPC
Post by: Sentinel on January 21, 2013, 04:15:23 am
Thanks for great tutorial. I made my own NPC, but I have a problem with body. There are stripes on it. What's the problem? And sorry for my English, I'm russian.
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on January 21, 2013, 10:08:01 am
I think converter problem.Install shellExtention or convert back to see if its included in your backed BLP file.
Title: Re: [TUTORIAL] Custom NPC
Post by: Sentinel on January 21, 2013, 11:17:20 am
I almost forgot. I see this if I stand not far from NPC. But If I stand closely NPC became normal. Like on this screen.
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on January 21, 2013, 11:44:00 am
Try with other BLP converter. Use version 6 for test.
Title: Re: [TUTORIAL] Custom NPC
Post by: Sentinel on January 21, 2013, 12:12:58 pm
viewtopic.php?f=59&t=800 (http://modcraft.io/viewtopic.php?f=59&t=800" onclick="window.open(this.href);return false;)
I used this. Now It's all OK. Thanks =)
Now I must to make a model fot Lord and Mage Vampires for my new Instance =)
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on January 21, 2013, 12:25:45 pm
I use BLPConverter6. Its included in my tutorial pack. Works also fine for me.

Here are 2 for Maruum i converted with it.

(http://imagr.eu/up/50fd259c8be238_WoWScrnShot_012113_122456.jpg)
http://imagr.eu/up/50fd259c8be238_WoWSc ... 122456.jpg (http://imagr.eu/up/50fd259c8be238_WoWScrnShot_012113_122456.jpg" onclick="window.open(this.href);return false;)
Title: Re: [TUTORIAL] Custom NPC
Post by: Fidena on February 24, 2013, 01:06:46 pm
How come when I export the model from Model Viewer, it comes out as a .3ds file, not a .tga?
Title: Re: [TUTORIAL] Custom NPC
Post by: Ascathos on February 24, 2013, 03:02:37 pm
Quote from: "Fidena"
How come when I export the model from Model Viewer, it comes out as a .3ds file, not a .tga?

Depends on version I assume. But you should get both, a .tga and a .3ds.
Title: Re: [TUTORIAL] Custom NPC
Post by: Fidena on February 24, 2013, 03:53:06 pm
Well  I got it to work, which is progress, definitely.

However, I have this problem now:

(http://i.imgur.com/pebsGBt.jpg)

I can't get the hair or tabard to work through CreatureDisplayInfoExtra.dbc

Edit: I got the tabard to work by switching the model, but I can't get the hair to work. I had to disable hair when I exported it, and when I try to enter the hair on the DBC, it has no effect in-game.
Title: Re: [TUTORIAL] Custom NPC
Post by: Amaroth on March 18, 2013, 02:23:03 pm
Quote from: "Fidena"
Edit: I got the tabard to work by switching the model, but I can't get the hair to work. I had to disable hair when I exported it, and when I try to enter the hair on the DBC, it has no effect in-game.
Field "Wrist" (18*) in CreatureDisplayInfoExtra.dbc is not for adding wrist displayID, there is a mistake, its used for tabard. Put  there any displayID of tabard, for instance 6255 worked fine for me.

About ANY hair/beard problems:
1) check if you have right race ID (1 for human, for another check ChrRaces.dbc)
2) check if you have gender ID (its MOSTLY 0 for male and 1 for female, but for instance for BE its switched)
3) check your fields 6, 7, 8*.:
#6 - hair STYLE, not color, in WmV its ordered like "hair color, hair style, facial featrure, in DBC are color and style SWITCHED
#7 - hair COLOR, see #6
#8 - facial feature (beard, piercings,...)

I hope I was helpful.

*For MyDBCEditor, which means ID column is marked as 1., not as 0.
Title: Re: [TUTORIAL] Custom NPC
Post by: MR. Farrare on July 25, 2013, 05:21:26 am
Quote from: "Ascathos"
Quote from: "Fidena"
How come when I export the model from Model Viewer, it comes out as a .3ds file, not a .tga?

Depends on version I assume. But you should get both, a .tga and a .3ds.

is there a way to export 3ds in new modelveiwer

SRRY I DID BY EDID ANOTHER PHOTO NOW I CAN CREATE A NPC WHITH MOP ITEM YAY
Title: Re: [TUTORIAL] Custom NPC
Post by: Steff on July 25, 2013, 09:54:58 am
Use X3D export and then the generated Texture with added _1.
Its the same and works. 3ds crash often the client.
Title: Re: [TUTORIAL] Custom NPC
Post by: MR. Farrare on July 25, 2013, 02:36:51 pm
Quote from: "Steff"
Use X3D export and then the generated Texture with added _1.
Its the same and works. 3ds crash often the client.

ty i did it but not like that i did the hard way by deleting an old 3ds image and replace it whith the X3D image lol
Title: Re: [TUTORIAL] Custom NPC
Post by: Tuskeh on April 23, 2014, 06:10:09 pm
I've been playing around with trying to create a Custom NPC for a while now, and I've not had any luck. Whenever I create a new NPC, the hair doesn't work; it shows, but it is completely untextured. I've done everything to the letter as far as I'm aware, and I don't know what to do to fix this. Any suggestions would be appreciated.
Title: Re: [TUTORIAL] Custom NPC
Post by: Tuskeh on April 23, 2014, 06:25:45 pm
Quote from: "Tuskeh"
I've been playing around with trying to create a Custom NPC for a while now, and I've not had any luck. Whenever I create a new NPC, the hair doesn't work; it shows, but it is completely untextured. I've done everything to the letter as far as I'm aware, and I don't know what to do to fix this. Any suggestions would be appreciated.

Welp, I solved the problem - the BLP converter was rubbish. I replaced it with the one in the tutorial section, and it worked great.
Title: Re: [TUTORIAL] Custom NPC
Post by: NewGotham on April 24, 2014, 06:15:01 am
It's worth keeping this handy:

In the creature_template database, ModelID refers to creaturedisplayinfo.dbc
Column 3 in CreatureDisplayInfo.DBC is the entry in CreatureDisplayInfoExtra.DBC.
The entry in CreatureDisplayInfoExtra.DBC determines clothing, geosets and skin/textures.

That means every unique combination you make is going to require two DBC edits and two database entries (creature_template and creature_model_info for the bounding box).

However, if you're making custom textures (and really, who isn't?), it's infinitely worth it to have a few dozen (if not hundreds of) custom NPCs with unique textures on unique combinations instead of just making copies under creature_template and renaming them.
Title: Re: [TUTORIAL] Custom NPC
Post by: Ariuss on May 25, 2014, 01:42:00 pm
Well got a kinda funny problem. I've made everythingh (right in my opinion) but still texture in game didn't changed.
CreatureDisplayInfo.dbc - [attachment=2:t4vpyouv]CreatureInfo.jpg[/attachment:t4vpyouv]
CreatureDisplayInfoExtra.dbc - [attachment=1:t4vpyouv]CreatureInfoExtra.jpg[/attachment:t4vpyouv]
MPQ file - [attachment=0:t4vpyouv]MPQ file.jpg[/attachment:t4vpyouv]
Title: Re: [TUTORIAL] Custom NPC
Post by: Valkryst on June 04, 2014, 05:04:22 am
Just a quick note. None of the images in the OP seem to be working.
Title: Re: [TUTORIAL] Custom NPC
Post by: Tuskeh on July 01, 2014, 06:12:39 pm
I'm having a problem with the hair again - I can't get it textured in game. The armor works, the skin works, the hair is just untextured. I've tried everything I can possibly think of - dozens of different BLP converters, converters that go straight from TGA to BLP, different ModelViewers. I've gone over the DBC edits over and over again and I can't find any errors. I just keep getting the hair problem. Do you folks have any suggestions? It's driving me insane.