Clothing
How clothing packs, saved outfits and the store pictures fit together. Clothing lives in the private raze-clothing repo (the raze_clothing resource); the store is in raze_appearance and raze_ui.
Where things go
| What | Where |
|---|---|
| Models and textures | raze-clothing/stream/<pack>/<ped>_<dlcName>/<slot>/ (civ1, civ2, police; replace holds textures that replace base-game ones) |
| Shop metas | raze-clothing/data/<pack>/, each registered in fxmanifest.lua as SHOP_PED_APPAREL_META_FILE |
| Picture indexes | raze-clothing/web/pictures.json (our packs, Rockstar DLCs from 2024 on) and web/vanilla.json (older Rockstar clothing) |
| Store pictures | The picture server, https://raze-cdn.mesender.com/clothing/ (never in a repo) |
Clothing files never leave the private repos. Any change in stream/ needs a full server restart, and players must reconnect to see it. Ask Moe for the restart.
Pieces are saved as pack and number
The game numbers drawables globally: vanilla first, then every streamed pack in load order. Adding or removing a pack shifts every number after it, so a saved global number would point at the wrong piece.
So every saved piece also carries its pin, { collection, local }: the pack's collection name (its dlcName for that ped) and the drawable's number inside that pack. The client reads both with the collection natives (GetPedCollectionNameFromDrawable, GetPedCollectionLocalIndexFromDrawable) and turns a pin back into today's global number (GetPedDrawableGlobalIndexFromCollection). The server checks pins against pictures.json before saving.
- Never store or compare bare global numbers for streamed clothing. Use the pin.
- A pack's drawables are numbered
000up with no gaps, and that number is the local index. - A drawable's
_1file (a jacket open or closed) is an alternate, not a drawable of its own.
Store pictures
One picture per drawable (its first texture). In the store, the variant slider changes the texture live on the ped.
Pictures aren't in raze_clothing's files{}, so players don't download them on join. The picture server only answers a request carrying a key (?k=) that raze_appearance signs for a player in a character, with raze_cdn_key from secrets.cfg (see Getting started). Each key names its character and is capped per day, so a key copied out of the game can't pull the whole catalog. A key lasts until the end of the next day (UTC), and the client gets a new one before it runs out. Without a key, the store shows numbers.
Each index lists a picture name for each local drawable of each slot:
- a name: the picture file
null: no picture (the store shows its number)false: an empty model with nothing to wear. The store hides it. The server refuses to sell empty pieces frompictures.json(isEmptyPiecein@raze/shared/appearance).'none': the base game's one empty piece in a component slot (no mask, no bag, shirtless). The store shows it as a None tile. Empty legs, shoes and torsos make the body vanish, so they're always hidden.
Adding a clothing pack
- Put the pack in
raze-clothing/stream/<pack>/and its metas indata/<pack>/, and register the metas infxmanifest.lua. EverydlcNamemust be new. - Ask Moe for its pictures. Moe renders them, puts them on the picture server and sends you the updated
pictures.json. - Commit the pack, metas and index in
raze-clothing, and ask Moe for the restart.
Until its pictures are up, a new pack shows numbers in the store.