Kartik Scripts

Configuration

All config files are in shared/. The files themselves are kept short; what every setting does is explained in docs/CONFIG.md inside the resource.

FileWhat is in it
config.luaDebug, language, interface, fire jobs (Config.Jobs), boss grade, admin ace, Kartik MDT, payments, blips, target distance
config_stations.luaStations (centre, radius, lockers, garage, chief NPC, per-station vehicles / outfits / livery), the shared garage fleet, personal locker stash and supplies
config_gear.luaTurnout outfits, SCBA (air, mask key, facepiece clothing, SCBA mask kit, inspection, PASS, buddy breathing), heat and smoke damage
config_alarms.luaStation alarms, call types (colour, pattern, tone, keywords), 2nd / 3rd alarm, building alarms, smoke detectors, pull stations
config_fires.luaFire types, fire weather, materials, nozzle work, extinguisher agents, rekindle, hazards (cook-off, explosions), automatic fires, vehicle rescue, extrication, spread to parked cars, wildfire behaviour
config_water.luaTruck tanks and pumps, flows, hydrants, hydrant hookup, pump engage, shared pump demand, hose faults, portable reservoir, pump faults, pressure, cab muffling, hose effects
config_tools.luaRescue tools (item, props, offsets), forcible entry, 4-gas detector, ventilation and overhaul
config_missions.luaNPC calls (frequency, requests, wrap-up, EMS / police alerts, shouting victims, NPC models, XP and ranks), every call type, locations, investigation, hazmat, power lines, collapse, trees, technical rescue, dialogue and negotiation
config_patients.luaPatient conditions and treatment steps
config_support.luaTruck compartment, NPC ambulance, tablet, teams (mayday, BA board), fireground radio, EMS handover, scene effects
config_department.luaStaff, reports, inspections, PAR, incident command and requests, certificates and exams, finances, truck checks, tutorial
config_readiness.luaStation apparatus and equipment, wear, checks and out-of-service condition
config_scenes.luaScene creator grades, limits, rewards and quick picks
config_worldfires.luaFires from the city: arson (lighter, molotov, police witnesses), crash fires, burning cars, explosions on or off
config_gameplay.luaGround monitor, setting the nozzle down, helicopter bucket, wall extinguishers, smoke and heat on people, wildland mask, oil spills, outdoor and animal rescues, tree logs, glass first, prop tuning
config_minigames.luaMinigame preset, each minigame on / off / preset, accessibility defaults, backing a crewmate up, experience, complications, and the text shown in inspections and checklists (Config.DrillContent)
config_settings.luaWhich settings the admin panel can change in game (Config.SettingsEditor) and holding several jobs (Config.MultiJob)
config_comms.luaPanic and ping keys, helmet and dash cams, photo uploads, messages, calendar, documents and sharing, public forms, the supplier shop, exclusion zones, the ID swipe

Common changes

Use your own job name

Config.Jobs = { 'fire', 'safd' }
Config.BossGrade = 4

Add a fire truck: add it to the garage and give it a tank.

-- config_stations.lua, Config.Garage.vehicles (or a station's own vehicles)
{ model = 'mytruck', label = 'Tender', minGrade = 1, cert = 'driver' },

-- config_water.lua, Config.Water.vehicles
mytruck = { label = 'Tender', tank = 9000, foam = 0, attackLines = 1, deckGun = false, tanker = true },

Your own trucks, colours and extras

Any model works, addon trucks too. Each garage entry can set its look:

{ model = 'mytruck', label = 'Ladder 1', minGrade = 1, cert = 'driver', livery = 1,
  colors = { 27, 0 }, extras = { [1] = true, [2] = false }, mods = { [48] = 2 } },

Give it a tank in Config.Water.vehicles and, if it is a ladder truck, an aerial in Config.Aerial.vehicles:

-- config_tools.lua
Config.Aerial.vehicles.mytruck = { base = vec3(0.0, -1.2, 1.6), sections = 3 }

Fewer or more NPC calls

-- config_missions.lua
Config.Missions.auto.interval = { 8, 18 }  -- minutes between calls
Config.Missions.auto.maxActive = 2

Use ox_lib's prompts, menus and dialogs

The job draws its own on-screen prompts, menus, input dialogs, confirm dialogs and progress bar, styled like the tablet. To use ox_lib's instead:

-- config.lua
Config.UI = 'ox_lib'   -- default 'kartik'

Both live in bridge/ui/client/ and define the same functions with ox_lib's arguments (ShowTextUI, HideTextUI, ProgressBar, RegisterContext, ShowContext, HideContext, InputDialog, AlertDialog). To use another UI resource, copy ox_lib.lua, point the functions at it and set Config.UI to match its check.

Easier minigames

-- config_minigames.lua
Config.Minigames.preset = 'casual'

Let everyone use every tool

-- config_department.lua
Config.Certifications.enforce = false

Need the item to open the tablet

-- config_support.lua
Config.Tablet.requireItem = true

Photo uploads

The gallery, the tablet camera and cam snapshots need screenshot-basic and somewhere to upload to. The upload is done by the server, so your token never reaches players.

-- config_comms.lua
Config.Media.upload = 'fivemanage'   -- 'none' | 'fivemanage' | 'discord' | 'custom'

Put the token in server.cfg, never in the config:

set kfj_media_token "your-fivemanage-api-key"

For discord, put the webhook URL in kfj_media_token. For custom, set url, field (the form field name), response (where the link is in the JSON answer, for example 'data.url') and tokenHeader.

Language of config text

Labels written in the config (call types, causes, checklists) are translated from locales/config/<lang>.json for Spanish, French and German. Add your own file for another language.

On this page