Koja Scripts

Database

The koja_appearance_assets, categories and settings tables, the ESX skin backup and where Studio settings are stored.

Database

Koja Appearance keeps every upstream illenium-appearance table (playerskins, player_outfits, player_outfit_codes, management_outfits, and users.skin on ESX) exactly as it is. It adds three tables of its own, created automatically when the resource starts.

To create them by hand, import sql/koja_appearance.sql. For a fresh server without illenium-appearance, also import the other files in sql/.

koja_appearance_assets

One row per captured item: its name, price and image URL.

ColumnTypeDescription
genderVARCHAR(10)male or female
categoryVARCHAR(32)Category key, e.g. jackets or tattoo_torso
item_keyVARCHAR(64)drawable or drawable_texture, or the tattoo name key
nameVARCHAR(64)Name from the Capture panel. NULL = default name
priceINTPrice from the Capture panel. NULL = auto price or DefaultPrice
urlVARCHAR(512)Fivemanage URL. NULL = the file in shots/
updated_atINTUnix time of the last change, added to the image URL so players get the new image

Primary key: gender, category, item_key.

koja_appearance_categories

Capture settings per category and gender.

ColumnTypeDescription
genderVARCHAR(10)male or female
categoryVARCHAR(32)Category key
with_texturesTINYINT(1)1 = one image per texture variant
offsetsLONGTEXTJSON camera preset: fov, height, rotation, distance
hideLONGTEXTJSON list of ped parts hidden while shooting

koja_appearance_settings

Key / value settings of the Capture panel, such as the storage mode and the Fivemanage API key.

ColumnTypeDescription
kVARCHAR(64)Setting name
vTEXTValue

koja_appearance_skin_backup (ESX)

Created on ESX when Config.Koja.AutoMigrateESXSkins = true. Before an old esx_skin / skinchanger skin in users.skin is converted to the appearance format, the original is copied here.

ColumnTypeDescription
identifierVARCHAR(64)Player identifier (primary key)
skinLONGTEXTThe original skin JSON
backed_up_atINTUnix time of the backup

A skin is backed up only once; running the conversion again never overwrites the first backup.

Per-player Studio settings

The Studio settings (theme, light, studio, pose) are not stored in the database. They are saved on each player's PC in the client KVP key Config.Koja.PrefsKvp (koja_appearance_prefs).