Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Tutorials => Topic started by: Eluo on September 08, 2010, 01:31:17 am

Title: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: Eluo on September 08, 2010, 01:31:17 am
How to create a custom treepath for a not so custom Model[/color]

Hi! In this Coffee session you are gonna learn , how to duplicate an object and set new texturepaths for it.

The used tools can be found at the end of the post.

So why would someone do that? What is the use of that?
Well sometimes when you saw an object wich you liked and you wanted to reskinn it, but you don't want the original one to be changed too,then this is the perfect solution for that.

First we open our object in wowmodelviewer

(http://imagr.eu/up/4c86b446ad2a10_openmodel.jpg)

and extract everything.

We do this by using the export function.
 (http://imagr.eu/up/4c86b4858efa31_exporttextureopen.jpg)

In the new popup window you can see all the files that are related to this model.
(http://imagr.eu/up/4c86b4dd40d368_export.jpg)

Now just click on the "Export all" button.
(http://imagr.eu/up/4c86b51218e484_exportall.jpg)

And! that we can directly open the textures use the export all to tga function.
(http://imagr.eu/up/4c86b5367dd9a6_export_to_tga.jpg)

Now switch to the Modelviewer folder Export and there you will find everything :)
(http://imagr.eu/up/4c86b5dd4c8f60_exported.jpg)

After we edited the texture like we want it to be(keep in mind that it must have 32bit when you are saving the tga file) we convert it into the blp2 format.
For this we are using the Tga to Blp converter.
(http://imagr.eu/up/4c86bade9c6c91_IMG_5030.JPG)
Just drop the tga file onto the .exe. If everything wokred as it should you can delete the tga file.

The next thing we do is that we create in our world of warcraft directory the new treepath of the model.
For that just create one folder in another.
I always place custom worldmodels(wich i use for worldbuilding) in worldcustom...
The only thing that you must keep in mind when you are creating the treepath , is that it isn't too long.
Make it as short as possible(well this is just important for the texture)!
I'm now placing my new banner in worldcustombanner
Make sure that you moved EVERY! file that is according to that object into that folder.
The Blp file can be placed everywhere, but i mostly place it in the same folder if the treepath doesn't get too long.
Renaiming isn't neccesarry, but i mostly do it for what? I don't know its just better^^.
When you are renaiming the .m2 file don't forget to rename the .skin file too(look at the following examples very carefully!).

Exaples for right renaimings:
fk_banner02wall.m2  -> mynewbanner01.m2
fk_banner02wall00.skin -> mynewbanner0100.skin

or just
fk_banner02wall.m2  -> banner.m2
fk_banner02wall00.skin -> banner00.skin

The best thing is when you are leaving the blp filename as it is(well i renamed it to mynewbanner01.blp ^^)

(http://imagr.eu/up/4c86ca0da11c54_IMG_5030.JPG)

Before we do something else , just make an seceure copy of your m2 file!

After that open up HxD ,the Hexeditor, and drag the normal .m2 file into it.

(http://imagr.eu/up/4c86c0745f3e35_IMG_5355.JPG)

Okay This might look VERY confusing when you have never used a hexeditor before.
But this is very easy!
There are just a few rules for using this program:
Don't hit delete,backspace or enter

When you do this you will change the file length and your m2 will be destroyed. For this case we still have our secure copy of the m2 file.

Now hit ctrl+f and type in the popup window  .blp
And click ok.

(http://imagr.eu/up/4c86c1dd311017_IMG_5030.JPG)


HxD will now jump to a part where you can see the original treepath of the texture.

(http://imagr.eu/up/4c86c24fce7628_IMG_5030.JPG)

What you do now is very important! Do not make any spelling mistakes!
Click on the right side to the beginning of the treepath and start typing in your treepath.
Again: do not brake the rules for hxd!
My treepath to my new texture is worldcustombannerfk_banner01.blp
As you will see we will just overwrite the original tree path to the new one.
Now when your new treepath is longer than the old one you will have to shortern your treepath of the texture. Move your texture to another folder or something.

(http://imagr.eu/up/4c86c5add132b4_IMG_5030.JPG)

When you fully typed in your new treepath look to the left side, where all those numbers are.
Red always marks your changed part. Jump to the end of those redmarked numbers.
(http://imagr.eu/up/4c86c5fd599803_IMG_5030.JPG)

Now start entering 0 as often , until you can't see nothing left of the rest of the old treepath(look on the right side).

(http://imagr.eu/up/4c86c64d572aa1_IMG_5030.JPG)

Et voilá!
Now you can close HxD(save the file^^).

If you did everything right , you can now spawn or just use your "new custom object". Just treat it like any other original blizzard object.

Why am i saying all the time object and not m2 or doodad?
Because you can use the exact! progress on any object of wow. You can even create your custom wmos with that!
It always works the same way.

Here you can see my SUPER UBER AWSOME result:
[spoiler:2ect62ce](http://imagr.eu/up/4c86caf5753a55_IMG_5030.JPG)[/spoiler:2ect62ce]


The Tools :
[/color]
Modelviewer (in this case an older version of ModIt): http://rapidshare.com/files/417752464/ModIT.rar.html (http://rapidshare.com/files/417752464/ModIT.rar.html" onclick="window.open(this.href);return false;)
HxD: http://mh-nexus.de/en/downloads.php?product=HxD (http://mh-nexus.de/en/downloads.php?product=HxD" onclick="window.open(this.href);return false;)
BLP<->Tga Converter : http://rapidshare.com/files/417752643/BlpTga.rar.html (http://rapidshare.com/files/417752643/BlpTga.rar.html" onclick="window.open(this.href);return false;)
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Herbalism on September 08, 2010, 05:20:13 pm
I loved your results :D
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: TheBuG on September 09, 2010, 05:57:53 pm
Nice, finally a good guide on this!

Good job!

Just a quick question, does it work the same for .WMOs?
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: larrylaffer on September 10, 2010, 08:03:00 pm
Great! I give it a try when i have time, thanks!!

Just one question:
If i want to duplicate an in-game object, for example a mount, in order to make customs mounts, i would need to modify also the DB and/or the DBC?
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Eluo on September 12, 2010, 05:03:38 am
Quote from: "TheBuG"
Nice, finally a good guide on this!

Good job!

Just a quick question, does it work the same for .WMOs?

At the end of the tutorial was a statement to that :)
[spoiler:2c4y1fxi]
Quote
Why am i saying all the time object and not m2 or doodad?
Because you can use the exact! progress on any object of wow. You can even create your custom wmos with that!
It always works the same way.
[/spoiler:2c4y1fxi]
Yeah just instead of using a .m2 file ,just use the .wmo root file (not wmo group e.g. stormwind_000.wmo)


Quote
Just one question:
If i want to duplicate an in-game object, for example a mount, in order to make customs mounts, i would need to modify also the DB and/or the DBC?

Hm to be honest i don't really know much about mounts and items :P
But as it seems there is no big dbc wich is related to mounts (i'm not 100% sure bout that but i didn't find anyone wich might be related to it ... )
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Jack on September 12, 2010, 08:29:46 am
Quote from: "larrylaffer"
Just one question:
If i want to duplicate an in-game object, for example a mount, in order to make customs mounts, i would need to modify also the DB and/or the DBC?

If you want to create a new item that uses the same mount or item appearance you'd have to only duplicate the SQL entries on your server and give them a new ID and name (name isn't even required but then your items would be completely the same), or just lookup the displayID of the item/model you want to use and create new items from scratch using wow-v or some other WoW private server item creator. Keep in mind that items and models (monsters, mounts, characters) use different displayIDs.

So basically the solution to your question doesn't involve anything mentioned in this tutorial  :usad:
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Khira on September 12, 2010, 09:46:34 am
Hi, if you want add a mount, you need to duplicate the spell too. It is an exemple of new mounts (so new spells) :

Quote

Preview : http://www.model-changing.com/files/Mec ... e-64-B.swf (http://www.model-changing.com/files/Mecano-Tank-Modele-64-B.swf" onclick="window.open(this.href);return false;)

Spells :

(http://www.model-changing.com/files/patchs/Mount_MechaSpiderTankBlack.png)

(http://www.model-changing.com/files/patchs/Mount_MechaSpiderTankGreen.png)

(http://www.model-changing.com/files/patchs/Mount_MechaSpiderTankRed.png)

(http://www.model-changing.com/files/patchs/Mount_MechaSpiderTankBlue.png)




Attention : NPC 60000, 60001, 60002, 60003 will be use by the patch.


Spell 76600 : Mécano-tank modèle 58-B
Spell 76601 : Mécano-tank modèle 75-G
Spell 76602 : Mécano-tank modèle 50-R
Spell 76603 : Mécano-tank modèle 47-B

[french]
Ce qui a été fait :
- Déplacement de l'Attachment Point du modèle pour que le personnage se retrouve au bon endroit (.m2).
- Modification de la caméra du modèle pour un affichage correct dans l'onglet Montures (.m2).
- Ajout des icônes (SpellIcon.dbc).
- Ajout du modèle (CreatureModelData.dbc).
- Ajout des différents skins (CreatureDisplayInfo.dbc).
- Ajout des sorts (Spell.dbc).
- Requêtes SQLs sur la base de données.
[/french]

Download : 3.3.3.a.NewMounts.rar (http://www.model-changing.com/files/patchs/3.3.3.a.NewMounts.rar)
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: larrylaffer on September 13, 2010, 07:14:05 pm
I already know that i have to duplicate an ID in the sql server in order to create the item. But what i wanted to know, is if what i must do in order to duplicate a display object in order to customize it.

If i duplicate a mount and customize his textures, i will also customize the textures of the original mount, cus both items will have assigned the same textures.
 What i want to do is to duplicate the object and assign his own set of textures, just like Eluo do with an doodad.

Regards.
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Jack on September 14, 2010, 08:39:46 am
Eluo isn't adding an additional texture treepath to an existing model in this tutorial, he's copying a model and pasting it into a new treepath so a duplicate of the old model is in the client (which is the best thing if you also want to edit the vertices of the model) and thus the new model can be referred to as a sort of "custom" model or at least it's a new one.
Unless you're using these models for spawning you will have to assign a displayID to that model (and maybe some other attributes), which can be done in the DBCs. There are DBCs where you'll have to enter the model treepath and the ID you want it to be.

The DBC you'll have to use when doing mounts or characters etc is http://madx.dk/wowdev/wiki/index.php?ti ... ayInfo.dbc (http://madx.dk/wowdev/wiki/index.php?title=CreatureDisplayInfo.dbc" onclick="window.open(this.href);return false;) whereas the DBC for items is http://madx.dk/wowdev/wiki/index.php?ti ... ayInfo.dbc (http://madx.dk/wowdev/wiki/index.php?title=CreatureDisplayInfo.dbc" onclick="window.open(this.href);return false;)
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Herbalism on September 26, 2010, 12:41:27 pm
Hey I followed the guide exactly 100%, but when I open up WMV there is no new treepath in there.
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Eluo on September 27, 2010, 04:37:33 pm
:/ please read the posts properly before posting sth.
As you all want to add aditional textures to a Model ill do a guid on this topic the next days.
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Tigurius on September 29, 2010, 12:26:12 am
It would be much easier to edit the texture path in PyModelEditor
(http://imagr.eu/up/4ca26b55b6d039_Texture.png)
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: TheBuG on September 29, 2010, 05:03:51 pm
Quote from: "Tigurius"
It would be much easier to edit the texture path in PyModelEditor
(http://imagr.eu/up/4ca26b55b6d039_Texture.png)

Does PyModelEditor open .wmo's? I can't get that to work...
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Tigurius on September 29, 2010, 08:34:30 pm
No.

But I'll write a tool for wmos when PyModelEditor is finished.
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: TheBuG on September 30, 2010, 11:07:34 am
Quote from: "Tigurius"
No.

But I'll write a tool for wmos when PyModelEditor is finished.

That'd be great, cheers :)
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Herbalism on October 09, 2010, 10:53:59 am
Hey, I'm trying to reskin a hut but I get no ".wmo" file, only BLP's and TGA's. Help? :S
Title: Re: [TUTORIAL] Custom Model Treepath
Post by: Jack on October 09, 2010, 05:24:40 pm
Quote from: "Herbalism"
Hey, I'm trying to reskin a hut but I get no ".wmo" file, only BLP's and TGA's. Help? :S

Please ask again in an appropriate thread and not just some thread which is vaguely related.
Title: [HTML] Re: [TUTORIAL] Custom Model Treepath
Post by: blizzblack2008 on November 06, 2014, 12:48:39 am
Hello, very nice tutorial helped me a lot.
But I have a problem with .m2.
Look at the picture and see that m2 is in a strange pocision. I wanted to know because I also get the model.
I do not speak English I hope you understand me and can help me.
Title: Re: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: phantomx on November 06, 2014, 01:42:08 am
You have to rotate it and then set those coordinates in the vx_vars_init.lua
Title: Re: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: blizzblack2008 on November 06, 2014, 08:07:35 pm
Quote from: "phantomx"
You have to rotate it and then set those coordinates in the vx_vars_init.lua
Thanks for responding but:
How do I rotate the model? :?:  :?:
Title: Re: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: phantomx on November 06, 2014, 09:32:31 pm
Quote from: "blizzblack2008"
Quote from: "phantomx"
You have to rotate it and then set those coordinates in the vx_vars_init.lua
Thanks for responding but:
How do I rotate the model? :?:  :?:

"facing"
Title: Re: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: blizzblack2008 on November 15, 2014, 09:08:49 pm
Quote from: "phantomx"
Quote from: "blizzblack2008"
Quote from: "phantomx"
You have to rotate it and then set those coordinates in the vx_vars_init.lua
Thanks for responding but:
How do I rotate the model? :?:  :?:

"facing"
Hello again, sorry for ignorance, edit [facing], but keeps coming as before. Please take a look.

Much of this and I do not expect you to help me .Many thanks for your answers.
Title: Re: [TUTORIAL] Custom Model Treepath(or: Reskinning objects)
Post by: Valkryst on March 05, 2015, 06:23:18 pm
Hey,

I just attempted to swap the roof texture of a certain WMO while following this tutorial, but I seem to have either messed up one of the steps or run into an error. The video below shows what I've been doing after extracting the WMO, texture I want to use, and renaming the texture that I want to use.

If anyone that knows how to swap textures has a few minutes, can you take a look and tell me if you see a step that I've done wrong or something else that I could try doing?

Thanks.

[media:29mao368]https://www.youtube.com/watch?v=hJvbJcBQTY0&feature=youtu.be[/media:29mao368]

-------------------------------

Edit:

I found out that the error was caused because the model couldn't find the group files that it required.

There is still one more error though, whenever I move away from the texture, it slowly turns black.