Forum > Tutorials

[TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)

(1/5) > >>

Jack:
Particles and Ribbons still missing


This tutorial is suited for the creation of objectcomponent-items: helmets, shoulderpads, weapons, shields - items with an external model file without collision and mostly without animation.
This tutorial does NOT include the creation of geoset related texturecomponent items!

Difficulty:
Intermediate

Tools used:
-3dsToM2.exe
-Autodesk 3ds Max 2010
-Attachmentadder.exe
-M2Modder.exe
-Milkshape 3D
-Photoshop CS3
-WotLK Model Viewer
-WoWImage.jar




1. The Model
You've managed to create your own model and texture using one of the thousand tutorials out there? That's great, now I'm going to show you how to get this model ingame!




1.1. Reference Model
First of all you'll need a reference model in order for your model to be the right size compared to the player model.
Open up Model Viewer and navigate to the Human Model ("CharacterHumanMale") or whatever Reference Model you'd like to use.
With it showing click on "File -> Export Model Snapshot" and save it as .ms3d extension, since the other ones seem to be broken.





Model Viewer now exports the model with its UVs intact and the used texture files to your preferred location.
Start up Milkshape 3D and open the newly created reference model. Go to "File -> Export -> Autodesk 3DS" in order to save the model as a file format 3ds Max can handle easily.



In 3ds Max you can now choose to import this reference model and using the scale tool you can size your item down to fit the reference model in size.






1.2. Correct Rotation



Using my RotationHelper.png it should be easy for you to rotate your model correctly. Something you shouldn't forget either is that the center of the document (where the fat black lines cross) is equal to the attachment point on the model, so make sure to line your item up right so it fits the model afterwards.




1.3. Export Option[/size]
In order to be able to export the model right you need to transform all polygons to triangles (this will have no negative effect on your UV maps or textures, don't worry if you haven't done it up to now)
The easiest way to convert all polys to tris is using the "Subdivide" Modifier. Apply it to your model and use an enormously big value as size. I use 100000 most of the time.



Once this is done and your desired item object is selected simply go to "File -> Export Selected" and save it as a .3DS file. In the upcoming window make sure to have the check on preserving the texture coordinates.

Jack:
2. Conversion
In order to work for the client your model and texture need to be converted to World of Warcraft file types, such as .blp (texture) and .m2 (model).




2.1. Converting the Texture[/u]
Open the texture file in photoshop and go to "Image -> Mode" and make it 8bit Indexed Color.



Go ahead and save this texture file as .png and the texture's done.
In the window where you are able to choose between Interlaced and Without go without.
Open WoWImage.jar ,take the .png file and drag&drop it onto the "Encode" field.






2.2. Converting the Model[/u]
In case you'd like to have animated texture please read "3. Animated Texture" first!
The next thing you want to do is convert the model. First of all create a new directory very close to your c: root in order to have a short directory path. I use "C:c" most of the time.
Into that directory drop your model file (.3ds) as well as the 3dstoM2.exe and go to "Start -> Run" and enter "cmd" in the popping up window and you should get to the command prompt.



Now enter "cd c:" and hit enter, "cd X" where X is your conversion directory, in my case it's "cd c".
Still in the command prompt enter "3dstoM2 filename.3ds filename.m2 filename00.skin" where filename is your model file name.
Now you just enter the number of textures your model uses, their texture paths, texture types (on items this is actually of the time "0") and texture flag ("0" if you don't want animated texture).



For further information of flags and types see http://madx.dk/wowdev/wiki/index.php?title=M2/WotLK

Jack:
3. Enchantment Attachmentpoints
This is an optional step, you do not have to do this in order for your item to work. It's just that enchantments won't be visible (they still do have an effect on the stats though!)
Every item has got enchantment attachmentpoints for the enchantment visuals to be located at. You have to create those manually using the Attachmentadder.exe.
Just drag&drop the .m2 file onto the .exe and it'll start.
Now you have to add 5 attachmentpoints with the IDs "0" to "4". The Bone is always "0" except if you would have converted it using the MDXtoM2 tool with working animation, but since this tutorial covers only 3dstoM2 your model will not have any animation other than texture animation.
Now comes the tricky part: the x, y and z value. Go back to 3dsMax into your .3DS file (right before conversion), the one that is correctly scaled and rotated.
Now create a very, very small dummy box (all sides 0.01 big) and move it to the place where you'd like your attachmentpoint to be. You can now simply copy the x, y and z value of the center of this cube into the attachmentadder.exe like this:

Jack:
4. DBC Changes
Grab a hold of the ItemDisplayInfo.dbc because now you need to add a DisplayID for your new model so it can be used in the Item SQL DB.
It should be pretty easy to stick to http://madx.dk/wowdev/wiki/index.php?title=ItemDisplayInfo.dbc but I'll briefly explain the steps needed for an item anyways.
As "ID" you choose something you will remember and something that is still available. This is going to be your DisplayID.
For every objectcomponent item you only have one model - except for shoulders. So just add the model and texture path for the "left" (column 2 and 4) and ignore the right ones - except for shoulders, you add the model and texture path of the right shoulder pad there and the left one on the "left" stuff obviously.
Column 6 "Icon" refers to the path of the Icon .BLP so make sure to set this one as well.
Every other Column can be left blank or set to 0 for any regular objectcomponent Item. (In case you want sounds you can play around with Column 13)




5. Add to Patch
Now it's time to add the data you created to a patch. Here's a quick overview of the files you have to include in this patch - figure out how to create a patch in another tutorial. The items in brackets ( ) are for shoulders only, which required two different (for example mirrored) models.
ItemModel.m2
(ItemModelTwo.m2)
ItemTexture.blp
(ItemTextureTwo.blp)
ItemModel00.skin
(ItemModelTwo00.skin)
ItemDisplayInfo.dbc




6. SQL
Last but not least you have to create an entry of that weapon on your private server. You could of course simply modelswap with some item but that's totally lame and it's not a really "custom" item, so we don't do that here.
The problem here is that different PS cores have different SQL structure, so there's not much to say about this in general. I suggest to you though to create a new SQL batch using the generators of http://wow-v.com/ in order to get started. Once you know which column does what for your server you can enter new items into the DB directly.

Tigurius:
The texflags don't animate the Texture, they just wrap them.
For animation, you'll need UV-Animations

Navigation

[0] Message Index

[#] Next page

Go to full version