Configuration
Configuration reference for ktx_cases.
Configuration
All configuration lives in static/config.json.
General Settings
{
"OpenCaseCommand": {
"enabled": true,
"name": "cases"
},
"Locale": "en",
"Debug": {
"enabled": false,
"logLevel": "info",
"modules": {
"client": true,
"server": true,
"ui": true,
"common": true
}
},
"RewardTypes": {
"coinsEnabled": false
},
"Database": {
"logOpenings": true
}
}OpenCaseCommand.enabled- toggle the/casescommandOpenCaseCommand.name- command name (without/)Locale- language code matching a file inlocales/Debug.enabled- toggle debug outputDebug.logLevel- verbosity:"info","warn","error","debug"Debug.modules- per-module toggles for client, server, ui, and common logsRewardTypes.coinsEnabled- enable coin rewards (requiressky_coinsystem)Database.logOpenings- log every case opening to the database (requiresinstall.sql)
Cases
Object where each key is a unique case ID.
{
"Cases": {
"starter_case": {
"name": "Starter Case",
"description": "A basic case with common rewards.",
"item": "case_starter",
"icon": "starter.png",
"disabled": false,
"rewards": [
{ "name": "Cash", "type": "money", "amount": 5000, "weight": 20, "rarity": "common", "icon": "" },
{ "name": "Gold Bar", "type": "item", "item": "gold", "amount": 1, "weight": 15, "rarity": "rare", "icon": "" },
{ "name": "Pistol", "type": "weapon", "weapon": "weapon_pistol", "ammo": 50, "weight": 10, "rarity": "epic", "icon": "" },
{ "name": "Adder", "type": "vehicle", "model": "adder", "weight": 5, "rarity": "legendary", "icon": "" },
{ "name": "Coins", "type": "coins", "amount": 100, "weight": 3, "rarity": "mythical", "icon": "" }
]
}
}
}name- display name in the UIdescription- short description shown on the case carditem- inventory item name that triggers this case when usedicon- filename incustom/icons/cases/(falls back todefault.png)disabled- hide this case from the UIrewards- array of possible rewards. Each reward accepts an optionalname(display label) andicon(filename incustom/icons/rewards/)
Reward Types
Money
{ "type": "money", "amount": 5000, "weight": 20, "rarity": "common" }Gives cash to the player.
Item
{ "type": "item", "item": "gold", "amount": 1, "weight": 15, "rarity": "rare" }Gives an inventory item. The item field must match your framework's item registry.
Weapon
{ "type": "weapon", "weapon": "weapon_pistol", "ammo": 50, "weight": 10, "rarity": "epic" }Gives a weapon with the specified ammo count.
Vehicle
{ "type": "vehicle", "model": "adder", "weight": 5, "rarity": "legendary" }Gives a vehicle. Stored in the player's garage via the framework.
Coins
{ "type": "coins", "amount": 100, "weight": 3, "rarity": "mythical" }Gives coins. Requires coinsEnabled: true and sky_coinsystem running.
Shared Reward Fields
Every reward has these fields:
weight- base drop chance. Higher weight = more likely to drop.rarity- one of:common,rare,epic,legendary,mythical
The effective drop chance is calculated as: reward.weight * rarity.modifier.
Rarities
{
"Rarities": {
"common": { "color": "#B0BEC5", "name": "Common", "modifier": 1.0 },
"rare": { "color": "#2196F3", "name": "Rare", "modifier": 0.8 },
"epic": { "color": "#9C27B0", "name": "Epic", "modifier": 0.6 },
"legendary": { "color": "#FF9800", "name": "Legendary", "modifier": 0.4 },
"mythical": { "color": "#E91E63", "name": "Mythical", "modifier": 0.2 }
}
}color- hex color for the rarity label in the UIname- display namemodifier- multiplied against the reward'sweightto compute effective drop chance. Lower modifier = rarer drop.
Icons
- Case icons go in
custom/icons/cases/. If a case'siconis missing or not found,default.pngis used. - Reward icons go in
custom/icons/rewards/. Each reward can set an optionaliconfield. If it's empty or invalid, the type-based fallback is used:money.png,item.png,weapon.png,vehicle.png, orcoins.png.