İçeriğe geç

YMT Oluşturucu

Bir kıyafet paketinin .ydd ve .ytd dosyalarını bırak, her component, drawable, texture varyasyonu ve prop doldurulmuş CPedVariationInfo .ymt XML'ini al. Stream etmek için creature metadata ve fxmanifest satırları da dahil.

Bu araç ve notları şimdilik İngilizce.

Config ve KodKıyafet, Meta, İndirDokümanları oku

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

mp_m_freemode_01_my_clothes.ymt.xml
<?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

  1. Drop the pack folder. Use a male and a female subfolder, or files that already carry the mp_m_freemode_01_<name>^ prefix.
  2. Set the collection name, fix what the checks point out, reorder drawables if you want another order in game.
  3. Download the zip (or run the copy script) to get stream/ with every file renamed, plus fxmanifest.lua and the .meta files.
  4. Convert mp_m_freemode_01_<name>.ymt.xml to .ymt in CodeWalker (Convert tab) and put it in stream/.
  5. ensure the resource, restart and reconnect.

File names the game expects

FileName
Component modelmp_m_freemode_01_<name>^jbib_000_u.ydd, _r for drawables that show skin
Component texturemp_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 modelmp_m_freemode_01_p_<name>^p_head_000.ydd (note the _p_)
Prop texturemp_m_freemode_01_p_<name>^p_head_diff_000_a.ytd, no race suffix
Variation datastream/mp_m_freemode_01_<name>.ymt
Shop metamp_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

IdComponentHoldsPropHolds
0headHeadsp_headHats, helmets
1berdMasksp_eyesGlasses
2hairHairp_earsEarrings
3upprArms (torso)p_mouth
4lowrLegsp_lhand
5handBags, parachutesp_rhand
6feetShoesp_lwristWatches
7teefChains, tiesp_rwristBracelets
8accsUndershirtsp_hip
9taskBody armorp_lfoot
10declDecalsp_rfoot
11jbibTops

What the ymt fields mean

FieldMeaning
availComp12 numbers, one per component: the index of its block in aComponentData3, 255 when the pack has none.
numAvailTexSum of the textures of all drawables in the component. It is a byte, the base game's 256 jbib textures are stored as 0.
propMask1 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.
texIdTexture 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.
distributionRandom pick weight, 255 on every game texture.
compInfosOne entry per drawable: audio, expressionMods (heel height in the 5th value), flags (bulky, hide in first person...).
aAnchorsPer prop anchor, the texture count of each prop drawable.
dlcNamejoaat 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 .meta is missing or not in files and data_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: _u needs _uni, _r needs _whi.
  • Skin looks broken. _r drawable 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