Skip to content

Configuration

Every option of Cuxial Appearance explained: config, shops, menus, models, restrictions and photo studio.

Behaviour lives in shared/config.lua; shops, menus, models and restrictions live in the data folder. Restart the resource after changing a file.

Some blocks are also editable from the staff panel: prices, secondHand, ui.menuAlpha, and part of wardrobe and trimmer. Their values are stored in the database on first start, and from then on the database wins over shared/config.lua. Change them in the panel. The reset button of the panel brings back the values of the file.

General ​

OptionTypeDefaultWhat it does
debugbooleanfalsePrints traces to the console. Also enabled by setting the convar cuxial_appearance_debug to 1.

Interface · ui ​

OptionTypeDefaultWhat it does
accentstring (hex)configurableAccent colour of the interface.
menuAlphanumber0.85Default background opacity of the menu, from 0.4 to 1. Each player can adjust their own. Editable from the panel.

Staff and logs · admin, logs ​

OptionTypeDefaultWhat it does
admin.permissionstring'admin'Permission of your framework that makes a player staff for this script. See Commands & permissions.
logs.enabledbooleantruefalse turns the Discord logs off.
logs.convarstring'cuxial_appearance_webhook'Name of the convar that holds the webhook.

Commands · commands ​

Each entry has a name and, for staff commands, restricted.

OptionTypeDefaultWhat it does
<command>.namestringsee Commands & permissionsName of the command. An empty name disables the command.
<command>.restrictedboolean | stringfalseACE restriction passed to ox_lib, for example 'group.admin'. false adds none: staff commands still check admin.permission.

Shop menu · menu ​

OptionTypeDefaultWhat it does
openControlstring'E'Default key that opens the shop you are standing in. Each player can rebind it in the GTA key settings.
textUibooleantruetrue shows the on-screen prompt when entering a shop. false shows nothing; the key still works.
alwaysKeepPropsbooleantruetrue keeps hats and glasses on when the player takes damage.
automaticFadebooleanfalsetrue adds the matching hair fade decoration when the hairstyle changes. Only with the built-in tattoos.

Prices · prices ​

Editable from the panel.

OptionTypeDefaultWhat it does
outfitPricenumber100Price of saving an outfit or a look outside a shop. Inside a shop, saving an outfit costs the price of that shop.
outfitBagPricenumber50Price of turning a saved outfit into an outfit item.
outfitSetConsumebooleanfalsetrue removes the outfit item when it is used. false keeps it.
maxOutfitsnumber30Saved outfits per character. From 1 to 200.

Outfits and outfit bag · outfits ​

OptionTypeDefaultWhat it does
outfitCodeLengthnumber10Length of the share codes. From 4 to 32.
setItemstring'cuxial_outfit'Item created when an outfit is packed.
bagItemstring'cuxial_outfitbag'Item of the outfit bag.
bagSlotsnumber5Outfits a bag holds.
bagStoragestring'citizenid''citizenid' = the outfits belong to the character, whatever bag they use. 'item' = the outfits travel inside the item and change hands with it.
bagPropstring'prop_big_bag_01'Model of the bag on the ground.
bagPlaceAnimtablesee fileAnimation played when placing the bag: dict, anim and ms.
bagOpenAnimtablesee fileAnimation played while the bag is open: dict and anim.

Wardrobe · wardrobe ​

OptionTypeDefaultWhat it does
itemstring'cuxial_clothing'Item a garment turns into when it is taken off.
legacyItemstring'clothing'Older garment item that is still accepted: it can be worn and sold, never created.
inventorybooleanconvarInventory mode. Read from the convar cuxial_appearance:inventory (1 = on). Do not edit it here.
panel.excludestring[]{ 'bags' }Pieces left out of the clothing panel and of purchase returns.
panel.animbooleantruetrue plays the dressing animation when using the panel.
purchaseReturnsbooleantruetrue hands back, as items, the garments replaced by a purchase. Inventory mode only. Editable from the panel.
purchase.destinationstring'bag_first'Where returned garments go: 'bag_first' = a garment bag with room, then the inventory; 'inventory_first' = the other way round. Editable from the panel.
purchase.shopBag.enabledbooleantruetrue delivers the garments of a purchase in a shopping bag.
purchase.shopBag.itemstring'cuxial_shopbag'Item of the shopping bag.
purchase.shopBag.minPiecesnumber2Pieces a purchase needs to come in a shopping bag. A purchase with fewer comes loose, unless they do not fit.
purchase.shopBag.slotsnumber20Slots of a shopping bag. It only holds garments and disappears when the last one is taken out.
bag.itemstring'cuxial_garmentbag'Item of the garment bag.
bag.pricenumber50Price of a new garment bag bought with a purchase. Editable from the panel.
bag.slotsnumber12Slots of a garment bag.
search.piecesstring[]see filePieces that can be taken from another player in a body search. Editable from the panel.
search.durationnumber2000Milliseconds each piece takes to remove in a search. From 500 to 10000. Editable from the panel.

Piece names used across the config: hat, glasses, ears, mask, chain, tshirt, kevlar, jackets, gloves, watch, bracelet, decals, bags, legs, shoes.

Second hand · secondHand ​

Editable from the panel.

OptionTypeDefaultWhat it does
payoutnumber0.35Share of the base price the shop pays. From 0.05 to 1.
collectionFactornumber1.3Multiplier for garments that belong to an add-on collection. From 0.5 to 5.
accountstring'cash'Where the money goes: 'cash' or 'bank'.
maxPerSalenumber20Garments sold in one go. From 1 to 100.
basePricetablesee fileBase price of each piece. A piece at 0 is not bought.

