F.A.Q

17 min readUpdated 2 weeks ago

F.A.Q

Install

No. ML Inventory is an addon that installs inside your own ox_inventory folder. It is not a fork, not a patched copy and not a replacement.

What the download contains:

  • micio/: the Micio Mods Lua. Grid layer, equipment, loot, admin runtime, the configuration files and the interface strings.
  • web/build: the interface, shipped compiled with its fonts.
  • web/images/placeholder: the empty slot art for the equipment panel. No item icon ships with the download.
  • fxmanifest.lua: replaced, because FiveM allows one manifest per resource. It loads the Micio Mods files next to yours.

What the download does not contain:

  • No ox_inventory file. client.lua, server.lua, init.lua, modules/, data/ and locales/ stay the ones you installed.

You bring your own copy of ox_inventory. It is free and published under the GPLv3 by Overextended. Your rights over those files are unchanged.

ox_inventory is the work of Overextended: github.com/overextended/ox_inventory.

From your server, or from the ox_inventory repository, where it is free. Rename that folder to ml_inventory, delete web/build inside it, then copy the download in.

Tested on ox_inventory 2.47.7 through 2.47.9. Releases outside that range have not been checked, so stay inside it.

On an older copy, update ox_inventory first, then install.

Yes. The resource also answers to the name ox_inventory, so every exports.ox_inventory call and every ox event reaches it as before. No script of yours needs an edit.

Because of that second name. txAdmin lists it as a row of its own next to ml_inventory. It is the same resource seen twice, not a second inventory. Leave it alone and never stop it.

Yes. The item definitions in data/items.lua, the locales/ folder, the icons in web/images and every table in your database are left alone by the install.

Two things change on a server that already has players. What a player carries is playerCols times playerRows:

micio/config/grid.lua
1MicioConfig.Grid.playerCols = 8
2MicioConfig.Grid.playerRows = 4
  • playerCols, default 8: columns in the pocket grid.
  • playerRows, default 4: rows in the pocket grid.

Slots 1 and 2 are the weapon slots, slots 11 to 25 the clothing slots. A weapon already in a weapon slot stays there. So does a clothing piece in its matching clothing slot. Anything else found in those slots, and anything saved in a slot past the new capacity, is moved into a free grid cell when the character loads:

micio/config/core.lua
1MicioConfig.Rescue = {
2    enabled = true,
3    report = true,
4}
  • enabled, default true: move misplaced items into free grid cells, once per character.
  • report, default true: print the capacity comparison at boot.

Nothing is deleted: an item with no free cell to move to stays where it was saved. Give the grid enough cells to cover what your players were carrying, and back up the inventory table and your framework player table before the first start.

Wait for a Micio Mods release that lists the new version in its tested range. The grid depends on parts of ox_inventory that change between ox releases, so updating ox on its own can break it with no warning.

If you have to move first, do it on a test server:

  • Update the ox files in the folder.
  • Delete web/build.
  • Copy the download over the folder again, so the manifest and the interface sit on top.
  • Repeat the checks at the end of the installation guide.

micio/config and micio/translations are not touched by an ox update.

The framework comes from the convar stock ox_inventory already reads, and it knows esx, nd, ox and qbx:

server.cfg
1setr inventory:framework "qbx"
  • inventory:framework, default 'esx': which framework the resource talks to and which database tables it reads. Accepted values: esx, nd, ox, qbx.

On a qb-core server that line is still qbx: the download ships a qb-core layer that loads under that setting whenever qb-core is running and qbx_core is not. The server prints a warning at boot when qb-core runs with any other value.

ML Clothing reaches your framework through ml_bridge, so it needs no framework option of its own.

Start from a clean ox_inventory folder inside the tested range instead of updating the old one in place. Copy your data/ and your web/images back into it, keep the database as it is, then follow the installation guide from the first step.

The old ml_clothing is replaced by the one in this package. Items sitting in a weapon or clothing slot they do not belong in are moved into free grid cells the first time each character loads.

Everyday use

An inventory:imagepath line in server.cfg that still points at the old folder name is the usual cause. Point it at ml_inventory or delete the line:

server.cfg
1setr inventory:imagepath "nui://ml_inventory/web/images"
  • inventory:imagepath, no default line: where every script that reads it looks for item icons. With no line at all the icons are read from ml_inventory itself.

If that path names a resource that is not on the server, the icons stay missing here and in every other script reading the same convar. The server prints the path at boot.

