Log in to reply
 

edit ymt ped files



  • Hi all,

    I'm trying to edit ymt PSO files.
    What software to use, please



  • @Jeremie2112 I don't think you can edit those files yet.





  • thank's for this video !!
    I try to modify the variations of the vest of this model (the vest is fix and I would like to have the model with or without)
    https://www.gta5-mods.com/player/policia-de-cordoba-argentina

    But I can't find which line to modify ... an idea ?



  • Idk , didn't modify ymt files yet


  • MODERATOR

    @Jeremie2112 said in edit ymt ped files:

    thank's for this video !!
    I try to modify the variations of the vest of this model (the vest is fix and I would like to have the model with or without)
    https://www.gta5-mods.com/player/policia-de-cordoba-argentina

    But I can't find which line to modify ... an idea ?

    Yeah, someone should write a manual about it. I have no idea which hash stands for which ped prop.



  • @meimeiriver Open the YMT file and look at the top and you will see a list of numbers <hash_B29BE228>. They represent the ped components in the order shown below. If the value is 255, it isn't used.

    Head, Beard, Hair, Torso, Legs, Hands, Foot, Misc, Accessories like parachute, scuba tank, Accessories like bags, mask, scuba mask, Decals and mask, Auxiliary parts for torso

    Then in the next section <hash_E2489C4F>, each item corresponds to a used item from that list.

    If you open that <Item> section, each section <hash_68AC8351> contains a variation of that item.


  • MODERATOR

    @LeeC2202 said in edit ymt ped files:

    @meimeiriver Open the YMT file and look at the top and you will see a list of numbers <hash_B29BE228>. They represent the ped components in the order shown below. If the value is 255, it isn't used.

    Head, Beard, Hair, Torso, Legs, Hands, Foot, Misc, Accessories like parachute, scuba tank, Accessories like bags, mask, scuba mask, Decals and mask, Auxiliary parts for torso

    Then in the next section <hash_E2489C4F>, each item corresponds to a used item from that list.

    If you open that <Item> section, each section <hash_68AC8351> contains a variation of that item.

    Brilliant stuff here! :) Thx!



  • @meimeiriver As an example of where I used that. I had the Vagos female that I wanted to add a new T-Shirt texture set to.

    So I duplicated the uppr_000_r.ydd and renamed it to uppr_002_r.ydd, that got me a new set of components to work with, based on her first set of drawables. I duplicated the first <item> in the <hash_68AC8351> section to tell it that it existed.

    I then added an uppr_diff_002_c_uni, uppr_normal_002 and uppr_spec_002 to the ytd file and that gave me a new set of textures to work with. So she now has three drawable options instead of two for the uppr section.


  • MODERATOR

    @LeeC2202 said in edit ymt ped files:

    @meimeiriver As an example of where I used that. I had the Vagos female that I wanted to add a new T-Shirt texture set to.

    So I duplicated the uppr_000_r.ydd and renamed it to uppr_002_r.ydd, that got me a new set of components to work with, based on her first set of drawables. I duplicated the first <item> in the <hash_68AC8351> section to tell it that it existed.

    I then added an uppr_diff_002_c_uni, uppr_normal_002 and uppr_spec_002 to the ytd file and that gave me a new set of textures to work with. So she now has three drawable options instead of two for the uppr section.

    ^^ Masterful work! :) Greatly appreciated!


  • MODERATOR

    @LeeC2202 said in edit ymt ped files:

    @meimeiriver As an example of where I used that. I had the Vagos female that I wanted to add a new T-Shirt texture set to.

    So I duplicated the uppr_000_r.ydd and renamed it to uppr_002_r.ydd, that got me a new set of components to work with, based on her first set of drawables. I duplicated the first <item> in the <hash_68AC8351> section to tell it that it existed.

    I then added an uppr_diff_002_c_uni, uppr_normal_002 and uppr_spec_002 to the ytd file and that gave me a new set of textures to work with. So she now has three drawable options instead of two for the uppr section.

    As you could maybe tell from my frustration from my other thread, there's much weirdness going on with these drawables. :) For instance, Menyoo has an 'Apply Model' option, next to just 'Apply.' When I spawn my ped the former way, all is fine; but, going the latter route, she suddenly has no hair. Maybe Sjaak could shed some light on the difference between the two?! Sadly, the game itself spawns the 'Apply Model' way, thus sans the hair, in my case. And, apart from one or two entries, seems no one has ever identified the meaning of the other hashes.

    Actually, 'without hair' is, in fact, hair option 255. Wut?! Menyoo immediately resets it to 0 when you try and change it, and has it stay at 0 (which is good, as there's really only 1 hair type defined). But it still baffles me why the game would spawn her broken that way.



  • I have decided to embark on a fairly large, brute force hash_collision fixing attempt. I am going to export every .meta file from the game (which I was doing as I was writing this and there are 1448 of them), along with every ymt file (not done yet). I will then feed all of those files (the ymt files that will decrypt anyway) through a programme that will extract every element tag and store them in a dictionary/list, along with their associated hash value.

    I will then run every file with hash_collision values in them through the same programme and hope, with all things crossed, that the missing values have been used somewhere else in the game data, in an unencrypted form.

    I tried doing this with an English dictionary file but of course, that didn't work because as I have now realised, a tag could be made of multiple valid words together.

    Edit: Total Failure so far...

    Double-Edit: Well, after managing to extract 60320 elements and values from all the meta files, none of those values matched the hash values in these ymt files. I suppose it was a long shot expecting something else to have used them but it was worth a shot anyway.


  • MODERATOR

    @LeeC2202 said in edit ymt ped files:

    I tried doing this with an English dictionary file but of course, that didn't work because as I have now realised, a tag could be made of multiple valid words together.
    Edit: Total Failure so far...

    Yeah. I appreciate the effort. But, indeed, you'd be looking for compound terms, really. Even something as trivial as

    <modShopLabel>supra_wing_2</modShopLabel>
    

    That's just 3 words. So, in your case, using a dictionary with 650,000 words, that's already 274,625,000,000,000,000 possible permutations, a number too unrealistic to process even.

    Makes you wonder, though, whether the game itself doesn't decrypt these hashes at some point. Hmmm.



  • @meimeiriver I was kinda hoping for the repeat use scenario, or where another meta file had referred to a property in one of those files as a value... but alas, it wasn't to be. :(

    I even tried digging into some of the GTAIV data to see if I could get a hint from there but I didn't find much from that either.

    I mean there are a couple of values in those files that are things like texID and audioID but I don't know how reliable a pattern that is, to try and create words with ID on the end. I could try it I guess, it would only require a minor code change to add on the end of each word as an alternate check.

    I'm also not quite sure how big a role capitalisation plays in the generation of a hash. So I don't know if pedTexComponentID would result in a different value to pedtexcomponentid... I haven't looked too much into that yet.

    I need to get stress levels down from 500% first though. :(


  • MODERATOR

    @LeeC2202 said in edit ymt ped files:

    I'm also not quite sure how big a role capitalisation plays in the generation of a hash. So I don't know if pedTexComponentID would result in a different value to pedtexcomponentid

    Judging from <handlingName>, for instance (in handling.meta, of course) these seem to be case-insensitive. So we're good on that. :)

    Meanwhile, whilst I really appreciate all your help, think of your own stress levels first. There no point in getting your Quit-o-meter in the red. :)

    Sometimes I have a hard time letting go, and then my frustration levels are really rising. But sometimes you just need to move on to greener pastures. And I've pretty much resigned to the fact these hashes can't be bruteforced. Way it is is the way it is, I suppose.

    And again thx for all your endless efforts.



  • @LeeC2202 I don't know if you have done this BUT the trick I use to edit those files is basically run a string through the One-At-A-Time-Jenkins hash-thingy and then when I get the hash I search for it in the decompiled ymt/ytyp file. If I find one, I know that is the one I want to edit. SO, why not run the ones related to vehicles through a list of all the vehicles in the damn game and see what comes out? Same for peds, literally everything.



  • @AHK1221 That's basically what I have done. My programme goes through every single meta file and builds a dictionary of words and their matching hashes. I then run a file with hash_collision_000000 values in it and use the hash values generated off those strings as a reverse lookup to find a matching word... but it fails on the peds.ymt files.

    My dictionary ends up with over 62,000 words in it (62101 to be precise), made from tag values like <Item> and the values inside those tags.



  • This post is deleted!


  • This post is deleted!


  • The ymt identifies drawables, the amounts of textures available to those drawables, what the skin color of the texture is, a group of configs that allows the game to properly randomize the skin settings and then individual props and how many textures they have.

    It's a very convoluted and messy document but reads well once you understand it.

    Adding drawables without adding them to the randomization code will cause your game to crash when the engine attempts to spawn and randomize said skin.

    GTA is also overly anal about file name conventions though the peds. In a previous example in this thread, duplicating the item hash and then the texture is the exact wrong way to add new drawables to a skin. When you tell the game to look for a second drawable (where there may have only been one "shirt" before) that doesn't physically exist on the model, its never going to work properly.

    Just renaming a texture to uppr_diff_002_c.uni isn't enough either.

    A: because gta files start at 0. So if this is the second drawable it's not #2, it's #1.

    B: like files, textures start at A and go on from there. So you'd need to name it uppr_diff_001_a.uni and then upload it. However, it still won't work, because adding the new component to the ymt means nothing if you don't build it into the model itself in zmodeler. Its not just magic'd into the game.



  • @Deadspin Man Hi! Help Me please with the foot step sound for the ped in this file! I really dont understand how it works



  • and <hash_23532A3B> what are they?



  • @Guest said in edit ymt ped files:

    @meimeiriver Open the YMT file and look at the top and you will see a list of numbers <hash_B29BE228>. They represent the ped components in the order shown below. If the value is 255, it isn't used.

    Head, Beard, Hair, Torso, Legs, Hands, Foot, Misc, Accessories like parachute, scuba tank, Accessories like bags, mask, scuba mask, Decals and mask, Auxiliary parts for torso

    Then in the next section <hash_E2489C4F>, each item corresponds to a used item from that list.

    If you open that <Item> section, each section <hash_68AC8351> contains a variation of that item.

    and <hash_23532A3B> what are they?



  • Okay so i still have very little understanding of how this works but i wanted to add new texture variations to existing npc models so i tried to figure it out based on what has been written here so far. Sadly, it wasn't too clearly understandable how you would figure out which item under hash_68AC8351 refers to which drawable and which item under hash_4A92222A refers to which texture. So here is what i have figured out:

    1. the number of item entries (the ones then followed by "texId" in the next line) correlates directly to the number of textures for the drawable it refers to. in my case i wanted to add two extra textures for uppr_diff_000 to a_m_y_hipster_01. luckily, uppr_diff_000 is the only drawable to come with 6 textures (a-f) by default. so you know you're looking for the only entry with 6 items.

    2. To add the extra textures, i named them uppr_diff_000_g_whi and uppr_diff_000_h_bla (because g and h come after f) and added them to the txd archive. Then i simply duplicated two item entries under hash_4A92222A in the .ymt file. Since they're basically the same, it doesn't matter which ones, as long as you add them at the end.

    3. The only difference was the texId value. As it turns out, texId is skin color and 0 means universal, 1 means to match 1st head_diff (head_diff_000...), here caucasian and 2 means to match 2nd head_diff (head_diff_001...), here african american.

    4. The item entries are sorted alphabetically, meaning the first item is a (here uppr_diff_000_a_whi), the second is b (here uppr_diff_000_b_whi), and so on.

    5. At first, i messed up the texId values and for some reason, i had some head_diffs as texture choices in ENT. So if you see your ped wearing its face for clothing, check your texIds ;-)



  • This post is deleted!

Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.