ktoxktox docs
ktx_cases

Settings

Every setting in config.lua.

Every setting in config.lua, taken from the file itself. The comments in the file and this page always say the same thing.

Config.Framework

Your framework: "esx", "qb-core", "qbox", "ox" or "custom". With "custom" the resource loads public/framework.lua instead.

SettingDefaultWhat it does
name"esx"
esxMode"legacy"Only when name is "esx": "legacy" uses the export, "old" waits for the shared object event that older forks still use.
esxSharedObjectEvent"esx:getSharedObject"
vehicleGaragenilA vehicle reward is written into your vehicle table, not spawned. This is the garage it is parked in, spelled the way your framework spells its garages: "pillboxgarage" on QB-Core, "legionsquare" on many QBox servers. Left nil, only QBox hands the decision on to qbx_vehicles. QB-Core writes "pillboxgarage", ox_core writes "ktx_cases", which is not a garage any garage script knows, so name a real one there. ESX ignores this. ESX has no garage column, it only marks the vehicle as stored and your garage script decides where it stands.

Config.UI

Notifications: "ox_lib" or "custom" (loads public/ui.lua).

SettingDefaultWhat it does
name"ox_lib"

Config.Language

Any file in languages/, without the extension.

Config.Language = "english"

Config.Debug

Prints what the resource is doing to the console.

Config.Debug = false

Config.OpenCaseCommand

The chat command that opens the case menu.

SettingDefaultWhat it does
enabledtrue
name"cases"

Config.RewardTypes

Money, items, weapons and vehicles are the four reward types the framework already knows. Coins are the fifth and optional one, for a currency of your own, and they need a resource of yours to land in.

Fill in whichever of the two ways below reaches it. Fill in both and the event is called, the export is left alone. On Config.Framework.name = "custom" there is a third: a giveCoins() in public/framework.lua runs before either of them. On esx, qb-core, qbox and ox that file is never read.

SettingDefaultWhat it does
coinsa table

Config.Database

The table is created on first start, and only while logOpenings is on. The name is yours, but everything in it that is not a letter, a digit or an underscore is stripped out, and a name left empty by that falls back to ktx_case_openings.

SettingDefaultWhat it does
logOpeningstrue
table"ktx_case_openings"

Config.Rarities

The colour and the name on the card. Rarity does not touch the odds, those stand on the reward itself.

SettingDefaultWhat it does
commona table
rarea table
epica table
legendarya table
mythicala table

Config.Cases

Every case and its reward pool.

The draw runs over whatever the chances add up to, so a case that misses 100 still works and keeps its ratios. They are written down as percentages though, so the server prints a warning on start for every case that does not total 100.

Reward types: money (amount), item (item, amount), weapon (weapon, ammo), vehicle (model), coins (amount).