Studios
Appearancehouse-3.jpg

Clothing Idents

SoonAppearanceQBCore · Qbox · ESX
PAGE 07 OF 07  ·  COMMANDS & EXPORTS → CLOTHING IDENTSdocs.glitchstudios.dev
Browse docs

Addon clothing is saved by drawable number, and those numbers move when packs are added or reordered. Clothing idents give each addon item a stable name such as M11-0042, kept in data/clothing-registry.json. At start the server lists the streamed files of the clothing resources (those in a [clothing] folder or named in the registry) and only trusts the idents while that layout matches the registry. They are off by default.

  1. Run node tools/clothing-registry.js --init from the resource folder. It reads the packs in resources/[assets]/[clothing] or resources/[clothing]. Set CLOTHING_DIR to use another folder. The package ships without a registry, because each server's registry describes its own packs.

  2. Set Config.ClothingIdents.Enabled = true and restart. The console says whether the registry matches.

  3. Give your staff the clothing idents permissions listed under Installation, or let glitch-admin's staff roles decide.

  4. Run the one-time migration from the server console:

    clothingidents snapshot <id of an online staff member>
    clothingidents dryrun
    clothingidents status
    clothingidents run
    

    A backup of every changed row goes to server/backups/ first, and clothingidents restore puts them back. With glitch-admin, its Clothing idents panel does the same.

Config.ClothingIdents.ExtraTables adds other resources' tables of saved looks to the migration:

Config.ClothingIdents.ExtraTables = {
    { name = "my_wardrobe", key = "id", cols = { "outfit" }, model = "model" },
}

Run node tools/clothing-registry.js again after every clothing pack change, before the restart. With glitch-shotMaker installed the tool also checks its photo index, and PHOTO_INDEX points it at another photo-index.json.

With idents off the scan does not run and nothing touches the database. Rockstar items still get idents, and addon items keep their numbers.