Skip to Content

DLC Support

The Problem

GTA V identifies clothing items by a global drawable index (e.g., drawable = 15 for component 3). When Rockstar adds new DLC clothing packs, these global indices can shift, causing saved outfits to point to different items than what was originally saved.

The Solution

illenium-appearance stores DLC collection data alongside the global drawable index. When loading a saved outfit, it resolves the collection + local index back to the correct global index, regardless of what DLCs have been added since.

How It Works

Saving (Reading from Ped)

When reading a ped’s appearance, the resource captures:

  1. Global drawable index - The standard drawable field (always saved for backward compatibility)
  2. DLC collection hash - Identifies which clothing pack the item belongs to
  3. DLC local index - The item’s position within that specific collection
-- Stored in each component/prop/hair entry: { drawable = 15, -- Global index (may shift with DLC updates) dlc_collection = 0xABCDEF12, -- Collection hash (stable) dlc_localIndex = 5, -- Index within collection (stable) }

Loading (Applying to Ped)

When applying saved outfits, the resource uses two different code paths:

  • Collection-based (SetPedCollectionComponentVariation) - Used when dlc_collection and dlc_localIndex are present. This resolves to the correct current global index.
  • Global index fallback (SetPedComponentVariation) - Used for legacy saves without collection data, or base-game items.

NUI Live Preview

When the player scrolls through items in the customization menu, the NUI always sends global drawable indices. Single-item setters (setPedComponent, setPedProp, setPedHair) always use SetPedComponentVariation with global indices. This ensures smooth live preview.

Collection-based setting is only used when loading from saved data (bulk setters: setPedComponents, setPedProps, setPedHairFromSaved).

Backward Compatibility

ScenarioBehavior
Old save, new codeMissing dlc_collection fields - falls back to global drawable index
New save, old codeExtra dlc_collection fields are ignored - only drawable/texture read
Gradual migrationOutfits get collection data when re-saved by players

Natives Used

NativePurpose
GetPedDrawableVariationCollectionNameRead collection hash from current ped state
GetPedDrawableVariationCollectionLocalIndexRead local index within collection
SetPedCollectionComponentVariationSet component by collection + local index
GetPedPropCollectionNameRead prop collection hash
GetPedPropCollectionLocalIndexRead prop local index
SetPedCollectionPropIndexSet prop by collection + local index
Last updated on