Configuration files#
Everything is in shared/config.lua. The file is open in the escrow, and so are shared/gloves.lua (glove to bare arm table), shared/weaponStats.lua (Inspect stats) and client/custom/client_editable.lua (dressing, undressing and the appearance save). Every message players see is in Config.locales.
Slots and sweep#
| Setting | Default |
|---|---|
Config.retiredSlots |
'auto' |
Config.slotSweep |
'auto' (runs only on a stock ox_inventory build) |
Config.WaitForLoadedOtherScripts |
10000 (ms before items are made after login) |
Config.timeToClearAnimation |
900 (ms an undress or dress animation plays) |
Config.canStealPlayers |
false |
Config.canRenameAllItems |
false |
Config.canChangeDescription |
false |
Config.instantShowPedAfterOpenInventory |
true |
Config.imagePath |
'nui://ox_inventory/web/images' (follows the inventory:imagepath convar) |
Config.slotSweep moves items that a stock AddItem put in a locked or clothing slot back to the pockets.
Integrations#
Each setting takes one resource name or a list, and the first started resource is used. false (or {} for the events) turns one off.
Config.appearance = {
resource = { 'glitch-appearance', 'illenium-appearance' },
saveEvent = 'illenium-appearance:server:saveAppearance',
reloadSkinEvent = 'illenium-appearance:client:reloadSkin',
}
Config.keybindHud = { 'glitch-uiElements' }
Config.injuryResource = { 'glitch-ambulancejob' }
Config.medicalResetEvents = { 'qbx_medical:client:heal', 'qbx_medical:client:playerRevived' }
Config.stateKeys = {
carryBuff = 'buff_carry',
hudWeight = 'hud_weight',
injuries = 'amb:injuries',
}
Ped preview and UI#
Config.uiSettings, Config.enableClonedPedButton and Config.clonedPedSettings set the inventory colours and the ped preview. clonedPedSettings.light.enable = false turns the preview light off. light.shadow = 0 (the shipped value) keeps the light but drops its shadow, which is the expensive part.
Backpacks and /hidebag#
| Setting | Default |
|---|---|
Config.enableBackPackSettings.enable |
true |
Config.enableBackPackSettings.visibleSlots |
49 |
Config.enableBackPackSettings.countOfBlockedSlots |
7 |
backpack |
5 slots (43 to 47), 110 kg |
extrabag |
7 slots (43 to 49), 130 kg |
Config.hideBag.enable |
true |
Config.hideBag.command |
'hidebag' |
Keep visibleSlots equal to the last slot before clothing, or the UI draws cells the server refuses. Each backpack entry also sets the bag model it shows for male and female peds.
Armour plates and outfit bag#
| Setting | Default |
|---|---|
Config.enablePlateAdding.bproofItemName |
'bproof' |
Config.enablePlateAdding.plateAddingTime |
5000 (ms) |
Config.enablePlateAdding.addToActualArmor |
false (the plate sets the armour value; true adds to it, up to 100) |
Config.enablePlateAdding.realisticArmour |
true (armour lives in the vest, and taking the vest off removes it) |
plate_armor, plate_reinforced, plate_military |
50, 75 and 100 armour |
Config.enableBagClotheSettings.maxSlots |
3 |
Config.enableBagClotheSettings.maxNameLength |
30 |
Config.enableBagClotheSettings.realisticSystem.itemName |
'bag_clothes' |
Carry weight and body damage#
Config.weightSlowerSettings has three bands, starting at slowStart = 70, mediumStart = 95 and heavyStart = 115 (kg), with refreshTime = 5000. Each band sets the walk style, speed, trip chance, thirst drain and item drops. Bands apply on foot only. The band messages are WEIGHT_SLOW, WEIGHT_MEDIUM and WEIGHT_HEAVY in Config.locales. Config.damageSettings lists which bones count for each part of the body scan.
Knock-off#
| Setting | Default |
|---|---|
Config.knockOffSettings.enable |
true |
cooldown |
3000 (ms) |
pushSpeed, liftSpeed |
1.5, 1.5 |
landTimeout |
5000 (ms) |
maxLandDistance |
15.0 |
serverTimeout |
10000 (ms) |
pieces sets the knock-off chance per clothing piece.
Item throwing#
| Setting | Default |
|---|---|
Config.itemThrowing.throwForce |
30 |
cooldown |
1000 (ms) |
maxThrowDistance |
100.0 |
landWindow |
20000 (ms) |
maxPlaceDistance |
10.0 |
maxGiveDistance |
3.0 |
throwLifetime |
60000 (ms) |
nearbyRadius |
30.0 |
borrow |
{ windowMs = 600000, budgetMs = 300000 } |
fallbackProp |
'prop_paper_bag_small' |
clearSnowballProjectiles |
true |
controls sets the GTA control and key label for each place mode action. Set clearSnowballProjectiles = false if players on your server throw real snowballs. If you raise throwForce, raise maxThrowDistance to a little over throwForce * throwForce / 9.8.
Ammo boxes and wallet#
Config.ammoBoxes = {
['ammobox-9'] = { ammo = 'ammo-9', count = 30 },
['ammobox-shotgun'] = { ammo = 'ammo-shotgun', count = 8 },
['ammobox-rifle'] = { ammo = 'ammo-rifle', count = 30 },
['ammobox-beanbag'] = { ammo = 'ammo-beanbag', count = 8 },
}
Config.wallet has enable = true, item = 'wallet', idcardResource = { 'qbx_idcard', 'um-idcard' }, mugshotCallback, showEvent and maxMugshotBytes = 64 * 1024. showable lists the cards that can be shown and fits lists the cards "Put my cards in" moves. The card lists are examples, so replace them with your own item names and keep fits the same as the wallet container whitelist.
Clothing slots and the mint check#
Config.clothesAsItems has one entry per clothing slot: hat 50, ears 51, tshirt 52, torso 53, arms 54, legs 55, shoes 56, mask 57, glasses 58, chain 59, bproof 60, bags 61 and watches 62. Each entry holds the appearance component and the dress animation. mintFromAppearance = false means the item is never made from what the ped wears. The vest ships with it, because vests are bought or crafted and hold armour.
| Setting | Default |
|---|---|
Config.clothingMint.remintCooldown |
86400 (seconds; 0 turns it off) |
Config.clothingMint.requireAppearanceSave |
false |
Config.clothingMint.saveWindow |
60 (seconds) |
Config.clothingMint.blockedDrawables |
{} |
With requireAppearanceSave = true, items are only made in the saveWindow after a character loads or the appearance resource saves. blockedDrawables lists, per clothing key, drawables that never become items, such as job uniforms. Config.clearSkinMale_illenium and Config.clearSkinFemale_illenium hold the "nothing worn" drawables.