The amount paid for a garment is basePrice × payout, times collectionFactor for collection garments.

Trimmer · trimmer ​

OptionTypeDefaultWhat it does
itemstring'cuxial_trimmer'Item of the trimmer.
rangenumber2.5Metres within which the nearest player is picked. Editable from the panel.
durationnumber10000Milliseconds the shave takes. Editable from the panel.
hairLockMinutesnumber20Minutes the shaved player cannot change hair. 0 = no lock. Editable from the panel.
emotestringsee fileCommand of the paired emote of cuxial_emotes played during the shave.
modelstablefreemode modelsPed models that can be shaved, each mapped to 'male' or 'female'.
baldtable0 / 0Hair drawable and texture applied by a trimmer without a custom style, per gender.

Photo studio · photos ​

OptionTypeDefaultWhat it does
resourcestring'cuxial_appearance_photos'Resource where the photos are saved and served from.
captureResourcestring'screencapture'Capture resource tried first. screencapture and screenshot-basic are tried after it.
sizenumber256Side of each photo, in pixels.
qualitynumber0.86Image quality, from 0 to 1.
chromastring'magenta'Background colour removed from the photo: 'magenta' or 'green'.
texturesbooleanfalsetrue also photographs every texture of each garment. Much slower and heavier.
bucketnumber998Routing bucket the staff member is moved to while the studio is open.
studiotablesee filecoords and heading of the spot where the photos are taken.
waitApply, waitCapture, waitPropnumber350, 120, 400Milliseconds waited after applying a garment, before the capture and after a prop. Raise them if photos come out with the previous garment.
uploadRatenumber1000000Transfer rate, in bytes per second, used to send each photo to the server.

Compatibility and NPC pool · compat, npcPool ​

OptionTypeDefaultWhat it does
compat.legacySkinsbooleantruetrue imports a character's old skin the first time it is needed, when it has no saved appearance yet. See the migration command in Commands & permissions.
npcPool.activeDaysnumber30Only appearances saved in the last days feed the pool of random looks. If none qualifies, all are used.
npcPool.sizenumber60Appearances kept in the pool.

The pool is only used through the GetRandomAppearances export.

ACE restrictions · aces ​

Hides models or garments from everyone who lacks an ACE permission. Empty by default.

shared/config.lua
lua
aces = {
    -- ped model -> ACE
    models = {
        ['a_m_y_hipster_01'] = 'appearance.vip',
    },
    -- drawable category -> { [drawable] = ACE }
    drawables = {
        masks = { [120] = 'appearance.vip' },
    },
    -- prop category -> { [prop] = ACE }
    props = {
        hats = { [45] = 'appearance.vip' },
    },
},

Drawable categories: face, masks, hair, torsos, legs, bags, shoes, neck, shirts, vest, decals, jackets. Prop categories: hats, glasses, earrings, mouth, lhand, rhand, watches, bracelets.

A model listed in aces.models can only be chosen and saved by players who hold the permission. Garments in aces are also checked on the server: see Restrictions.

Data files ​

data/shops.lua ​

The default shops. Each entry has label, type (clothing, barber, surgeon, appearance or resale), price, blip (1 or 0), thickness (height of the zone), jobs (empty = public) and points (the corners of the polygon, at least three).

This file is only read when the shop table is empty, on first start. After that, shops are managed from the staff panel. The panel can import the default shops that are missing; it never touches the existing ones.

data/menus.lua ​

The tabs of each menu type and whether it can be closed without saving (allowExit). Available tabs: heritage, hair, clothes, accessories, face, makeup, outfits. The tattoo tab is added to the appearance menu on its own when the built-in tattoos are active.

data/models.lua ​

The ped models offered in the heritage tab. They are also the models a player is allowed to save. The file lists the two freemode models: add your own add-on peds after them.

data/blacklist.lua ​

Garments and models hidden from the menu.

BlockWhat it does
baseHidden from everyone. For each category, values lists whole drawables and textures lists textures of a drawable: textures = { [194] = { 0, 1 } }.
jobs, gangsNamed groups of entries. The jobs groups are hidden from everyone and lifted inside a shop limited to jobs, for players who have one of those jobs. The gangs groups apply to everyone who does not belong to that gang: its members can wear those garments. A group can also carry male and female sub-blocks.
whitelistModels, drawables or props reserved to the character identifiers listed. Everyone else does not see them.

The jobs and gangs entries shipped in the file are examples. The whitelist block ships empty, with commented examples; to reserve garments, features or ped models to characters, jobs or gangs, use the whitelist of the staff panel.

The blacklist is enforced on the server as well as in the menu. See Restrictions.

data/wardrobe.lua ​

The pieces of the wardrobe, the garment each gender wears when a piece is taken off (defaults) and the animation of each piece (anims). Change defaults if your server uses different "naked" drawables.

data/photos.lua ​

Camera presets, lights and backdrop of the photo studio. Cameras can also be adjusted and saved live from the studio itself.

data/tattoos.lua, data/hairdecorations.lua ​

The built-in tattoo list and the hair fade decorations. Edit them only to add your own tattoo packs.

Common changes ​

Free dressing room for the police. Create or edit the shop in the staff panel: type appearance, price 0, and add the job. No file to edit.

Pay second-hand sales into the bank. In the staff panel, settings, second hand: account bank.

Rename the wardrobe command.

shared/config.lua
lua
commands = {
    wardrobe = { name = 'wardrobe' },
},

Keep the other entries of commands as they are: an entry that is removed disables its command.

© Cuxial