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.
| Setting | Default | What 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" | |
vehicleGarage | nil | A 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).
| Setting | Default | What 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 = falseConfig.OpenCaseCommand
The chat command that opens the case menu.
| Setting | Default | What it does |
|---|---|---|
enabled | true | |
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.
| Setting | Default | What it does |
|---|---|---|
coins | a 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.
| Setting | Default | What it does |
|---|---|---|
logOpenings | true | |
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.
| Setting | Default | What it does |
|---|---|---|
common | a table | |
rare | a table | |
epic | a table | |
legendary | a table | |
mythical | a 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).