Pedvariation.meta

INFO

Questo file definisce le varianti di outfit del ped: quali capi può indossare, in quante varianti di colore, e come si combinano.


ObiettivoDettagli
Cosa imparerai• Configurare varianti di outfit per il ped
• Mappare componenti del corpo e props
• Collegare il file pedvariation.meta al resto della risorsa
Prerequisiti• YFT e YMT del ped già funzionanti
• Conoscenza della struttura Component ID

Struttura Base

<?xml version="1.0" encoding="UTF-8"?>
<CPedVariationData>
    <Item>
        <!-- NOME INTERNO DEL PED -->
        <Name>u_m_m_custom_npc</Name>
        
        <!-- COMPONENTI DEL CORPO -->
        <Components>
            <!-- Testa (Component 0) -->
            <Item>
                <ComponentId>0</ComponentId>
                <Drawable>
                    <DrawableIndex>0</DrawableIndex>
                    <TextureIndex>0</TextureIndex>
                    <TextureIndex>1</TextureIndex>
                    <TextureIndex>2</TextureIndex>
                </Drawable>
            </Item>
            
            <!-- Capelli (Component 2) -->
            <Item>
                <ComponentId>2</ComponentId>
                <Drawable>
                    <DrawableIndex>0</DrawableIndex>
                    <TextureIndex>0</TextureIndex>
                    <TextureIndex>1</TextureIndex>
                </Drawable>
                <Drawable>
                    <DrawableIndex>1</DrawableIndex>
                    <TextureIndex>0</TextureIndex>
                </Drawable>
            </Item>
            
            <!-- Torso (Component 3) - opzionale -->
            <Item>
                <ComponentId>3</ComponentId>
                <Drawable>
                    <DrawableIndex>0</DrawableIndex>
                    <TextureIndex>0</TextureIndex>
                </Drawable>
            </Item>
        </Components>
        
        <!-- PROPS (accessori) -->
        <Props>
            <!-- Occhiali (Prop 0) -->
            <Item>
                <PropId>0</PropId>
                <Prop>
                    <PropIndex>0</PropIndex>
                    <TextureIndex>0</TextureIndex>
                </Prop>
            </Item>
        </Props>
    </Item>
</CPedVariationData>

Component IDs

WARNING

Questa è la numerazione standard freemode usata da GTA V. Usa la stessa tabella nel modulo Vestiti EUP — i due moduli sono allineati.

IDParte del CorpoEsempi
0Face (viso)Base del viso
1MaskMaschere, passamontagna
2HairCapelli, barba
3TorsoMaglie, camicie, giacche, torso+braccia
4LegsPantaloni, shorts, gonne
5HandsGuanti
6ShoesScarpe, stivali
7AccessoriesCollane, catene, cravatte
8UndershirtSottocamicia, canottiere
9Vest / ArmorGiubbotti antiproiettile, gilet
10DecalsLoghi, badge, tatuaggi sopra i vestiti
11OuterGiacca esterna, soprabito

Prop IDs

IDAccessorioAttach Bone
0Cappello / ElmettoSKEL_Head
1OcchialiSKEL_Head
2OrecchiniSKEL_Head
3OrologioSKEL_L_Hand
4BraccialeSKEL_R_Hand
5Accessorio viso (bende)SKEL_Head
6Accessorio gamba (fondina)SKEL_Pelvis

Esempio Completo

<Item>
    <Name>u_m_m_custom_npc</Name>
    <Components>
        <!-- Testa fissa -->
        <Item>
            <ComponentId>0</ComponentId>
            <Drawable>
                <DrawableIndex>0</DrawableIndex>
                <TextureIndex>0</TextureIndex>
            </Drawable>
        </Item>
        
        <!-- Capelli: 3 stili × 2 colori -->
        <Item>
            <ComponentId>2</ComponentId>
            <Drawable>
                <DrawableIndex>0</DrawableIndex>
                <TextureIndex>0</TextureIndex>
                <TextureIndex>1</TextureIndex>
            </Drawable>
            <Drawable>
                <DrawableIndex>1</DrawableIndex>
                <TextureIndex>0</TextureIndex>
                <TextureIndex>1</TextureIndex>
            </Drawable>
            <Drawable>
                <DrawableIndex>2</DrawableIndex>
                <TextureIndex>0</TextureIndex>
            </Drawable>
        </Item>
        
        <!-- Torso -->
        <Item>
            <ComponentId>3</ComponentId>
            <Drawable>
                <DrawableIndex>0</DrawableIndex>
                <TextureIndex>0</TextureIndex>
                <TextureIndex>1</TextureIndex>
                <TextureIndex>2</TextureIndex>
            </Drawable>
        </Item>
        
        <!-- Gambe -->
        <Item>
            <ComponentId>4</ComponentId>
            <Drawable>
                <DrawableIndex>0</DrawableIndex>
                <TextureIndex>0</TextureIndex>
            </Drawable>
        </Item>
    </Components>
</Item>

Collegamento nel fxmanifest

INFO

A differenza dello .ymt, il file pedvariation.meta non richiede data_file. Basta metterlo in stream/ e FiveM lo carica da solo.

-- fxmanifest.lua
 
data_file 'PED_METADATA_FILE' 'stream/*.ymt'
-- Il pedvariation.meta NON ha un data_file specifico
-- Va nella folder stream/ e FiveM lo carica automaticamente

TIP

Prossimo passo: 07 - fxmanifest per Ped


Torna alla: Indice Generale