It runs as its own resource next to the inventory, and without it there are no clothing slots, no outfits, no plate carrier, no backpacks and no admin panel. Start it after ml_inventory, and give it ml_bridge.

Two settings, one per resource. The inventory:

micio/config/core.lua
1MicioConfig.Language = 'auto'
  • Language, default 'auto': follows the ox:locale convar. Set a language code present in micio/translations/ to force one instead.
server.cfg
1setr ox:locale "en"
  • ox:locale, default 'en': the language code both resources follow while their Language setting is 'auto'.

The interface reads its strings from micio/translations/. The locales/ folder of ox_inventory keeps serving ox's own messages.

ML Clothing has its own setting and its own folder:

shared/config.lua
1Config.Language = 'auto'
  • Language, default 'auto': follows the ox:locale convar. Set a language code present in locales/ to force one instead.

In three files under micio/config/:

  • core.lua: the debug flag, the language and the rescue.
  • grid.lua: the grid sizes and durability stacking.
  • ui.lua: the interface, the HUD, the item in hand, rename and the tooltip.

ML Clothing keeps its own in shared/config.lua and shared/invadmin_config.lua, with the ped models the admin panel offers a shop in shared/invadmin_peds.lua and the prop models it offers a stash in shared/invadmin_stashprops.lua. Every key is listed on the configuration page.

The admin panel edits those three inventory files while the server runs, from its Settings tab:

shared/invadmin_config.lua
1Config.Command = 'invadmin'
  • Command, default 'invadmin': the command that opens the panel.

Each key gets a row with its spec next to it. MicioConfig.Language, MicioConfig.UI.rarityStyle and MicioConfig.UI.Hud.style are dropdowns. Values are type checked before the write, the previous file is copied into data/ first, and the new values load at the next start of the inventory.

No. An item, a stash, a shop or a rarity colour saved from the panel reaches every connected player as it is saved, and a shop brings its marker, blip, ped and target with it. Only the Settings tab is different: the values it writes into micio/config load at the next start of the inventory.

With width and height on the item definition, or with the grid shorthand:

data/items.lua
1['radio'] = {
2    label = 'Radio',
3    weight = 1000,
4    grid = '2x1',
5},

Set one or the other, never both. An item with neither takes one cell. Sizes can also be set from the admin panel while the server runs.

Yes, standing within 5 metres. The check is in open/server.lua, so your own rule goes there:

open/server.lua
1function OpenServer.CanSearchPlayer(src, targetId)
2    return true
3end

Return false to refuse, for example while the target is alive, or not cuffed, or not in your own consent system.

No, and there is no SQL file in the package. ML Clothing creates ml_invadmin_audit and ml_clothing_stash_props on first start. The inventory keeps using the tables it uses today.

A player renames an item from its context menu, and the name is stored on that stack: 30 characters at most, control characters stripped, an empty name puts the original label back. Rename is open to every item until you close it:

micio/config/ui.lua
1MicioConfig.UI.Rename = {
2    enabled = true,
3    blacklist = {},
4}
  • enabled, default true: let players give an item their own name from its context menu.
  • blacklist, default {}: item names players may not rename, for example 'water', 'bandage'. The server refuses the rename and the player is told.

portions on the item definition splits one item into several uses. The tooltip counts them down as bites, sips, puffs or uses, depending on what the item restores:

data/items.lua
1['sandwich'] = {
2    label = 'Sandwich',
3    weight = 220,
4    portions = 4,
5},

portions accepts 2 to 20 and is ignored on weapons, ammo, components and tints, where durability already means condition. The status values on the item are divided by the number of portions, so four bites of a sandwich restore as much as the whole sandwich. Add use = 'food', 'drink' or 'smoke' when the item restores something that is not read as food or drink and you still want the eating, drinking or smoking wording.

Using a portioned item takes it into the hand and closes the inventory instead of consuming it on the spot:

micio/config/ui.lua
1MicioConfig.UI.Hold = {
2    enabled = true,
3    useKey = 'G',
4    stowKey = 'X',
5    give = true,
6    giveKey = 'H',
7    giveDistance = 2.5,
8    blockControls = {},
9}
  • enabled, default true: take a portioned item into the hand instead of eating it straight away.
  • useKey, default 'G': take a portion. Rebindable by each player in the FiveM keybind settings.
  • stowKey, default 'X': put the item away.
  • give, default true: hand the item in hand over to someone standing in front of you.
  • giveKey, default 'H': start aiming at the person to hand it to. Also rebindable.
  • giveDistance, default 2.5: metres, how far that person may stand.
  • blockControls, default {}: extra control ids kept dead while an item is in hand. The keys above are already covered.

