Kartik Scripts

Database Reference

kartik-clothing creates and upgrades its own schema. There is no .sql file to import, on first start the resource runs its versioned migrations through oxmysql and records what it has applied in kartik_clothing_migration, so upgrading the script upgrades the database with it.

Every table is InnoDB / utf8mb4.


๐Ÿ‘ค Appearance & Outfits

kc_player_skins

The saved character. One active row per citizen.

ColumnDescription
citizenidOwner.
modelThe ped model name on record, this is what the server validates a ped change against.
skinThe full appearance snapshot as JSON.
active1 for the live skin.
updated_atLast save.

kc_player_outfits

Wardrobe presets.

ColumnDescription
citizenidOwner.
nameThe outfit's display name.
components / propsJSON arrays of the saved slots.

๐Ÿฌ Shops

kc_shops

Every shop location. Managed live through /shopmanager, there is no shop list in the config files.

ColumnDescription
labelShop name, shown on the blip and in the UI.
typeclothing, barber, tattoos, wardrobe, ped (Ped Changer) or job (Job / Faction store).
coords / headingJSON position and the ped's facing.
blipJSON { sprite, colour, scale, enabled }.
zoneOptional JSON zone shape for the interaction area.
categoriesReserved. Stored, but not read by the shop UI yet: every store shows the categories for its type.
priceMultiplierMultiplies every price in this shop, 1.5 for a luxury boutique, 0.8 for a discount store.
job / gangOptional access restriction. job is checked on purchase; gang is stored but not currently set by the UI or enforced.

Eight shops are seeded on first start (Suburban, Ponsonbys, Binco, Discount Store, Herr Kutz, Bob Mulรฉt, Ink Inc., The Pit). Delete or edit them freely in /shopmanager.


๐ŸŽจ Design Studio

kartik_clothing_designs

One player-submitted garment.

ColumnDescription
citizenidAuthor.
base_idWhich Designer.Bases entry it was designed on.
nameThe design's name.
layersThe layer stack as JSON. Uploaded images are stored on disk and referenced as asset:<ref>.
preview_ref / preview_bytesThe artwork in the asset store. A design with no preview_ref can never bake.
statuspending โ†’ approved / rejected โ†’ baked โ†’ live.
reject_noteWhy it was rejected.
drawable / textureThe slot it baked into.
remix_ofThe design this one was remixed from, if any.
reviewed_byWho moderated it.

kartik_clothing_design_owners

Who owns the right to wear a design. Cascades when the design is deleted.


๐Ÿ’ณ Credits & Tebex

kc_design_credits

One row per citizen: balance, plus a starter_granted flag. The flag is deliberately a flag rather than a comparison against Designer.Credits.StarterAmount, so raising the starter amount later does not silently re-gift existing players.

kc_credit_ledger

Every credit movement, delta, reason, package_id, transaction_id. transaction_id is unique, which is what makes a Tebex grant idempotent: a webhook Tebex retries cannot pay out twice. Manual admin adjustments carry a NULL transaction and are exempt.

kc_tebex_packages

The Tebex package โ†’ credit amount map, edited in /shopmanager. See Tebex Monetization & Design Credits.


๐Ÿง‘ Peds

See Ped Catalog & Unlocks.

TableContents
kc_ped_packagesPed model โ†’ Tebex package. A row here is what locks a ped; the model is the primary key, so one package may bundle many peds.
kc_ped_unlocksWho owns what, citizen id, model, source (tebex / admin), consumable, consumed_at, revoked_at.
kc_ped_changesAn audit row per ped change, written whether or not console logging is on. Surgery changes use context surgery.
kc_ped_surgeriesOne row per paid surgery, patient, surgeon, old/new model, price, and where the money went (paid_to).

๐Ÿ”’ Item Locks

See Item Locks & Restricted Clothing.

TableContents
kc_item_locksOne locked garment scope, kind, item_id, drawable, texture, gender, blacklisted, hint.
kc_item_lock_rulesRules under a lock, job + min_grade, or citizenid. Rules OR together; cascades on delete.

texture = -1 and gender = 'any' are sentinels rather than NULL, because MySQL treats NULLs as distinct in a UNIQUE key, a nullable column here would let the same garment be locked twice.


๐Ÿงฉ Compatibility

See Garment Compatibility.

TableContents
kc_item_compatAn authored garment scope, arms_drawable / arms_texture, replaces_game, note. arms_drawable = NULL means "no opinion about arms".
kc_item_compat_entriesOne accessory paired with the row above, its own kind, slot, drawable, texture, required. Cascades on delete.

๐Ÿงพ Migration Bookkeeping

kartik_clothing_migration

Records which schema versions have been applied. Do not edit it by hand, deleting a row makes the resource re-run that migration on next start.

For importing data from another appearance script, see Migration.

On this page