Adding custom clothes and props as addons for MP Freemode models in FiveM allows you to offer more personalized and unique content to your server’s players. This guide will show you step-by-step how to stream clothes and props using YMTEditor and OpenIV, helping you integrate custom models seamlessly into the game.
Important notice: You’ll need to add a Patreon key to your server.cfg – Here’s how this works:
How To Add a Patreon Key to your FiveM server
目录
1. Understanding Important Terms
To follow this tutorial successfully, it’s important to understand some core concepts used in FiveM modding:
- Component: Refers to different character body parts or clothing slots, such as
head
,torso
, orlegs
. There are 12 different components, each with a specific slot for customizations (e.g.,uppr
for torso,lowr
for legs). - Prop: Accessories that can be worn by the character, like hats or glasses. There are 13 prop slots, but only 5 are used for MP models (
p_head
,p_eyes
,p_ears
,p_lwrist
,p_rwrist
). - Drawable: A
.ydd
file representing a model. Each component or prop can have multiple drawables (e.g.,jbib_000_u
和jbib_001_u
for two different torso variants). - Texture: A
.ytd
file applied to a drawable model. Textures must be named properly to be recognized by the game, such asxxxx_diff_###_a_uni
. - YMT File: Defines how many components, drawables, and textures the game uses for character customization.
2. Prerequisites
Before starting, ensure you have the following tools and resources:
- YMTEditor: Used for editing
.ymt
文件 Download YMTEditor. - OpenIV: Essential for working with
.ydd
和.ytd
文件 Download OpenIV. - Clothing and Prop Models: Obtain the clothing or prop mods you want to add. You can find mods on GTA5-Mods.
3. Preparing Your Files
- Download the Clothing or Prop Mods: Gather the
.ydd
和.ytd
files for your clothing and props. Make sure these files are intended for MP Freemode models. If they are single-player models, some conversion may be required. - Organize the Files: Place all downloaded files into a folder. If the files contain prefixes like
mp_m_freemode_01
, remove these to keep the file names simple (e.g., changemp_m_freemode_01_jbib_003
至jbib_000
). - Rename the Files: Standardize the numbering to start at
000
and increment from there (e.g.,jbib_000
,jbib_001
). This helps avoid conflicts and keeps things organized. - Add a Custom Prefix: It’s good practice to add a prefix to your files that matches the name of your project. For example, if your YMT file is named
mp_f_freemode_01_customclothes
, then your files should be renamed accordingly (e.g.,mp_f_freemode_01_customclothes_jbib_000
).
4. Configuring YMTEditor
- Create a New YMT File:
- Open YMTEditor and select 新.
- Choose the MP character you are modding for (e.g., female).
- Name your YMT file (e.g.,
mp_f_freemode_01_customclothes
). Ensure the name is all lowercase.
- Enable the Components You Will Use:
- Expand the list of components in YMTEditor and enable the relevant ones (e.g.,
jbib
for torso,lowr
for pants). - For each component, add new entries for the models and textures you are adding.
- Expand the list of components in YMTEditor and enable the relevant ones (e.g.,
- Add Textures for Each Drawable:
- For example, if you’re adding pants (
lowr
), you may start with drawable000
and add textures up toy
(25 textures in total). - Configure the drawables with the appropriate suffix
_u
for universal or_r
for race-specific.
- For example, if you’re adding pants (
- Set Prop Mask Values:
- If the model has exposed skin, you need to change the prop mask value to 17, 19, or 21 in YMTEditor. This ensures the game recognizes the skin data.
- Save the YMT File:
- Save your changes by selecting File > Save (YMT). Make sure the file name remains consistent.
5. Creating Meta Files
创建一个 .元
file to define how your addon clothes and props integrate into the game.
- Create the Meta File:
- Use a text editor to create a new file named
mp_f_freemode_01_customclothes.meta
.
- Use a text editor to create a new file named
- Add the Following XML Structure:
<?xml version="1.0" encoding="UTF-8"?> <ShopPedApparel> <pedName>mp_f_freemode_01</pedName> <dlcName>customclothes</dlcName> <fullDlcName>mp_f_freemode_01_customclothes</fullDlcName> <eCharacter>SCR_CHAR_MULTIPLAYER_F</eCharacter> <creatureMetaData>MP_CreatureMetadata_customclothes</creatureMetaData> <pedOutfits></pedOutfits> <pedComponents></pedComponents> <pedProps></pedProps> </ShopPedApparel>
6. Setting Up FXManifest
- Create the FXManifest File:
- In the folder containing your YMT and
.元
files, create a new file namedfxmanifest.lua
.
- In the folder containing your YMT and
- Add the Following Content:
fx_version 'cerulean' game 'gta5' files { 'mp_f_freemode_01_customclothes.meta' } data_file 'SHOP_PED_APPAREL_META_FILE' 'mp_f_freemode_01_customclothes.meta'
- Make sure the file paths and names match those used in your project.
- Add Your Resource to
server.cfg
:- Open your server’s
server.cfg
锉刀 - 添加一行
start customclothes
(or use the name of your project folder).
- Open your server’s
7. Testing and Troubleshooting
- Load Your Server:
- Start the server and connect in FiveM.
- Use a character editor (such as vMenu) to navigate to the new clothing components.
- Check for Issues:
- If clothes don’t appear, ensure all file names are consistent.
- Check that the YMT file correctly references all drawables and textures.
- Verify the FXManifest and
.元
files for any typos or missing entries.
- 常见问题:
- Clothes Not Showing: Ensure the YMT file is saved correctly and that the FXManifest includes all necessary files.
- Textures Not Loading: Double-check the naming convention of the textures and ensure they match the drawable file names.
- Skin Color Issues: If the model includes skin, make sure you’ve set the prop mask value to 17, 19, or 21.
8. Conclusion
By following these steps, you should be able to successfully stream custom clothes and props as addons for MP Freemode models in FiveM. This will give your server a unique touch and allow players to customize their characters with a wider range of options.
Feel free to reach out for further help or share your custom content with the FiveM community!