[How-to] Streaming addon clothes and ped props for mp freemode models

Hello, in this tutorial I will show you how to stream addon clothes and ped props using GTAUtil and FiveM subdir file mapping.


Requirements :

Knowledge requirements :

  • Basic command-line usage
  • Environnment variables

Download GTAUtil, extract in somewhere on your computer and add the extracted folder to your %PATH% so the executable is accessible from any location.


Some useful informations for this tutorial :

components

HEAD : 0,  // Head
BERD : 1,  // Beard
HAIR : 2,  // Hair
UPPR : 3,  // Arms
LOWR : 4,  // Pants
HAND : 5,  // Parachute, bag, etc...
FEET : 6,  // Foots
TEEF : 7,  // Tie, scarf, necklace, etc..
ACCS : 8,  // T-Shirt
TASK : 9,  // Bulletproof, bag, etc...
DECL : 10, // Decals
JBIB : 11, // Vest, sweat, jacket, etc...

props

HEAD           : 0,  // head
EYES           : 1,  // eyes
EARS           : 2,  // ears
MOUTH          : 3,  // mouth
LEFT_HAND      : 4,  // lhand
RIGHT_HAND     : 5,  // rhand
LEFT_WRIST     : 6,  // lwrist
RIGHT_WRIST    : 7,  // rwrist
HIP            : 8,  // hip
LEFT_FOOT      : 9,  // lfoot
RIGHT_FOOT     : 10, // rfoot
UNK_604819740  : 11, // ???
UNK_2358626934 : 12, // ???

1 - Creating the project directory

gtautil genpeddefs --create --output project --targets mp_m_freemode_01,mp_f_freemode_01

We just told gtautil to create a project folder named folder targeting base dlc component / props.

It looks like we are specifying the target models here but we are not. In fact we specify the target folders / ymts names without extension.

In a skin menu this will be the first group of items in the list, starting from drawable 0 for each component / prop.

In our case this will match

\models\cdimages\streamedpeds_mp.rpf\mp_*_freemode_01.ymt \models\cdimages\streamedpeds_mp.rpf\mp_*_freemode_01\* \models\cdimages\streamedpedprops.rpf\mp_*_freemode_01_p\*

mp_m_freemode_01 folder is for ped components and mp_m_freemode_01_p folder is for ped props, same for female.

  • The program is hardcoded to search for mp freemode models.
  • I don’t managed to get it working with another dlc.
  • Hairs will not be hidden by new hats / helmets, I have yet to find how to do this.

2 - Adding mods to your project directory

Let’s say we want to add the following mods to our project :

  1. https://fr.gta5-mods.com/player/toby-price-dakar-replica-outfit-freemode-male-2k (complete outfit)
  2. https://fr.gta5-mods.com/player/jacket-alpinestars-freemode-male-model-replace-pelizaro (jacket)
  3. https://fr.gta5-mods.com/player/agv-2-models-replace-freemode-male (helmet)

Download all these mods and extract them somewhere in your computer.

You will have to move the files to project folder and rename them.

Start with 0.ydd for every different component / prop
For the textures, in the ydd folders create folders 0, 1, 2 etc… Inside these : 0.ytd, 1.ytd etc…

screenshot


1 - Toby Price Dakar replica outfit

Boots\feet_001_u.ydd           => project\mp_m_freemode_01\components\feet\0.ydd
Boots\feet_diff_001_e_uni.ytd  => project\mp_m_freemode_01\components\feet\0\0.ytd
Jacket\jbib_000_u.ydd          => project\mp_m_freemode_01\components\jbib\0.ydd
Jacket\jbib_diff_000_a_uni.ytd => project\mp_m_freemode_01\components\jbib\0\0.ytd
Pants\lowr_001_r.ydd           => project\mp_m_freemode_01\components\lowr\0.ydd
Pants\lowr_diff_001_a_whi.ytd  => project\mp_m_freemode_01\components\lowr\0\0.ytd

2 - Jacket Alpinestars

jbib_011_u.ydd          => project\mp_m_freemode_01\components\jbib\1.ydd
jbib_diff_011_a_uni.ytd => project\mp_m_freemode_01\components\jbib\1\0.ytd

3 - AGV

p_head_010.ydd        =>  project\mp_m_freemode_01_p\props\head\0.ydd
p_head_diff_010_a.ytd =>  project\mp_m_freemode_01_p\props\head\0\0.ytd
p_head_diff_010_b.ytd =>  project\mp_m_freemode_01_p\props\head\0\1.ytd

3 - Create FiveM resource from project folder, reserving 200 drawables for each component and prop

gtautil genpeddefs --input project --output build --reserve 200 --reserveprops 200 --fivem

Why “reserving” drawables ? Because everytime you will add new mods your component ids will be shifted and all your saved outfits messed up so it prevents that.

But of course if you have any outfit saving system based on component / drawable ids it will screw up your saves the first time you do this.

Move the build folder to your server resources directory (rename it to clothes or something like that) and start it in your server.cfg.

For your convenience it also generate json files which contains informations about empty reserved drawable slots.

Enjoy :slight_smile:

Special thanks to @FuraXx and @SuperCoolNinja for testing

37 Likes

Awesome work as usual :star_struck:

2 Likes

:heart_eyes::smiling_face_with_three_hearts: :star_struck:

unknown

3 Likes

siiiiiiick

thank for this tuto!

great thanks for the tutorial !:stuck_out_tongue:

Do you need this $15 patreon to stream for example police outfits?

1 Like

If you want police outfits for freemode peds / use EUP then yes.

I would like to add custom outfits in my esx job so do i have to buy that

vid tutorial or can someone help me out?

Will this work with .yld files which add cloth physics? I would really be happy about that.

There is two possibilities :

  1. They need to be declared in the ymt : It will not work until an update
  2. They only need to have the same name minus extension in generated folder : It will work with some manual renaming.

I juste learned what these files do with your comment. I will push an update later so you can place them in project folder before build.

Yeah, it’s pretty badass. I’ve been working with someone who develops the cloth physics for superhero models and he would probably be pretty happy that they can be used in FiveM.

Thats awesome ! I hope the task is easy as it seems to be for the next update.

Can you send me one of the models because first I am very curious and second I will see in live if it works.

I will never use it or leak it anywhere except on 127.0.0.1

10-4, let me find one that works because something broke a few in a recent update. I’ll get back to you shortly

Okay thanks !

1 Like

Can you make it so that it doesn’t have to search for a model, but rather use one that exists in a folder? for example:
cc1aafa6d5e9cc4ed6f3ea6dd1c8f36e

The best I can do is to let you make a suffix like 0-TT.ydd or 0TT.ydd because we have to know the order of the components / textures.

You can now name your .ydd files like 0-test.ydd 1-foo.ydd 2-bar-baz.ydd but keep folders with numbers only.

Added clothe physics support. (if you have a 0-foo-bar.ydd you must name the .yld 0-foo-bar.yld)