illenium-appearance patch
Apply the illenium-appearance patch the Eleven Inventory Equipment panel needs on FiveM: with the patch command or one pasted block, plus job and gang uniforms.
Why it's needed
The Equipment panel writes every garment a player puts on or takes off into their saved appearance in illenium-appearance, one slot at a time, so the change survives skin reloads and reconnects. illenium-appearance doesn't expose that out of the box, so this small patch adds three server exports to server/server.lua. It only adds new code: nothing illenium already does is changed.
| Export | What it does |
|---|---|
GetSavedAppearance(target) | Returns a character's active saved appearance (or nil). |
ApplySavedAppearanceChanges(target, changes) | Writes { kind, id, drawable, texture } changes into the saved appearance and saves it. Hair, face, tattoos and every other slot are kept. |
IsWearingUniform(target) | True while the character is wearing a job or gang uniform. |
target is a server id or the character identifier illenium uses (citizenid on Qbox/QBCore, identifier on ESX).
Everything lives in precinto-inventory/illenium-appearance-patch/:
| File | What for |
|---|---|
precinto-inventory.patch | The patch, ready for the patch command (option A). |
manual/server_exports.lua | The block to paste by hand (option B). |
README.md | The same guide, in English with a Spanish summary. |
LICENSE-illenium-appearance-MIT.txt | illenium-appearance's MIT license. |
Note
You only need this if you use the Equipment panel. With Config.Wearables.enabled = false you can skip this page.
Warning
Back up your illenium-appearance folder before you start. If anything goes wrong, restore it and try the other option.
The patch is written against the illenium-appearance v5.7.0 source and can sit alongside other patches that add code at the end of server/server.lua (for example the Eleven Outfits one).
Option A: the patch command
Open a terminal inside your illenium-appearance folder (the one containing server/ and client/) and do a dry run first; it doesn't change anything:
patch -p1 --dry-run < /path/to/precinto-inventory/illenium-appearance-patch/precinto-inventory.patch
If there are no errors, apply it for real:
patch -p1 < /path/to/precinto-inventory/illenium-appearance-patch/precinto-inventory.patch
If it complains about line endings (illenium's files use Windows CRLF), run both commands again with --ignore-whitespace.
Option B: paste it by hand
About two minutes:
Open
illenium-appearance/server/server.lua.Find the last line of the file:
lib.versionCheck("iLLeniumStudios/illenium-appearance")Paste the whole contents of
manual/server_exports.luaright above it.Save.
It has to go in that file because it uses the file's own Framework and uniformCache variables.
Tip
Some illenium forks already ship exports with these names. Keep yours only if they also accept a server id; otherwise replace them with these.
After patching
Restart the server. If you'd rather restart just the resources, do illenium-appearance first and then precinto-inventory, and never while players are inside the clothing editor.
To check it worked, watch the console on start. If the patch is missing, precinto-inventory prints a red warning:
[precinto-inventory] illenium-appearance is not patched: apply illenium-appearance-patch/ (see its README).
Important
Updating illenium-appearance overwrites server/server.lua and wipes the patch. Apply it again after every illenium update.
Job and gang uniforms
illenium-appearance keeps a server-side list of players wearing a uniform (uniformCache). It's filled when someone puts on a job or gang outfit from the outfits menu (the ones in Config.Outfits, or boss-managed outfits).
While a uniform is on, precinto-inventory still saves clothing changes into the civilian skin, but doesn't draw them over the uniform: they show up once it comes off. Toggle commands refuse with a "you're wearing a work uniform" message.
illenium only clears that list when the skin is reloaded with uniform persistence on (Config.PersistUniforms = true). With it off, the uniform stays "on" until the server restarts. If your players get stuck with the uniform message, set Config.Wearables.respectUniform = false in precinto-inventory/config.lua.
License
illenium-appearance is released under the MIT License, © 2021 snakewiz (full text in LICENSE-illenium-appearance-MIT.txt). The patch modifies its source files, so the MIT notice must stay with any copy of illenium-appearance you distribute. The precinto-inventory resource itself contains no illenium-appearance code: it talks to it through these exports and its standard client exports.