Skip to content

Catalogue & packs ​

The catalogue is the list of every clothing piece the game streams, for both freemode models. Stores, the wardrobe and the uniform designer all sell and show pieces from it. It is built by a scan in game and stores every piece in a way that survives game updates and new clothing packs.

Update-proof clothing IDs ​

Most clothing scripts save a piece as its global number: component 11 = drawable 287. GTA numbers drawables across every pack in load order. When a game update or a new addon pack inserts drawables before 287, the number now points at a different jacket, and every saved outfit after that point shows the wrong piece.

np_clothing saves which pack a piece comes from and its number inside that pack:

m/c11/mp_m_freemode_01_mp_m_lowrider_01/3      texture 2
│  │   │                                │
│  │   └ pack (collection) name          └ number inside the pack
│  └ slot (components c1 … c11, props p0 p1 p2 p6 p7)
└ sex: m = mp_m_freemode_01, f = mp_f_freemode_01

The base game is the pack with an empty name: m/c11//287. A worn piece is { id, t = texture, pal = palette? }.

When an outfit is put on, the client asks the game where that piece lives today (GetPedDrawableGlobalIndexFromCollection) and applies the answer. A new pack can move the global number from 287 to 291; the outfit doesn't notice. The reverse lookup turns whatever a ped wears into piece ids, which is how the first-load import and the legacy import work.

Index-based (most scripts) Name-based (np_clothing)
Saved: c11 = 287. A DLC inserts 4 drawables before it, so 287 is now a different jacket Saved: lowrider_01 #3. On load the game says where it lives today (287, later 291)

Real names. The scan reads each piece's shop item and its GXT label from the game's shop data, so pieces show their real GTA name ("Gray Broker Sweater") instead of "Jacket #287". Staff can override any label.

Missing packs ​

If a pack is no longer streamed (a removed addon, a renamed folder), its pieces are hidden, not deleted:

  • stores stop selling them;
  • outfits and the current look show the slot's default instead;
  • the wardrobe keeps them, grey, with the note hidden, not lost;
  • ownership, outfits and share codes are never changed.

When the pack is streamed again, everything comes back by itself.

Global-index mode ​

On a game build without the collection natives, every new piece id is <sex>/<slot>/#global/<n>. Pieces saved with pack names stay in the database but can't be resolved there; their packs count as missing until the server runs a build that has the natives.

The scan ​

A staff member's client walks every pack of mp_m_freemode_01 and mp_f_freemode_01 and uploads the result: pack, number, textures, global number, shop item name and label. The server stores it per game build and pack hash. A scan must cover every model in Config.Catalogue.scanModels; one that doesn't is refused (scan_models).

  • Automatic (Config.Catalogue.autoScan): the first staff member with np_clothing.packs who joins after the game build or the streamed packs changed scans in the background.
  • By hand: /clothing scan, Rescan catalogue in the pack manager, or the np_admin staff action Rescan clothing catalogue.

Every scan is compared with the last one. Packs are marked new (price them, give them a label or let the rules sort them into stores), missing (hidden; the pack manager shows how many characters own pieces of it) or moved (global numbers changed, which needs no action because keys are name-based). A difference fires np_clothing:catalogueChanged.

Held scans. A client that failed to stream a pack must not hide everybody's clothes. A scan that would mark more than Config.Catalogue.maxMissingShare (25 %) of the known packs missing is held: nothing changes, staff get a toast, and the pack manager shows the held scan with Apply anyway or Drop it. A new scan replaces the held one, and a held scan can't be applied once the catalogue changed since (scan_stale: scan again).

Held scan

Pack manager ​

/clothing packs (or /clothing, or the np_admin staff action Clothing pack manager), node np_clothing.packs.

Pack manager

  • Overview: packs, named pieces, new and missing packs, priced pieces, broken outfits, and when the last scan ran.
  • Packs: every pack with its source (GTA V, GTA Online, server addon), piece count, how many pieces stores carry, and its status.
  • Per pack: display name, fashion label, price override, faction only (a faction id: the pack is only issued through Universal Uniform to that faction's members, never sold in public stores and refused in anyone else's wardrobe), release (hidden until a date, or Release now) and Hidden from stores.
  • Per piece (Show pieces): label, fashion label, price, hidden and faction-only, for one piece.
  • Held scan: apply or drop a scan that would hide too many packs (see Held scans).
