Koja Scripts

Database

The koja_inv tables created on start, what the admin panel stores where, and where worn clothes and mini stash contents are saved.

Database

Koja Inventory creates its tables with CREATE TABLE IF NOT EXISTS every time it starts. There is no SQL file to import, and nothing in the upstream ox_inventory table changes.

Tables

TableWhat is in it
koja_inv_itemsItems created or edited on the admin Items pages (name, data as JSON)
koja_inv_raritiesRarities edited on Edit Rarity
koja_inv_shopsShops created or edited on Shops
koja_inv_stashesStashes created or edited on Stashes
koja_inv_craftingCrafting benches created or edited on Crafting benches
koja_inv_rolesStaff roles and their page permissions
koja_inv_staffStaff members: identifier, name, role, last_seen
koja_inv_localesString overrides from Locales (lang, k, v)
koja_inv_settingsPanel settings: addon toggles (features), ped preview mode (pedMode), world containers (containers), clothing (clothing), security (security)
koja_inv_historyThe inventory history: time, action, actor, from / to inventory, item, count, slot, serial, metadata
koja_inv_securitySecurity reports: time, player, kind, detail
koja_inv_attachment_offsetsMarker offsets of the 3D attachments view per weapon and component

Values in these tables override the matching data/ files. Delete a row (or use the panel's restore / reset buttons) to go back to the file.

Worn clothes and mini stashes

These are normal ox_inventory inventories, saved in the upstream ox_inventory table like stashes:

Inventory idWhat it holds
koja_clothes:<identifier>The clothes a character wears, one slot per clothing slot
koja_mini_<serial>The contents of one mini stash or hanger, keyed by the item's serial number

They are private: players cannot open them by id.

History cleanup

History rows older than history.retentionDays (30 days) are deleted on start and every 6 hours. Set it to 0 to keep everything. To exclude noisy actions, add them to history.ignore:

data/koja/admin.lua
history = {
    retentionDays = 14,
    ignore = { open = true, close = true },
},