Basic Ped YMT Editing
Introduction - 8 Part Series
This article will allow you to better understand how normal peds, also often called component peds, are structured. This in order to edit them. A new tool, the ymteditor, greatly facilitates the process of editing ped files. This article explains what's going on "under the hood" - how all the parts work together. Once you get comfortable with the tool, there aren't any limits to how you can customize your favourite ped mods.
What are ymt files? The Ped ymt files are manifest files containing metadata about your Peds, allowing you to customize models by changing their physical features and clothing where applicable. Not to be confused with the single file called peds.ymt.
As you're aware, changing clothes and outfits is easily done with trainer mods like Menyoo and Simple Trainer. The trainers use what are called native functions to allow you to make these wardrobe changes in game. For example GTA5 has the following native function:
void SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId)
Components, Drawables, and Textures
There are 12 wardrobe component variations, described in the Native Name column of the table below. They are numbered from 0 to 11 and they can have multiple drawables, often referred to as their slots. The drawables refer for example to a shirt, or a sweater, or a tshirt. A texture on the other hand could allow one tshirt to be red or black or sport a cool logo. These different texture options are called texture variations. Together with the drawables they are called component variations. So for example, a torso has id's for the torso component itself as well as drawable and texture id's.
Native Name | Description | Menyoo Name |
---|---|---|
PV_COMP_HEAD | 0. Head | Head |
PV_COMP_BERD | 1. Masks | Beard/Mask |
PV_COMP_HAIR | 2. Hair Styles | Hair |
PV_COMP_UPPR | 3. Torsos | Torso |
PV_COMP_LOWR | 4. Legs | Legs |
PV_COMP_HAND | 5. Hands/Bags/Parachutes | Hands/Back |
PV_COMP_FEET | 6. Shoes | Shoes |
PV_COMP_TEEF | 7. Accessories | Teeth/Scarf/Necklace |
PV_COMP_ACCS | 8. Undershirts | Accessory/Tops |
PV_COMP_TASK | 9. Body Armor | Task/Armour |
PV_COMP_DECL | 10. Decals | Emblem |
PV_COMP_JBIB | 11. Tops | Tops2 (Outer) |
YMT files need to be decrptyed and exported as xml (text) files before they can be modified or edited. There are two principal tools that will allow you to do this: The Meta Toolkit and CodeWalker's RPF Explorer. Both have their advantages and disadvantages.
Exporting YMT to XML
As stated above, ymt files can't be edited directly. In summary, this is how the two tools work.
Meta Toolkit. Export the ymt file to your desktop or any folder from OpenIV. Then just drag the ymt file on top of the executable MetaTool.exe and it will automatically generate your xml file.
RPF Explorer. Run the explorer and let it scan your game installation. When ready, right click your file and select export to xml.
Terminology
The two tools use different terminology, one is more cryptic than the other but you will quickly familiarize yourself with either tool as you edit your exported xml file.
YMT Components | Meta Toolkit | RPF Explorer |
---|---|---|
Components | <hash_E2489C4F> | CPVComponentData |
Drawables | <hash_68AC8351> | CPVDrawblData |
Texture Variations | <hash_4A92222A> | CPVTextureData |
The available component items will also use different terminology.
Meta Toolkit: <hash_B29BE228>0 255 1 2 3 4 255 5 6 255 255 255</hash_B29BE228>
RFP Explorer: <availComp>00FF01020304FF0506FFFFFF</availComp> |
---|
Of course CPVTextureData is much easier to understand and relate to than <hash_4A92222A>, but you will definitely get used to the jargon in no time at all.
When 255 appears it means that Item is not being used by the model, RPF Explorer uses the hex FF instead. The single digits in Meta Toolkit refer to the item numbers, 0 being the head and 1 the hair. RPF Explorer uses 00 and 01 for the same items respectively. Notice that in this example hair is numbered 1 rather than 2 because component 1 isn't being used in that particular model.
Applications
Editing the ymt file can allow you, depending on the models, to add both drawables ( a new jacket for example) and new textures. Another example is to combine an original model with a retextured one so that you have all the clothing options in one model instead of two or more.
Textures
While drawables are in ydd files, textures will generally be found in the YTD file. You can add textures or modify them and import them easily with OpenIV. Textures can also be embedded in ydd files.
Part 2 How to Export from YMT to XML
Part 3 Part 4 Part 5 Part 6 Part 7 Part 8
BE SURE TO READ: Add Drawables and Textures to Peds