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 Item (Model Export, Attachments, DBC&SQL)  (Read 21797 times)

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
[TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« on: February 14, 2010, 07:57:23 pm »
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.

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #1 on: February 17, 2010, 12:05:00 pm »
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://wowdev.wiki/index.php?title=M2/WotLK
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #2 on: February 17, 2010, 12:06:40 pm »
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:

« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #3 on: February 17, 2010, 12:06:58 pm »
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://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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Tigurius

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 126
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #4 on: February 18, 2010, 11:56:39 am »
The texflags don't animate the Texture, they just wrap them.
For animation, you'll need UV-Animations
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #5 on: February 19, 2010, 07:39:50 am »
Thanks for pointing that out :)
I suppose there's no tool except hex editing to do this? Of there isn't I'll just drop that part in the tutorial, since it's supposed to be for "near beginners" as it's something most people would like to do and I don't want to confuse them.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Tigurius

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 126
    • View Profile
Re: Custom Item (Model Export, Animated Texture, Particles etc)
« Reply #6 on: February 19, 2010, 02:13:30 pm »
Yeah, most likely drop it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

gorq

  • Contributors
  • Wiki Incarnate
  • *****
  • Posts: 141
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Particles, Ribbon etc)
« Reply #7 on: June 26, 2010, 01:05:14 am »
wt!! Fantastic i was looking for this :D Thanks a lot ;)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

SirFranc

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 209
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #8 on: March 01, 2011, 06:42:56 pm »
What i'm supposed to do in case 3dstom2.exe crashes before asking me the textures to be loaded? O.o
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Join the True Roleplay!

TheBuG

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 469
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #9 on: March 01, 2011, 08:59:04 pm »
Quote from: "SirFranc"
What i'm supposed to do in case 3dstom2.exe crashes before asking me the textures to be loaded? O.o

You most like have to many (Sub)meshes, you'll have to reduce them.

Atleast, that's what's Tigurius told me, although I was creating custom buildings, rather than weapons. And I still can't fix it! :<
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #10 on: March 01, 2011, 11:01:31 pm »
I think I remember being able to convert successfully using the old 3dstoM2.exe (the one without collision), but the program I really get to work is GMES for 3.x, it also features OBJ to M2, without collision, animations, bones, multiple textures and with credits spammed into the file data but at least it works (once you've got it to run, which can be a pain in the ass) so you guys might wanna try that.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

TheBuG

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 469
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #11 on: March 01, 2011, 11:38:15 pm »
Tried GMES, worked like poop to me, I'd be happy to be spammed with credits, but instead I got spammed to death with errors during the conversion.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

SirFranc

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 209
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #12 on: March 02, 2011, 01:30:06 am »
Quote from: "Jack"
I think I remember being able to convert successfully using the old 3dstoM2.exe (the one without collision), but the program I really get to work is GMES for 3.x, it also features OBJ to M2, without collision, animations, bones, multiple textures and with credits spammed into the file data but at least it works (once you've got it to run, which can be a pain in the ass) so you guys might wanna try that.
No i guess is my model that is wrong somewhat.. one of the 3 submeshes make it crash : /
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Join the True Roleplay!

Jack

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 258
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #13 on: March 02, 2011, 10:37:49 am »
Quote from: "TheBuG"
Tried GMES, worked like poop to me, I'd be happy to be spammed with credits, but instead I got spammed to death with errors during the conversion.

You have to change all your windows languages and formats to english standards, at least that was what caused my problems.

Did you guys triangulate and export the models correctly? Maybe remove Smoothing Groups, etc. At least for GMES there's a small tutorial video where he demonstrates the correct export settings.

And for the other converters they either crash when loading the model (mdx to m2) or seem to work perfectly fine but crash modelviewer and WoW.exe when loaded ingame (3ds to m2), so I might not be the right person to talk to when encountering problems with the converters  :?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

junit

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 5
    • View Profile
Re: [TUTORIAL] Custom Item (Model Export, Attachments, DBC&SQL)
« Reply #14 on: June 13, 2011, 09:17:33 pm »
I have a problem. I created a model and i followed this tutorial, but when i start a wowmodelwiever and open my model, the wowmodelviewer crash. And  the model isn't see in the noggit.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »