qb-inventory (compatibility shim)
This resource contains no inventory logic. It forwards the old qb-inventory export name to lumo-inventory.
Why it exists
The inventory was renamed to lumo-inventory. On a typical server around seventy resources call it by the old name — including qb-core itself, in server/player.lua, server/functions.lua and client/functions.lua:
lua
exports['qb-inventory']:AddItem(src, item, amount)Renaming the folder without this would break every one of them at once, plus any third-party or customer script you do not control.
FiveM's provide directive claims a resource "will act as if it is said resource", which may route exports — but the documentation does not say so explicitly, and 77 call sites is not the place to find out. This shim works regardless.
Install
Copy the qb-inventory folder into your resources and start it afterlumo-inventory:
cfg
ensure lumo-inventory
ensure qb-inventory # this shimDo not run it alongside a real qb-inventory.
When you can delete it
Once nothing calls the old name. To check:
bash
grep -rn "exports\['qb-inventory'\]\|exports\.qb-inventory" resources/ --include="*.lua"If that returns nothing but this folder, remove it and drop the ensure line.
The one behavioural difference
lumo-inventory records the calling resource in its audit log, via GetInvokingResource(). A call routed through this shim is invoked by the shim, so it is logged as coming from qb-inventory rather than from the resource that really made it.
This affects the "Resource:" line in inventory logs only — nothing functional. Resources updated to call exports['lumo-inventory'] directly are logged accurately.
Adding a forwarder by hand
You never need to run anything to install or use this shim. It is finished and in sync. This section only matters if you later add a new export to lumo-inventory and want the old qb-inventory name to reach it too.
Every forwarder is the same five lines. To add one, open qb-inventory/server.lua (or client.lua for a client export), and paste this in alphabetical order among the others, replacing YourExportName with the name you added:
lua
exports('YourExportName', function(...)
return exports[INVENTORY]:YourExportName(...)
end)That is the whole change — ... forwards every argument and return forwards every return value, so nothing else needs adjusting. Then bump the count in the comment above the first export (--- 42 forwarded server exports.) so it stays honest.
To find what is missing, compare the two lists:
bash
# exports lumo-inventory defines
grep -oh "exports('[A-Za-z_]*'" server/*.lua | sort -u
# exports the shim forwards
grep -oh "exports('[A-Za-z_]*'" qb-inventory/server.lua | sort -utests/lumo/test_inventory_shim.lua fails if the two ever drift apart, so a forgotten forwarder is caught by ./tests/lumo/run.sh rather than in game.
The scripted alternative (optional)
compat/generate.py regenerates the whole file from the real exports, if you would rather not edit by hand:
bash
cd lumo-inventory && python3 compat/generate.py # qb-inventory shim
cd lumo-inventory && python3 compat/generate_ox.py # ox_inventory shimIt is a maintainer convenience only. Editing the Lua by hand is equally valid and produces the same file.