Inventory Optimisation
The Inventory tab audits item definitions and item images for any inventory script.
Required Agent Paths
Set these in fiveops-backup-agent.config.json when auto-detection is not enough:
{
"inventoryResourcePath": "C:/server-data/resources/[inventory]/your_inventory",
"inventoryItemsPath": "C:/server-data/resources/[inventory]/your_inventory/items.lua",
"inventoryImagesPath": "C:/server-data/resources/[inventory]/your_inventory/images"
}
FiveOps still supports older ox_inventory aliases, but the generic inventory path keys are preferred.
Audit Mode
Audit mode checks:
- Duplicate item keys
- Missing labels
- Missing weights
- Item key format
- Missing images
- Unused images
- Non-square images
- Oversized dimensions
- Heavy image files
- Images smaller than the safety minimum
Image Optimisation
Image optimisation:
- Creates a zip backup first.
- Resizes/compresses item images.
- Keeps output at or above
100x100. - Targets
inventoryImageMaxFileKb, capped at 200 KB. - Uses
inventoryJpegQualityfor JPEG output.
Recommended config:
{
"inventoryImageMaxDimensionPx": 256,
"inventoryImageMaxFileKb": 200,
"inventoryJpegQuality": 85
}
items.lua Cleanup
The Clean items.lua mode:
- Creates a zip backup before writing.
- Finds top-level item definitions.
- Removes duplicate item keys.
- Keeps the final duplicate definition because that matches Lua table behaviour.
- Sorts the remaining item blocks by key.
- Preserves fields inside each item block.
- Skips cleanup if custom Lua code appears between item blocks.
Backup Location
Set a separate inventory backup folder when needed:
{
"inventoryBackupOutputDirectory": "D:/fiveops-inventory-backups"
}
Safety Notes
FiveOps does not optimise images below 100x100. Very small images may already be damaged or intentionally tiny.
Always review the backup path shown in scan history before making large cleanup changes.
