Editing .ymt files for ped variations
-
Hey guys
I want to know how to edit the .ymt files for the peds. I know that a .ymt file converter is out there but I do not know how to tell the difference between the code. I have alot of experience in HTML so I know the basics for editing a similar language with the carrot brackets(<>).
Thanks.
-
-
@Rarefacer Thanks. I saw that video already. Just need to figure out how to add components.
-
@Nailbiter Which components are you trying to add?
Just to go over what I know, in case this helps, in a decrypted ymt file (which you can do with the Meta Toolkit from the main site), there is one main section that is headed by this line:
hash_B29BE228>0 255 1 2 3 255 255 255 4 255 255 5</hash_B29BE228>
Each of those values represents a drawable component, like Head, Beard, Hair, Torso etc... A value of 255 means that component is not used. So in that line above, Head = 0, Beard = 255 (so unused), Hair = 1 etc... If a component is not used, the next valid component gets the next number up, no numbers are skipped.
Below that line, you get a list of <Item> elements inside <hash_E2489C4F> tags. Each <Item> tag corresponds to a used number in that line above. So in the file I am working from, there are 6 <Item> sections, which match the 6 used numbers.
Inside each one of those <Item> sets, is a section marked with <hash_68AC8351> tags. Each <Item> inside that section, is a drawable component.
A drawable component is something like head_000_r, or uppr_000_r. So if you wanted to add a new component, you would also need to add a new one of those, with the next number up. To do that you would have to export the model in openformats, create the new part and then re-import the changed model. This can be done as simply as a file copy and a text file edit, or you can build the new drawable as a model.Inside each one of those drawable sections, is a section marked with <hash_4A92222A> tags. Each <Item> in there, is a texture variation for that drawable component.
A texture variation would be something like uppr_diff_000_a_whi and the number in that matches the number of the drawable component.Once you have created the new drawable as a model/duplicate and added your new textures to the ytd file, remembering to conform to the numbering order, you can add a new drawable section in the ymt file, along with any texture variations, simply by duplicating existing sections in the file.
I added a new t-shirt set to the Vagos females, by doing just what I have described here. You just have to be careful of the <Item> tags to make sure each section is complete and closed properly.
-
@LeeC2202 Hey, do you know how i could add the aztecas face bandana from the .ydd to any other ped models?
-
@LDNENG said in Editing .ymt files for ped variations:
@LeeC2202 Hey, do you know how i could add the aztecas face bandana from the .ydd to any other ped models?
okay this interest me as well, can you actually take stuff from one ped to another ? like being able to give certain character a trenchcoat only avaible to mp ped ?
-
Glitches
Possible with 3ds max (You need to rig NPC clothes for T/M/F to work properly)
btw i found a way how to make Online character clothes working by default for T/M/F however this needs replacing the head
-
@HeySlickThatsMe is because the head in game peds, is the only component with included bones.
-
@Rarefacer Correct
Replacing the YMT file and swapping the head for Online player makes Singleplayer clothing work (And mp one at once) with multiplayer head
-
@LeeC2202 I do not think it is that simple. Textures and the model does not show up ingame. I am positive that the textures are named correctly; I know the model is added correctly.
-
@Nailbiter All I have described is the way I added a new set of drawables to the Vagos female and as you can see from this image, it does work.
There is now a third uppr definition compared to the original Vagos female having just the two. No model editing was done to get this to work.
-
@LeeC2202 I was wondering if you could give me a little help im very very new to all of this.. I managed to add a bandana to a family ped and the .ydd is working but I cant get my head around adding the component to the ymt. The component i want to add is from g_m_y_azteca_01 acc_diff_002 and the ped i want it on is g_m_y_famfor_01. I renamed it to acc_diff_001 in the family ped and added the correct textures to the .ytd.. From my understanding the only part left is to edit the .ymt which i decrypted using the Metal Toolkit. Any help would be appreciated.
-
@LDNENG The only thing I know about this file, is what I have described to solve this problem. Other than that, I have only ever edited this file to remove invalid components from peds.
If there is already an accs section in the ymt file, then it would seem like the option would be to duplicate an entry in that section and that should create a second drawable component for the ped.
Here is a list of the items that are referred to in that first group of numbers.
hash_B29BE228>0 255 1 2 3 255 255 255 4 255 255 5</hash_B29BE228>
0 - Head 1 - Beard 2 - Hair 3 - Torso 4 - Legs 5 - Hands 6 - Foot 7 - None? 8 - Accessories like parachute, scuba tank 9 - Accessories like bags, mask, scuba mask 10- Decals and mask 11 - Auxiliary parts for torso
12 parts, 12 numbers in the list.
-
@LeeC2202 Thanks for the reply bruv. Very confusing but Ill see if I can get it working, your information provided is super helpful
-
@LDNENG It is very confusing because the file is full of hash_collision values that don't help. If you want another tip, install Notepad++ and the XML Tools plugin.
Open the XML file and press ALT + 0, then ALT + Shift + 4 and that will collapse everything down, then reopen it to the required level. you will end up with a view like this. It makes the sections much easier to see and deal with.
-
@LeeC2202 said in Editing .ymt files for ped variations:
[...]
0 - Head
1 - Beard
2 - Hair
3 - Torso
4 - Legs
5 - Hands
6 - Foot
7 - None?
8 - Accessories like parachute, scuba tank
9 - Accessories like bags, mask, scuba mask
10- Decals and mask
11 - Auxiliary parts for torso12 parts, 12 numbers in the list.
7 is eyes.
-
@Unknown-Modder Thank you... once more.
I got that list from somewhere and I never managed to fill in the blank.
-
@LeeC2202 Could you to develope a tool to generate ped .ymt files without .xml direct edition? I know, you are out of public releases in modding, but is a necessary tool. I can provide to you my research about .ymt files (is not completed all data but in tests, I'm sure of some other values and their functions).
-
@LeeC2202 Downloaded it all and im gonna give it a go after i wake up. Thanks for your help man hopefully i can get it working!
-
@Rarefacer I guess you could possibly analyse the structure of a ped exported in openformats to get some of the info. The odd file would give you the drawable components and I suppose you could build the texture variations based on the dds files in the openformats folder.
But I am not sure what a lot of the values are in the xml data.
I mean in this file I am pulling example data from, each section has an entry like this
<hash_C8F5438B value="6" /> <hash_C8F5438B value="9" /> <hash_C8F5438B value="5" /> <hash_C8F5438B value="4" />
I have no idea what that numeric value is or where the value comes from. And because the file is just one mass of hash_collision values, there is not guidance on what those values might apply to.
I built a tool to try and brute force the values based on text values present in the rest of the files but they could be anything. They could be a single word, they could be several words together. So even though I had a fix-it dictionary of over 63,000 words, none of them matched.
If you build a tool that is working with so much unknown information, you have no benchmark to say what is and isn't correct. If the data could be indentified, then it would offer more hope but as it is, it's a bit of a duck-shoot.
And of course, none of this is dealing with the bottom end of that file, which I have never even looked at.
-
@LeeC2202 That hash apparently are related to the type of component and its standard value is <hash_C8F5438B value="1" />
You are right, is too early to have stable and standar values to create a universal ped ymt tool. I'm anxious for more tools to complete modding pipelines, I have a feeling related to the true potential for peds features and R* hidden amazing stuff.
-
@LeeC2202 https://postimg.org/image/rdf43fsoh/ just want to see if im on the right lines.. the highlighted in purple would be for accessories?
-
@LDNENG Looks like the right one to me. The others appear to be Head, Torso and Legs.
-
@LeeC2202 nice, so how would i go about duplicating it to add my accessory?
-
@LDNENG Well if you compare it with the other sections, the answer is there. The section you have highlighted has a single <Item> section, some of the others have two <Item> sections.
So you need to create a second <Item> section for the new drawable, by making a copy of the one that is already there. Then you make sure that the number of items in the texture variation section, match what is in the accessory.