When the last portion is gone the item leaves the inventory and the player is told there is nothing left of it.

Yes, until you turn it off. The receiver gets a dialog in the middle of the screen with the giver's name, the item image, the label, the count, a countdown and two buttons, Accept and Decline. The item stays with the giver until the answer arrives:

micio/config/ui.lua
1MicioConfig.UI.Give = {
2    consent = 'prompt',
3    timeout = 15,
4    distance = 5.0,
5    acceptKey = 'Y',
6    declineKey = 'N',
7}
  • consent, default 'prompt': prompt waits for the receiver, auto hands the item over at once.
  • timeout, default 15: seconds the receiver has to answer.
  • distance, default 5.0: metres the two players may be apart while an offer is open. Walk further than that and the offer is cancelled, and both players are told.
  • acceptKey, default 'Y': accepts the offer. Each player can rebind it in the FiveM keybind settings.
  • declineKey, default 'N': declines the offer. Also rebindable.

The dialog works with the inventory closed. It takes the mouse cursor while it waits, the player keeps walking and driving, and the cursor goes back to the game the moment the dialog closes. The buttons answer with the mouse, the two keys above answer without it, and Escape declines. A declined or lapsed offer leaves the item with the giver, who is told. The same player has to wait a few seconds before offering again. Give from the item context menu and the handover of the item in hand both go through the same dialog.

It is drawn by the interface while the inventory is closed: a card for the weapon in slot 1, a slimmer one for slot 2, and the five quick slots of the item wheel under them. The position and the size below are the starting point:

micio/config/ui.lua
1MicioConfig.UI.Hud = {
2    enabled = true,
3    style = 'tactical',
4    locked = false,
5    x = 97,
6    y = 96,
7    scale = 100,
8    emptySlots = true,
9    mode = 'always',
10    showSeconds = 5,
11}
  • enabled, default true: draw the HUD. false turns it off for everyone: the player's own show button brings it back for the session, not for the next connect.
  • style, default 'tactical': tactical, classic, minimal, rarity or glass.
  • locked, default false: true keeps every player on the style, position and scale set in this block.
  • x, default 97: percent of the screen width. At 60 or above the HUD sits against the right edge, at 40 or below against the left edge, and between the two it is centred on that percentage.
  • y, default 96: percent of the screen height where the bottom edge of the HUD sits, 0 is the top edge.
  • scale, default 100: percent, 60 to 140.
  • emptySlots, default true: draw the five quick slots even when empty. false shows only the slots holding an item.
  • mode, default 'always': always keeps the HUD on screen, key shows it only for showSeconds after the HUD key or a quick slot key.
  • showSeconds, default 5: seconds on screen in key mode.

While locked is false the player gets two buttons in the open inventory. One hides and shows the HUD. The other opens edit mode: the inventory closes, the HUD stays on screen with the cursor, drag it where you want it, pick the style, press Done or Enter. Escape puts the previous position, scale and style back. That choice is kept on the player's machine, like the accent colour, the scale, the opacity and the panel positions. Set locked = true and both buttons disappear: every player then sees the style, position and scale set here.

The gear button in the pockets header. Appearance: style family, accent colour, interface scale, background opacity, screen effects. HUD: show or hide, style, a button that starts the HUD editor. Layout: reset the panel positions, reset everything. Changes apply at once and are saved on the player's machine. The HUD section is hidden when Hud.locked is on, the accent colour when enableThemePicker is off, the family row when families holds one name.

MicioConfig.UI.Panels holds the position of each panel, family, defaultTheme, defaultScale and defaultOpacity the look. Set layoutStudio = true, open the settings in game and press Open next to Layout studio: every panel appears with sample items, drag them into place, pick family, colour, scale and opacity, press Copy layout and paste the snippet into micio/config/ui.lua. The snippet raises layoutVersion, which clears the positions players saved before, so they start from your layout and personalise from there.

A shop opens as its own panel: name, product count, search, category chips. Each product card shows image, label, price and stock. Money prices are green, black money red, an item used as currency shows its icon next to the amount, a free item says Free. A rank requirement is shown on the card. Each card has a quantity stepper and a Buy button, and dragging a card into the pockets works as before. The server checks stock, licence, rank, weight and money, then places the item on the first free cells.

An ox_inventory crafting bench opens as a recipe panel. Each card shows the result, the yield, the duration and the ingredients with have and need counts, green when enough, red when short. A durability cost is shown as a wear percentage. The stepper stops at what the ingredients allow. A recipe the player cannot craft stays visible, dimmed. Craft starts the ox progress circle and the result lands in the pockets. Recipes come from the ox bench definitions.

By default, yes. MicioConfig.UI.walkWhileOpen in micio/config/ui.lua keeps movement keys and sprint active with the inventory open, the camera stays put and the character preview follows. While a text field has the cursor the keys type. false holds the player in place.

MicioConfig.UI.Effects in micio/config/ui.lua: vignette sets the edge darkness, tint uses the accent colour, enabled = false removes it for everyone. blur is off by default: it is a full screen effect and blurs the character preview too. Players can switch the effects off in the settings.

They use the item assigned to that quick slot. Items are assigned from the inspect panel. An empty slot does nothing. A portioned item goes into the hand instead of being consumed. The HUD shows the same five slots with their keys. The keys, rebindable per player in the FiveM keybind settings:

micio/config/ui.lua
1MicioConfig.UI.Keys = {
2    wheel = 'z',
3    hotkeys = { '1', '2', '3', '4', '5' },
4    hud = 'TAB',
5}
6
7MicioConfig.UI.Wheel = {
8    enabled = true,
9}
  • wheel, default 'z': opens the item wheel.
  • hotkeys, default { '1', '2', '3', '4', '5' }: the five quick slot keys, in order.
  • hud, default 'TAB': shows the HUD while Hud.mode is 'key'.
  • Wheel.enabled, default true: false removes the radial wheel. The quick slots and their keys stay.

The item label, the description, the weight, the durability and the portions left, plus the metadata keys you allow:

micio/config/ui.lua
1MicioConfig.UI.Tooltip = {
2    metadataWhitelist = { 'type', 'registered' },
3    showUnlisted = false,
4    metadataPerItem = {},
5}
  • metadataWhitelist, default { 'type', 'registered' }: metadata keys shown on every item. Keys listed in ox's own displayMetadata are shown as well, without repeating them here.
  • showUnlisted, default false: show every metadata key instead, apart from the ones that already have a line of their own in the tooltip and any value that is not a single number or string.
  • metadataPerItem, default {}: per item, ['note'] = { 'author' } adds keys, true shows all, false shows none.

By the rarity field on the item definition, drawn on the slot in one of three ways:

micio/config/ui.lua
1MicioConfig.UI.rarityStyle = 'border'
  • rarityStyle, default 'border': how rarity shows on a slot, border, full or glow.

The names are common, uncommon, rare, epic and legendary. An item without the field counts as common. Sorting by rarity follows that order. Colours and rarity of an item are editable from the admin panel while the server runs.

When their durability is close enough:

micio/config/grid.lua
1MicioConfig.Grid.durabilityStackTolerance = 5
2MicioConfig.Grid.durabilityStackPerItem = {}
  • durabilityStackTolerance, default 5: percentage points two durability values may differ and still stack. 0 stacks only identical values.
  • durabilityStackPerItem, default {}: per item override, ['sandwich'] = 25.

Values are clamped to 0 through 100. Two items further apart than the tolerance keep their own cell.

Updates

Stop the server, then work inside the ml_inventory folder:

  • Replace fxmanifest.lua.
  • Replace micio/ whole, then put your edited micio/config files back. A new build can add a key: compare the new config files with your copies before putting them back.
  • If you edited micio/translations/, copy your changes into the new files instead of keeping the old ones. A string added by the new build would otherwise show as its key.
  • Delete web/build, then copy the new web/build in.
  • Leave data/ and web/images alone.

Replace the whole folder except shared/config.lua and shared/invadmin_config.lua (your settings), shared/invadmin_peds.lua and shared/invadmin_stashprops.lua (the ped and prop lists the admin panel offers), open/ (your hooks) and locales/ (your translations).

No. There is no SQL file in the package and no migration to run. The two tables ML Clothing needs are created on first start, and the inventory keeps using the tables your server already has.

Inventory F.A.Q, FiveM Docs | Micio Mods