Kartik Scripts

Configuration

All config files are in shared/config/ and are open (not escrowed). Many common values can also be changed live in /dojadmin → Settings.

FileWhat it holds
general.luaDebug, UI integrations, court mail to the phone, duty, Kartik MDT and the case store, police jobs, dispatch alerts, admin ace, item names
interface.luaColours, the tablet item, the tablet inside Kartik MDT, tablet animation, radial, keybinds, commands
jobs.luaThe starter job doj and its grades
courthouse.luaStarter courthouse, blips, lockers, uniforms, garages, TV screens
courtroom.luaSeats, gavel, microphones, objections, bench HUD, sounds, "All rise", animations, court reporter, slides, jury room, metal detectors, check-in, wand, doors, cuffs
cases.luaCourts, case types and stages with their forms and sign-offs
evidence.luaCounsel, attorney portal, exhibits and allowed hosts, subpoena departments, motion types
sentencing.luaLicence orders, probation, parole, community service spots, remand and prison intake, lawyer requests
documents.luaPrinting and the default document templates
services.luaJury, bar exam and questions, kiosk requests and fees, default forms

shared/server/config.lua is server only: Discord webhooks per category and the anti-abuse distance.

Common changes

The tablet

-- shared/config/interface.lua
Config.Tablet = {
    item = false,   -- e.g. 'doj_tablet' to require the item
    mdt = 'auto',   -- 'auto' | 'app' | false
}

See The DOJ Tablet.

Colours and keys

-- shared/config/interface.lua
Config.UI = {
    accent = '#c9a54c',     -- primary colour of the interface
    danger = '#ff4d5e',
    use24h = true,
    tabletPageSize = 15,
    tabletOpenAnim = true,  -- tablet prop & animation
    deviceFrame = false,    -- draw a tablet casing around the window
    tutorial = true,        -- tour the first time a character opens the tablet
}

Config.Keybinds = { tablet = 'F7', interact = 'E' }
Config.Commands = { tablet = 'doj', admin = 'dojadmin', bar = 'bar' }

Notifications and menus

-- shared/config/general.lua
Config.Integrations = {
    notify   = 'kartik', -- kartik | ox_lib | lation_ui | okokNotify | framework
    progress = 'kartik', -- kartik | ox_lib | ox_lib_circle | lation_ui | framework
    textui   = 'kartik', -- kartik | ox_lib | lation_ui | framework
    minigame = 'ox_lib', -- ox_lib | lation_ui
    menu     = 'kartik', -- kartik | ox_lib
    dialog   = 'kartik', -- kartik | ox_lib
}

Police jobs

Config.PoliceJobs lists the jobs that hand over prisoners, see warrants and get courthouse alerts. Subpoena departments and their jobs are in Config.Subpoenas.departments (evidence.lua).

Jail

Jail sentences go to the first of these prisons that is started, nothing to configure:

PrisonJailReleased on bail / parole / acquittal"Is jailed" check
rcore_prisonsentence in minutes, the court's reason as the jail reasonyesyes
dynyx_prisonsentence 1:1 (one month per minute), the court's reason as the chargeyesyes
tk_jailsentence passed as is, the same value kartik-mdt sendsyesyes
xt-prisonsentence in minutesyesyes
qb-prisonsentence in minutesyesyes
esx_jailsentence in minutesyesyes

Sentences for offline players are applied when they next load in. The prison intake for remanded defendants is Config.Sentencing.remand.intake.

To use another prison, edit I.Jail, I.IsJailed and I.Release in bridge/integrations/server/integrations.lua.

Logs

Add Discord webhooks per category in shared/server/config.lua. default is used for any category left empty. Set service = 'ox_lib' to use the ox_lib logger instead.

Case workflow

Courts, case types and stages are in cases.lua. Ids are stored on cases, so keep existing ids when you rename labels. See Cases & Workflow.

Penal code

-- shared/config/general.lua
Config.PenalCode = {
    department = 'auto',  -- 'auto' or a Kartik MDT department id, e.g. 'lspd'
}

Nothing to set up. With 'auto' the court picks the department this way, and the server console shows which one it picked:

  1. The departments your DOJ job is assigned to in Kartik MDT (the primary one first), using the first that has charges.
  2. If none of them has charges, the MDT department with the most charges.

To use another one, pick it in /dojadmin → Settings → Penal code department, or set its id here. If the id does not exist in the MDT, the console lists the departments it found and the court picks one automatically.

Charges are read from and saved to that department's penal code in the MDT. Without the MDT, the DOJ keeps its own penal code. See Sentencing.

On this page