# Configuration > Configuration reference for ML Random Cloth Category: RANDOM CLOTHING · Source: https://miciomods.it/docs/random-cloth-configuration · Last updated: 2026-07-28 ## Overview All settings live in `shared/config.lua`. This page covers every value: drop weights, the 15 standard pack definitions, drawable exclusions, bag stash sizes, timings, the internal clothing map, default drawables, and custom packs. ## General **shared/config.lua** ```lua Config.Debug = false -- Enable debug prints in console Config.Language = 'en' -- language code; see the locales/ folder ``` - `Config.Debug`: prints internal debug lines prefixed with `[ml_random_clothing]` when `true`. Leave `false` in production. - `Config.Language`: selects the locale used for in-game text. The resource ships with `en` and `it` locale files. The other codes listed in the comment fall back to `en` if no matching locale file is present. ## Drop Weights **shared/config.lua** ```lua Config.ItemPercentages = { mask = 8, -- Face mask hat = 8, -- Head accessory earrings = 8, -- Ear accessory glasses = 8, -- Eyewear chain = 8, -- Necklace/chain undershirt = 8, -- Undershirt jacket = 18, -- Outer top (higher chance) pants = 18, -- Leg wear (higher chance) bodyarmor = 3, -- Body armor (rare) bracelet = 8, -- Wrist accessory watch = 8, -- Watch bag = 3, -- Backpack (rare) shoes = 8, -- Footwear gloves = 8, -- Hand wear decals = 5, -- Decals/badges } ``` - `Config.ItemPercentages`: relative weight for each clothing type. A higher number means that type is picked more often. These are relative weights, not percentages, and they do not need to sum to 100. A single `pack_jacket` always gives a jacket, so the weights only matter for packs or loot tables that mix several types. ## Excluded Drawables **shared/config.lua** ```lua Config.ExcludedDrawables = { female = { pants = { 5, 10 }, jacket = { 20 }, }, male = { pants = { 3, 7 }, jacket = { 12, 14 }, }, } ``` - `Config.ExcludedDrawables`: GTA drawable IDs the random generator skips, per gender and per clothing type, because those models are broken or glitched. Any drawable listed here is never rolled in standard random mode. Add IDs under the matching gender and type to blacklist more. ## Bag Sizes **shared/config.lua** ```lua Config.BagSizes = { female = { [1] = { weight = 5000, cols = 3, rows = 2 }, [2] = { weight = 10000, cols = 4, rows = 3 }, [3] = { weight = 10000, cols = 5, rows = 3 }, }, male = { [1] = { weight = 5000, cols = 3, rows = 2 }, [2] = { weight = 10000, cols = 4, rows = 3 }, [50] = { weight = 15000, cols = 5, rows = 4 }, }, } ``` - `Config.BagSizes`: stash size per bag drawable, keyed by GTA drawable index, split by gender. `weight` is the stash capacity, `cols` and `rows` define the grid. - This table also acts as a whitelist for bags in random mode: when a `pack_bag` is opened, only drawable IDs that have an entry here can be rolled. A bag drawable with no size entry is never given. ## Timings **shared/config.lua** ```lua Config.Progress = { OpenDuration = 2500, -- Duration (ms) of the progress bar when opening a clothing item } ``` - `Config.Progress.OpenDuration`: length in milliseconds of the progress bar shown while opening any pack, standard or custom. Default `2500` (2.5 seconds). ## Clothing Map **shared/config.lua** ```lua Config.ClothingItems = { hat = { slot = 11, type = 'prop', componentId = 0 }, undershirt = { slot = 12, type = 'component', componentId = 8 }, jacket = { slot = 13, type = 'component', componentId = 11 }, bodyarmor = { slot = 14, type = 'component', componentId = 9 }, gloves = { slot = 15, type = 'component', componentId = 3 }, pants = { slot = 16, type = 'component', componentId = 4 }, shoes = { slot = 17, type = 'component', componentId = 6 }, mask = { slot = 18, type = 'component', componentId = 1 }, glasses = { slot = 19, type = 'prop', componentId = 1 }, earrings = { slot = 20, type = 'prop', componentId = 2 }, chain = { slot = 21, type = 'component', componentId = 7 }, bracelet = { slot = 22, type = 'prop', componentId = 7 }, watch = { slot = 23, type = 'prop', componentId = 6 }, bag = { slot = 24, type = 'component', componentId = 5 }, decals = { slot = 25, type = 'component', componentId = 10 }, } ``` - `Config.ClothingItems`: maps each clothing type to its GTA slot, whether it is a `component` or a `prop`, and its component or prop ID. The generator uses `type` and `componentId` to count drawable and texture variations on the ped. This is internal wiring for `ml_clothing`. Do not edit unless you are changing how a component is handled. ## Default Drawables **shared/config.lua** ```lua Config.DefaultDrawables = { male = { mask = 0, hat = -1, earrings = -1, glasses = -1, gloves = 0, pants = 21, shoes = 34, bag = 0, undershirt = 15, jacket = 15, bodyarmor = 0, chain = 0, bracelet = -1, watch = -1, decals = 0, }, female = { mask = 0, hat = -1, earrings = -1, glasses = -1, gloves = 0, pants = 15, shoes = 35, bag = 0, undershirt = 15, jacket = 15, bodyarmor = 0, chain = 0, bracelet = -1, watch = -1, decals = 0, }, } ``` - `Config.DefaultDrawables`: the "default outfit" drawable per type and gender. In standard random mode the generator re-rolls to avoid handing out this exact drawable, so players do not receive the plain default look. When only one valid drawable exists it is given anyway. ## Standard Pack Items The 15 standard packs are fixed and do not appear as a config table you edit. Each `pack_` gives one random clothing item of that type. The mapping is documented in the config file comments: - `pack_mask` gives a random mask (component 1) - `pack_hat` gives a random hat (prop 0) - `pack_earrings` gives random earrings (prop 2) - `pack_glasses` gives random glasses (prop 1) - `pack_chain` gives a random chain (component 7) - `pack_undershirt` gives a random undershirt (component 8) - `pack_jacket` gives a random jacket (component 11) - `pack_pants` gives random pants (component 4) - `pack_bodyarmor` gives random body armor (component 9) - `pack_bracelet` gives a random bracelet (prop 7) - `pack_watch` gives a random watch (prop 6) - `pack_bag` gives a random backpack (component 5) - `pack_shoes` gives random shoes (component 6) - `pack_gloves` gives random gloves (component 3) - `pack_decals` gives random decals (component 10) Register these in `ox_inventory` as shown on the Installation page, then give them to players through shops, loot, or crafting. ## Custom Packs **shared/config.lua** ```lua Config.CustomPacks = { -- packs go here, all examples are commented out by default } ``` - `Config.CustomPacks`: themed packs you define. Ships empty (only commented examples). Each entry is keyed by the `ox_inventory` item name and must be registered in `ox_inventory` with `client = { export = 'ml_random_cloth.useCustomPack' }`, the same way standard packs use `ml_random_cloth.usePack`. A pack has a `label`, an optional `giveAll` flag, and an `items` table in one of three formats. A pack must use one format, not a mix. Format 1, specific drawables per gender. Picks one random drawable from the list: **shared/config.lua** ```lua military_backpack_pack = { label = 'Military Backpack Pack', items = { bag = { male = { 30, 45, 59, 80 }, female = { 44, 32, 46, 77 }, }, }, }, ``` Format 2, fixed drawable and texture as a tuple `{drawable, texture}`: **shared/config.lua** ```lua pants = { male = { {12, 2} }, -- drawable 12, texture 2 female = { {15, 0}, {18, 1} }, -- random between two combos }, ``` Format 3, plain random. A string array; each type rolls a fully random drawable from the ped model: **shared/config.lua** ```lua starter_clothing_pack = { label = 'Starter Pack', items = { 'jacket', 'pants', 'shoes' }, }, ``` - `label`: display name, used in debug output. - `giveAll = true`: gives one item for every type in the pack. - `giveAll = false` or omitted: gives one random item type from the pack. This is the default. - `items`: either a keyed table (formats 1 and 2, one entry per clothing type with `male` and `female` lists) or a string array (format 3). > **INFO:** Gender lists are independent > > For keyed packs, a type only produces an item for a gender if that gender has a non-empty list. When `giveAll = true`, the server counts how many types have drawables for the player's gender and expects exactly that many items back, so leaving one gender empty is valid.