Créateur de YMT
Dépose les fichiers .ydd et .ytd d'un pack de vêtements et récupère le XML .ymt CPedVariationInfo avec chaque composant, drawable, variation de texture et prop remplis, plus le creature metadata et les lignes fxmanifest pour le streamer.
Cet outil et ses notes sont en anglais pour l'instant.
Pack
Ped names and header flags
Add files
Drawables
No male drawables yet.
Drop the pack above, paste file names, import a .ymt.xml or start a slot below.
Export
<?xml version="1.0" encoding="UTF-8"?>
<CPedVariationInfo name="my_clothes">
<bHasTexVariations value="false" />
<bHasDrawblVariations value="false" />
<bHasLowLODs value="false" />
<bIsSuperLOD value="false" />
<availComp>255 255 255 255 255 255 255 255 255 255 255 255</availComp>
<aComponentData3 itemType="CPVComponentData" />
<aSelectionSets itemType="CPedSelectionSet" />
<compInfos itemType="CComponentInfo" />
<propInfo>
<numAvailProps value="0" />
<aPropMetaData itemType="CPedPropMetaData" />
<aAnchors itemType="CAnchorProps" />
</propInfo>
<dlcName>hash_8AB05D7E</dlcName>
</CPedVariationInfo>
CodeWalker XML of the CPedVariationInfo, laid out like the game's own DLC ymts. The server needs the binary mp_m_freemode_01_my_clothes.ymt: see Convert.
From a folder of clothes to a working resource
- Drop the pack folder. Use a
maleand afemalesubfolder, or files that already carry themp_m_freemode_01_<name>^prefix. - Set the collection name, fix what the checks point out, reorder drawables if you want another order in game.
- Download the zip (or run the copy script) to get
stream/with every file renamed, plusfxmanifest.luaand the.metafiles. - Convert
mp_m_freemode_01_<name>.ymt.xmlto.ymtin CodeWalker (Convert tab) and put it instream/. ensurethe resource, restart and reconnect.
File names the game expects
| File | Name |
|---|---|
| Component model | mp_m_freemode_01_<name>^jbib_000_u.ydd, _r for drawables that show skin |
| Component texture | mp_m_freemode_01_<name>^jbib_diff_000_a_uni.ytd, _whi for _r drawables, letters a to z |
| Alternate model | ..^hair_000_u_1.ydd, counted by numAlternatives |
| Cloth physics | ..^jbib_000_u.yld, sets ownsCloth |
| Prop model | mp_m_freemode_01_p_<name>^p_head_000.ydd (note the _p_) |
| Prop texture | mp_m_freemode_01_p_<name>^p_head_diff_000_a.ytd, no race suffix |
| Variation data | stream/mp_m_freemode_01_<name>.ymt |
| Shop meta | mp_m_freemode_01_<name>.meta in the resource root |
The ^ stands for a folder: FiveM streams a^b.ydd as b.ydd inside a, the same layout as the game's DLC archives (mp_m_freemode_01_male_freemode_beach/jbib_000_u.ydd). Drawable numbers are positions: the game reads the Nth model of a slot as drawable N, so numbers must run 000, 001, 002 without gaps. The tool renumbers in list order.
Components and props
| Id | Component | Holds | Prop | Holds |
|---|---|---|---|---|
| 0 | head | Heads | p_head | Hats, helmets |
| 1 | berd | Masks | p_eyes | Glasses |
| 2 | hair | Hair | p_ears | Earrings |
| 3 | uppr | Arms (torso) | p_mouth | |
| 4 | lowr | Legs | p_lhand | |
| 5 | hand | Bags, parachutes | p_rhand | |
| 6 | feet | Shoes | p_lwrist | Watches |
| 7 | teef | Chains, ties | p_rwrist | Bracelets |
| 8 | accs | Undershirts | p_hip | |
| 9 | task | Body armor | p_lfoot | |
| 10 | decl | Decals | p_rfoot | |
| 11 | jbib | Tops |
What the ymt fields mean
| Field | Meaning |
|---|---|
availComp | 12 numbers, one per component: the index of its block in aComponentData3, 255 when the pack has none. |
numAvailTex | Sum of the textures of all drawables in the component. It is a byte, the base game's 256 jbib textures are stored as 0. |
propMask | 1 for plain clothing, 17 (or 19, 21) for _r drawables that draw skin. Other game values (3, 5, 9, 11, 65) exist but are not documented. |
texId | Texture race: 0 uni, 1 whi, 2 bla, 3 chi, 4 lat, 5 ara, 10 pak. Addon clothing uses 0 for _u and 1 for _r. Props store the texture position instead. |
distribution | Random pick weight, 255 on every game texture. |
compInfos | One entry per drawable: audio, expressionMods (heel height in the 5th value), flags (bulky, hide in first person...). |
aAnchors | Per prop anchor, the texture count of each prop drawable. |
dlcName | joaat of the collection name. It must match dlcName in the shop meta. |
Heels and hats
Heel height goes in the 5th expressionMods value of the shoe (the game's heels use 1) and needs a creature metadata entry. Hats squash hair with -0.5 in the first expressionMods value plus their own creature metadata entry. The tool writes mp_creaturemetadata_<m|f>_<name>.ymt.rbf.xml only when you use either; save it with that name so CodeWalker converts it as RBF, stream the resulting .ymt. The shop meta names it in creatureMetaData.
Using the clothes in scripts
Addon drawables are added after the game's own, so their global number shifts when the game adds clothes. Use the collection natives with your collection name and the local number shown on each card:
SetPedCollectionComponentVariation(ped, 11, 'my_clothes', 0, 0, 0)
SetPedCollectionPropIndex(ped, 0, 'my_clothes', 0, 0, true)
print(GetNumberOfPedCollectionDrawableVariations(ped, 11, 'my_clothes'))Common problems
- Nothing shows up. The
.metais missing or not infilesanddata_file, the ymt is still XML, or its name does not match the^prefix. - Invisible or wrong drawable. A gap in the numbers, or the ymt lists more drawables than there are files.
- Purple or missing texture. Texture letter or race suffix does not match:
_uneeds_uni,_rneeds_whi. - Skin looks broken.
_rdrawable with propMask 1. Use 17. - Server console size warnings. FiveM warns above 16 MiB of memory per asset and calls anything over 48 MiB oversized. The tool shows the same numbers.
- Two packs clash. Every pack on the server needs its own collection name.
Sources
- Field layout, texId races, numAvailTex overflow, heels and hat values: the game's own
mp_m_freemode_01.ymt,mp_f_freemode_01.ymt, the mpheist and mpbeach collection ymts,mp_creaturemetadata*.ymtandmp_m_freemode_01_beach_shop.meta. - Streaming names, the shop meta and
SHOP_PED_APPAREL_META_FILE: Stream clothes and props as addons (Cfx.re forum). - Creature metadata, flag names, propMask and texId defaults: grzyClothTool (BuildResourceHelper.cs); component and anchor ids: Durty Cloth Tool docs.
- Size limits: FiveM's ResourceStreamComponent.cpp. Collection natives: FiveM docs.
Plus d'outils config & code
Générateur de server.cfg
Crée un server.cfg complet et fonctionnel : hostname, slots, OneSync, endpoints, tags, resources et permissions ACE.
Générateur de fxmanifest.lua
Génère un manifest de resource valide : fx_version, scripts, page NUI, files, lua54 et dépendances.
Éditeur de handling
Règle la masse, la force motrice, l'adhérence et la suspension depuis une interface, puis exporte en handling.meta ou en Lua.
