How to Create and Edit Accessories
Nov 28, 2016 0:35:20 GMT
Val E Ryon, Stealter, and 1 more like this
Post by HGPhoenix on Nov 28, 2016 0:35:20 GMT
Hello all, Phoe here with a tutorial of my own. This will deal with creating and editing accessories.
Now the main issue is that whenever we edit one, it loses the ability to have color, and texture and all that because it does not use the same format that the clothing does.
When we look at an Accessory we notice it only has a emb, no dyt. Opening the EMB shows a bunch of data files with the order being different between each Accessory. Some may have the texture at data03 another data02, another may have 2 texture files. And the rest of the data is usually 1 color bar. Checking one of these you notice that it is exactly enough for 1 color bar and its 4 components. Attempting to combine the colors into 1 dyt has, for me atleast, resulted in maybe only 1 of the colors working and the rest not.
Currently, that i know of, we have not found a way to set different data files per model Edit: apparently loriscangini did back for XV1, and by importing and exporting a fbx we tend to lose the data information that the game had set. Well here is how to do it. You will now be able to make an accessory with a bunch of different colors, and to create your own.
Now lets begin:
I will be using a set of Potara for this.
The first step is to simply get the model you will be using, go ahead and make it, or grab it from somewhere deep within your folders. Once you have it and edited it to your liking, we need to of course edit the UV Map of the item. Now when you do this, i recommend grabbing whatever texture you will be using for it, saving as a png in your paint program, this way you have an easy time of editing the UV.
Once you have any edits done, REMEMBER your material names, and export that model on out of your program.
And reconvert it back to an EMD.
Now we will get into the editing of the EMB file. So to your folder of your unpacked EMB file, or just make one, in this case this is mine.
You see the Data files i already have in here, and my png. You don't need the png, its just from my UV Mapping, and i have the horrible habit of just leaving it in there so just delete it.
But anyway, i already have 3 data files in here. So this is what you are going to do for yours:
Grab your texture file and rename it to any data file you like, i named mine data002.dds, But you are free to name it any number you wish.
You should now grab the colors you will be using.
As you see this is the size you will want your canvas to be for each color, 128px x 16px
And you will save each color as its own separate dataxxx.dds with the same configuration as any other dyt dds.
Save each color as its own number, so since for mine i am only using 2 colors, i am using Data001.dds and Data002.dds
Now once you have done it for each color, go ahead a pack your EMB file nice and tight.
We will now go on to edit the EMM file. So open yours up and set it like usual....except for 2 things....
1. Ensure that all MatScale1X is set to 0 for each material
2. You will have to be careful of which shaders you are using on the accessory. I do not know why but i have not been able to get certain ones to work with an accessory, even tested just editing the EMM on a unedited accessory. It simply causes the color to become unstable and change to, in my case, black white and skin colored. I am sure someone may figure out why this occurs, but i have not been able to. I have noticed that "TOON_STAIN2_DFD" tends to work just fine, though without some shaders it is hard to get some cool looking stuff. Though in the case of the Scouters they use the color data file and the alpha blend to create a transparent material. So you may have to just study other accessories to figure out some lovely effects.
Okay now that the EMM is done, we move onto the final step. Telling the model which data file to use for which material. Remember when i told you to remember the material names, well it is pop quiz time.
First Open up your EMD file in a Hex Editor, i know what madness is this?
Now we are welcomed to the familiar screen for me, hex numbers. We will be editing about 2 entries per material here.
So go the FIND and search for the text string of your first material, as you see here the first one isn't that far away.
The Red outline is the material name.
Green is the first data slot for the model.
And Purple is the second data slot for the model.
Now these will not always be in the exact same position for each model, this is due to some materials having longer or shorter names. The easiest way to find each is the look for the 22 2 spots away from each point.
So for green we will use this as our color slot, and for me my color slot for the potara is Data000.dds in the EMB file, so i will leave it as 00.
Purple we will use as our texture file, for me my texture file is Data002.dds so i will set it to 02.
Now i will search for my second material "ring" and do the same edits i did for potara
So for green, i set it to 01 as the Data001.dds is my color for the ring material.
And again i set purple to 02 as it is the texture file for this whole accessory.
And repeat for each material you have. Once done, save the EMD and your are done. Just grab the EMB, EMD, EMM, and ESK that you are using for your accessory and pack em into your data file and you are good to go.
You will have to Hex Edit the EMD each time your edit your model, but it doesn't take that long to do it. And i am sure this can be used on clothing to set multiple Data files aswell, haven't done it myself yet though.
Enjoy modding Accessories now!
~Phoe
Now the main issue is that whenever we edit one, it loses the ability to have color, and texture and all that because it does not use the same format that the clothing does.
When we look at an Accessory we notice it only has a emb, no dyt. Opening the EMB shows a bunch of data files with the order being different between each Accessory. Some may have the texture at data03 another data02, another may have 2 texture files. And the rest of the data is usually 1 color bar. Checking one of these you notice that it is exactly enough for 1 color bar and its 4 components. Attempting to combine the colors into 1 dyt has, for me atleast, resulted in maybe only 1 of the colors working and the rest not.
Now lets begin:
I will be using a set of Potara for this.
The first step is to simply get the model you will be using, go ahead and make it, or grab it from somewhere deep within your folders. Once you have it and edited it to your liking, we need to of course edit the UV Map of the item. Now when you do this, i recommend grabbing whatever texture you will be using for it, saving as a png in your paint program, this way you have an easy time of editing the UV.
Once you have any edits done, REMEMBER your material names, and export that model on out of your program.
And reconvert it back to an EMD.
Now we will get into the editing of the EMB file. So to your folder of your unpacked EMB file, or just make one, in this case this is mine.
You see the Data files i already have in here, and my png. You don't need the png, its just from my UV Mapping, and i have the horrible habit of just leaving it in there so just delete it.
But anyway, i already have 3 data files in here. So this is what you are going to do for yours:
Grab your texture file and rename it to any data file you like, i named mine data002.dds, But you are free to name it any number you wish.
You should now grab the colors you will be using.
As you see this is the size you will want your canvas to be for each color, 128px x 16px
And you will save each color as its own separate dataxxx.dds with the same configuration as any other dyt dds.
Save each color as its own number, so since for mine i am only using 2 colors, i am using Data001.dds and Data002.dds
Now once you have done it for each color, go ahead a pack your EMB file nice and tight.
We will now go on to edit the EMM file. So open yours up and set it like usual....except for 2 things....
1. Ensure that all MatScale1X is set to 0 for each material
2. You will have to be careful of which shaders you are using on the accessory. I do not know why but i have not been able to get certain ones to work with an accessory, even tested just editing the EMM on a unedited accessory. It simply causes the color to become unstable and change to, in my case, black white and skin colored. I am sure someone may figure out why this occurs, but i have not been able to. I have noticed that "TOON_STAIN2_DFD" tends to work just fine, though without some shaders it is hard to get some cool looking stuff. Though in the case of the Scouters they use the color data file and the alpha blend to create a transparent material. So you may have to just study other accessories to figure out some lovely effects.
Okay now that the EMM is done, we move onto the final step. Telling the model which data file to use for which material. Remember when i told you to remember the material names, well it is pop quiz time.
First Open up your EMD file in a Hex Editor, i know what madness is this?
Now we are welcomed to the familiar screen for me, hex numbers. We will be editing about 2 entries per material here.
So go the FIND and search for the text string of your first material, as you see here the first one isn't that far away.
The Red outline is the material name.
Green is the first data slot for the model.
And Purple is the second data slot for the model.
Now these will not always be in the exact same position for each model, this is due to some materials having longer or shorter names. The easiest way to find each is the look for the 22 2 spots away from each point.
So for green we will use this as our color slot, and for me my color slot for the potara is Data000.dds in the EMB file, so i will leave it as 00.
Purple we will use as our texture file, for me my texture file is Data002.dds so i will set it to 02.
Now i will search for my second material "ring" and do the same edits i did for potara
So for green, i set it to 01 as the Data001.dds is my color for the ring material.
And again i set purple to 02 as it is the texture file for this whole accessory.
And repeat for each material you have. Once done, save the EMD and your are done. Just grab the EMB, EMD, EMM, and ESK that you are using for your accessory and pack em into your data file and you are good to go.
You will have to Hex Edit the EMD each time your edit your model, but it doesn't take that long to do it. And i am sure this can be used on clothing to set multiple Data files aswell, haven't done it myself yet though.
Enjoy modding Accessories now!
~Phoe