[How-to] Fix Addon hats

After many hours of looking into how to get addon hats working with hair, I have figured it out!

  1. You need to find mp_creaturemetadata.ymt (or whichever DLC you use (Ex: mp_creaturemetadata_heist.ymt))
  2. Edit the file and add more pedPropExpressions items and copy-paste the 19th one (in the default one, if DLC then the last one and then follow the rest andI used CodeWalker to edit the file) and change the number from <pedPropVarIndex value="19" /> to 20 and etc.
    (What each item looks like in <pedPropExpressions itemType="CPedPropExpressionData">)
 <Item>
   <pedPropID value="0" />
   <pedPropVarIndex value="19" />
   <pedPropExpressionIndex value="0" />
   <tracks>33</tracks>
   <ids>13201</ids>
   <types>2</types>
   <components>1</components>
  </Item>
  1. Assuming you already used the tutorial for Addon clothes (Located here)
    Go into mp_m_freemode_01.ymt (or mp_f_freemode_01.ymt) (or if it’s a custom DLC one) then go down to <propInfo> then into <aPropMetaData itemType="CPedPropMetaData">, look for <anchorId value="0" /> <propId value="1" /> (Prop ID is the prop number and anchorid 0 is hats)
    For each of your custom prop hat number change the following:
    <expressionMods>0 0 0 0 0</expressionMods> to
    <expressionMods>-1 0 0 0 0</expressionMods> or
    <expressionMods>-0.5 0 0 0 0</expressionMods>(which Credit to grzybeek#9100 for finding this out and for the image) is used to tell the game to which hair it should use for the hat prop.
    If you have any questions feel free to ask!
9 Likes

Okay but where do I put the .ymt file afterwards?

As in, how do I stream it to my server? or is this a client side thing?

Just put the .ymt files in your stream folder :smile:

nooooooooice

Any way to fix custom hairstyles clipping trough hats, even default GTA hats?

Can someone help me a bit with this tutorial. I can’t understand if I have to edit all the mp_creaturemetadata.ymt or just this one: mp_m_freemode_01.ymt

1 Like

Basically make sure for each hat in mp_m_freemode_01.ymt and mp_f_freemode_01.ymt they must have an expression mod (example <expressionMods>-0.5 0 0 0 0</expressionMods>) so it knows which one to use then in mp_creaturemetadata.ymt is where it tells the game to use that expression mod. <pedPropVarIndex value="19" /> is the hat/prop ID so if hat id is 20, make a new one for 20 and so on

Don’t you have a YouTube channel where you upload tutorials?

Did it work for add-on clothes?(Not for slots?) I will try it by myself, but my local server has crashed. Can i contact you anywhere, can i show you my dlc? If yes - pls write me (Excommunication#0763)

For me (used addon cloth tut) there is no expressions tag on the compiled ymt from gtautil, on decompiled yes but i add slots and then it crashes…

Try codewalker build R30_dev25, I know for a fact editing mp_creaturemetadata.ymt works on that. You can find that on the codewalker discord :slight_smile:

Do you know if you can create an mp_creaturemetadata.ymt for a custom add-on clothing pack. e.g i have a dlc clothing pack named test so its my own DLC.

I’m struggling to create this.

You can, I already said you could?

or whichever DLC you use (Ex: mp_creaturemetadata_heist.ymt

so just add your addon clothing pack DLC name :slight_smile:

How do I save the files as .ymt after editing?

My only options is .xml files when I try to save the data?

Best Regards,
Nikwitz

Hi, can i ask you how do you edit the ymt file?

Use codewalker, you need to get it from the codewalker discord. The latest version I know works with editing the ymt is R30_dev25.

@PERPGamer any idea why some add-on hairstyles continue to poke through hats where others do not? Maybe the model is made in a way similar to LODs?

MrBrown asked a similar question, it seems to be within the model. So if that hairstyle creator didn’t add it, it seems not to work.

So using CodeWalker30_dev25, I’ve edited my add-on dlc ymt file in codewalker, but when saving it I only have the option to save as an xml file. Any way I try to change it back seems to clear the entire file. I’m assuming this makes a difference? I haven’t tried adding it to my server yet.

I figured it out I think, the ymt needs to be in an rpf to be edited and saved as a ymt? I was trying to do it from my mods folder. oof

1 Like