Koja Scripts
NEW

General Settings

This page covers the basic configuration options for Koja-Crafting that control debug mode, language, and player behavior.

General Settings

🔧 Configuration Options

All general settings are located in shared/config.lua under the GENERAL SETTINGS section.

-- ════════════════════════════════════════════════════════════════════════════════════
--  GENERAL SETTINGS
-- ════════════════════════════════════════════════════════════════════════════════════

Config.Debug = false
Config.Locale = 'en'
Config.LetPlayerMoveAwayFromTable = false
Config.DuiQueue = false

📝 Setting Descriptions

Debug Mode

Config.Debug = false

Purpose: Enable or disable debug console logs for troubleshooting.

Options:

  • true - Shows detailed console logs for debugging (player actions, crafting events, etc.)
  • false - Normal operation without debug messages (recommended for production)

When to use:

  • ✅ Set to true when troubleshooting issues
  • ✅ During initial setup to verify everything works
  • ❌ Set to false on live servers to reduce console spam

Example output when enabled:

[KOJA-CRAFTING] Player 1 opened crafting menu: weapon_crafting
[KOJA-CRAFTING] Crafting started: bandage (x3)
[KOJA-CRAFTING] Player 1 has level 2, exp: 150/200

Language / Locale

Config.Locale = 'en'

Purpose: Set the language for all UI text, notifications, and messages.

Available Languages:

CodeLanguageFile
'en'Englishlocales/en.json
'pl'Polishlocales/pl.json
'de'Germanlocales/de.json
'es'Spanishlocales/es.json
'fr'Frenchlocales/fr.json
'hi'Hindilocales/hi.json
'ja'Japaneselocales/ja.json
'ru'Russianlocales/ru.json
'zh'Chineselocales/zh.json

How to add custom translations:

  1. Copy a locale file

    Copy an existing locale file from the locales/ folder.
  2. Rename the file

    Rename it (e.g., locales/custom.json).
  3. Translate strings

    Translate all text strings in the new file.
  4. Set the locale

    Set Config.Locale = 'custom'.

Example locale structure (locales/en.json):

{
  "crafting_menu_title": "Crafting Menu",
  "not_enough_resources": "You don't have enough resources",
  "crafting_started": "Crafting started",
  "item_claimed": "Item claimed successfully"
}

Player Movement During Crafting

Config.LetPlayerMoveAwayFromTable = false

Purpose: Control whether players can walk away from the crafting station while items are being crafted.

Options:

  • false - Players must stay near the crafting table (default)
  • true - Players can freely move away while crafting

How it works:

When false (Recommended):

  • Player must stay within Config.CraftingQueue.maxDistance (default 5m)
  • If player moves too far, they get a warning
  • After Config.CraftingQueue.warningTime seconds (default 15s), crafting is cancelled
  • More realistic and prevents abuse

When true:

  • Player can move anywhere on the map
  • Crafting continues in the background
  • More convenient but less realistic

Recommendation: Keep this false for balanced gameplay. Use true only if your server prefers convenience over realism.


DUI Queue Display

Config.DuiQueue = false

Purpose: Enable or disable 3D visual crafting queue display above crafting tables.

Options:

  • false - No 3D display (lighter on performance)
  • true - Shows crafting progress on a 3D screen above the table

What is DUI? DUI (Draw User Interface) renders the crafting queue as a 3D object in the game world. Players can see what's being crafted without opening the menu.

Visual Example:

┌─────────────────────┐
│  • Bandage (====)   │
│  • Lockpick (====)  │
└─────────────────────┘
           ↓ 
(Floating above table)
   [Crafting Table]

Performance Impact:

  • ⚠️ Enabling DUI uses more client resources
  • Recommended only for servers with good performance
  • Test with multiple players before enabling on live server

When to use:

  • ✅ High-performance servers
  • ✅ Want visual feedback for shared tables
  • ❌ Low-end servers or many crafting stations
  • ❌ If players experience FPS drops

💡 Tips & Best Practices

  • Always test in dev environment first before changing settings on live server
  • Monitor server performance when enabling DUI on multiple stations
  • Keep Debug disabled on production to avoid console spam

🔍 Troubleshooting

Locale not loading
  • Check if the locale file exists in the locales/ folder
  • Verify Config.Locale matches the filename (without .json)
  • Restart the resource after changing locale
DUI not showing
  • Ensure Config.DuiQueue = true
  • Check if crafting table has items in queue
  • Try relogging or restarting the resource
Debug logs not appearing
  • Verify Config.Debug = true
  • Check server console (not F8 client console)
  • Ensure resource is running (ensure koja-crafting in server.cfg)

  • Server Settings — This page covers server-side configuration options including database management, crafting recovery, and shared table functionality.
  • Images Settings — This page explains how to configure item images, add custom graphics, and manage image paths in Koja-Crafting.
  • Player Progression Settings — This page covers the player progression system including levels, experience points, and how to configure the leveling system in Koja-Crafting.
  • Admin Settings — This page covers admin permission configuration and available admin commands for managing Koja-Crafting.
  • Interaction Settings — This page covers how players interact with crafting stations - either through key press or target system (ox_target,qb-target,).
  • Crafting Queue Settings — This page covers the crafting queue system that manages distance checking, warnings, and crafting cancellation when players move away from stations.
  • Configuration — back to the section overview