Dependencies

3 min readUpdated 2 weeks ago

Dependencies

ML Clothing is the clothing and armor core. The advanced inventory ships bundled with it as an open source addon. Both load from the same package, so there is nothing extra to download for the inventory front end.

Required

Resource | Why

ml_bridge | Framework abstraction. Every player, item, and permission call routes through Bridge, so the resource runs on ESX, QBCore, and QBox without code changes.

ox_lib | Callbacks, progress circles, animation helpers, and NUI utilities used by the clothing flow and the admin panel.

oxmysql | Database driver. Used by the admin panel audit log and by the inventory addon.

The included advanced inventory | The inventory front end that renders clothing slots, plate carriers, and bag stashes. It ships with this product.

Load order matters

The advanced inventory and ml_bridge must start before ml_clothing. The manifest also registers a DLC_ITYP_REQUEST for the armor plate prop, so the resource must be present in your server data folder for that asset to stream.

Server config load order

server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ox_inventory
5ensure ml_clothing

The line named ox_inventory above is the included advanced inventory. It is bundled with the product. Do not download it separately.

Framework setup

ml_bridge detects your framework automatically. The blocks below only differ in which core you start before the shared dependencies.

server.cfg
1ensure qb-core
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ox_inventory
6ensure ml_clothing

::

server.cfg
1ensure qbx_core
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ox_inventory
6ensure ml_clothing

::

server.cfg
1ensure es_extended
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ox_inventory
6ensure ml_clothing

::

server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ox_inventory
5ensure ml_clothing

::

Auto Detection

ml_bridge resolves the framework at runtime. There is no framework option to set inside ml_clothing. Player identity, inventory operations, item metadata, and permission checks all go through Bridge.*, so the same build works on every supported core.

Appearance scripts

No appearance script is a dependency. ML Clothing works with whatever is running: it detects illenium-appearance, bl_appearance, 4bit_appearance, codem-appearance (also under its crm-appearance name), fivem-appearance, and qb-clothing at startup and saves worn clothing back through the detected one. With none present it runs in native mode and keeps outfits in item metadata. The clothing and plate systems work either way.

The other direction, turning an outfit saved in the appearance menu into inventory items, is wired with one export or event call inside the appearance script:

lua
1exports.ml_clothing:syncFromNUI(appearanceData)
2-- or
3TriggerEvent('ml_clothing:client:syncFromNUI', appearanceData)

See Clothing Integration for the exact lines to add in illenium-appearance and bl_appearance, and for the adapter files (one per script in open/adapters/) that support any other appearance script.