Pieces of a pack Missing pack
Pieces Missing

Staff edits are stored in the database and win over the config rules. Every edit is logged.

Labels ​

Which fashion label a piece carries decides which stores stock it and its price factor. Set it per pack or per piece in the pack manager, or with rules:

lua
Config.Brands = {
  { brand = 'perseus', pack = 'luxe_0[12]' },                            -- pack name matches (Lua pattern)
  { brand = 'sessanta-nove', pack = 'business_02', slots = { 'c11', 'c4' } },
  { brand = 'didier-sachs', shop = '^CLO_LXM_' },                        -- shop item / GXT label matches
}

The first matching rule wins; slots and sex = 'm' | 'f' narrow it. The shipped rules are commented out, so a fresh server sells unbranded pieces until staff decide.

Legacy import ​

Legacy import

Skins saved by other scripts hold global numbers. The importer in the pack manager (node np_clothing.import) turns them into piece ids:

Source Reads
illenium illenium-appearance playerskins.skin (active skins)
qb-clothing qb-clothing playerskins.skin
skinchanger ESX users.skin (esx_skin / skinchanger)
np_character np_character's stored appearance
  • Dry run first: it reports what would be converted without writing anything.
  • Numbers are translated with a snapshot of the game build the skins were saved on (Config.Import.build). When a scan of that build exists, the translation is exact. Otherwise the current catalogue is used, and pieces outside the base game go to the review list.
  • Review: ambiguous pieces wait for staff, with the candidate pieces to pick from, or Dismiss.
  • Converted pieces become owned by the character (source import). Defaults (bare torso, no hat) are skipped. The current look itself isn't touched: the wardrobe's first-load import reads what the ped wears when the character joins.
  • Only sources whose resource is started are offered (skinchanger also with es_extended).

Thumbnails ​

Piece pictures are rendered in game, not drawn by hand. /clothing thumbs <slot> [pack] (node np_clothing.packs, needs screenshot-basic) puts each piece on your ped at a plain backdrop, takes a screenshot and saves it to thumbs/. Without thumbnails the UI shows the slot glyph.

Auto arms ​

When an outfit changes the top (c11) and leaves the arms (c3) alone, the client picks arms that fit the top: from Config.ArmsForTop, the pairing the scan learned from the shop data, or the game itself. Players never see invisible arms.

Config ​

lua
Config.Catalogue = { autoScan = true, chunk = 400, scanModels = { 'mp_m_freemode_01', 'mp_f_freemode_01' },
  maxMissingShare = 0.25, yieldEvery = 150, perPage = 25, newDays = 7, packLabels = { lowrider_01 = 'Lowriders', … } }
Config.Import = { build = nil, batch = 200, reviewMax = 2000, sources = { … } }
Config.Thumbnails = { enabled = true, resource = 'screenshot-basic', encoding = 'jpg', quality = 0.85,
  maxBytes = 400000, settleMs = 350, coords = { x = 402.9, y = -996.6, z = -99.0, w = 180.0 } }
Option Description
Catalogue.autoScan Scan when a staff member joins after a build or pack change
Catalogue.scanModels Models a scan walks; a scan must cover all of them
Catalogue.maxMissingShare A scan that would mark more than this share of the known packs missing is held for staff
Catalogue.chunk / yieldEvery Rows per upload, drawables walked per frame
Catalogue.perPage / newDays Pack manager page size; how long a piece counts as new
Catalogue.packLabels Display names of the GTA Online packs. Unknown packs get a title-cased name; staff can rename any
ArmsForTop [top piece id] = arms Worn, per sex
Brands Label rules, see Labels
Import.build Game build the old skins were saved on (nil = the current catalogue's)
Import.sources Table, key and JSON column per source, and its format (appearance, qb, skinchanger)
Thumbnails Renderer settings: screenshot resource, format, size limit, where the ped stands