Skip to content

Configuration ​

np_mdt splits its configuration by module:

config/core.lua           modules on / off, locale, bridge overrides
config/server.lua         MDT URL and API key (server only)
config/<module>/*.lua     settings per module

Everything except config/server.lua is a shared script, so it's also loaded on the client. Don't put secrets there. Most module files fill in their defaults instead of replacing the table, so you can set values in your own file without worrying about load order.

Core ​

config/core.lua

OptionDefaultDescription
Config.Modules.medictrueMedical simulation and its sync to the MDT. See Medic module
Config.Modules.dispatchtrueCalls to the dispatch board, for other resources via ReportCall
Config.Modules.ranksfalseJob grade → InGame rank in the MDT. Needs a job mapping first
Config.Modules.timeclockfalseOn duty in game → clocked in in the MDT. Needs a job list first
Config.Modules.funkfalseOwn unit's status and a panic button
Config.Modules.kioskfalseQueue ticket machine in the hospital
Config.Modules.ausweisfalseService ID card as an item
Config.Modules.tabletfalseThe real MDT as an in-game tablet. Needs the sessions:ingame.tablet_login scope
Config.Modules.platformfalseVersioned platform contract. Stays off until the MDT issues scopes for it
Config.Locale"de"Language of player-facing texts (locales/<Locale>.json). German is the fallback
Config.Bridge{}Override auto-detection, e.g. { inventory = "builtin" }. See Bridges

A module that's off is still loaded (the manifest has no conditions), but it isn't started: no thread, no queue, no HTTP.

Server ​

config/server.lua is listed only under server_scripts. Its values come from convars:

ConvarFallbackDescription
np_mdt_urlnp_medic_mdt_url, then https://mdt.npdev.euMDT base URL
np_mdt_api_keynp_medic_api_key, then emptyAPI key of your guild
np_mdt_environmentlivetest marks everything sent as a test ([TEST] in call titles)

Fixed values in Config.Mdt:

OptionDefaultDescription
maxBatchEvents256Events per medic batch (mirrors the server limit)
maxBatchBytes1048576Bytes per medic batch
maxQueueEvents10000From here on the queue drops vital-sign samples. Injuries, treatments and artefacts are never dropped
persistDebounceMs2000Queue checkpoint interval. A hard crash can lose changes since the last checkpoint

Dispatch ​

config/dispatch/dispatch.lua

lua
Config.Dispatch = {
  source = "np_mdt",      -- `source` of calls that don't bring their own
  maxPending = 200,       -- in-memory outbox size
  maxAttempts = 10,       -- attempts per call
  maxAgeS = 900,          -- calls older than this aren't sent any more

  notifyUnits = true,     -- blip, route and hint for the crew of an assigned unit (needs calls:read)
  pollS = 10,             -- how often calls are read back from the MDT
  blips = {
    sprites = { notruf = 153, panik = 161, alarm = 161, hinweis = 280 },
    colours = { [1] = 1, [2] = 47, [3] = 3 }, -- per priority
    scale = 1.0,
    route = true,
  },

  hooks = {},             -- bind other resources' events, see below

  auto = {                -- reports a resident would make: shots and heavy crashes
    enabled = false,
    shot = { enabled = true, chance = 0.6, delayS = { 10, 40 } },
    crash = { enabled = true, chance = 0.4, delayS = { 15, 60 }, minSpeedKmh = 80 },
    exemptJobs = { "police", "ambulance" },
    quietZones = {},      -- { x, y, radius } where shots are never reported (shooting range)
    cellSize = 150,       -- shots in the same cell (m) and window are one call
    windowS = 300,
    clientCooldownS = 10,
  },

  command = {             -- simple `/notruf <text>` chat command
    enabled = false,
    name = "notruf",
    cooldownS = 30,
  },
}

Hooks ​

Hooks connect resources you don't want to edit. Each entry maps an event to a function that builds a call from the event's arguments (return nil to skip):

lua
Config.Dispatch.hooks = {
  { event = "myrobbery:alarm", call = function(store, coords)
      return { externalId = "raub:" .. store, kind = "alarm", priority = 1,
               title = "Stiller Alarm " .. store, location = { x = coords.x, y = coords.y } }
    end },
}

Hooks listen to server events. Set net = true only if the other resource sends the event from the client. Then the function gets the player's source first, and a per-player cooldownS (default 30) applies.

Funk ​

config/funk/funk.lua. Funk means radio.

OptionDefaultDescription
keyStatuses{ "1", … "8" }Statuses that get a bindable key. /status <label> always works
statusCooldownS1
panic.enabledtruePanic button
panic.key""Default key. Empty means players bind it themselves
panic.cooldownS60
panic.statusnilStatus the own unit jumps to on panic (e.g. "9"). nil keeps the status

Tablet ​

config/tablet/tablet.lua

OptionDefaultDescription
command"mdt"Command that opens and closes the tablet
key"F10"Default key. Players can rebind it in Settings → Key Bindings → FiveM
jobs{}Only these jobs may open it. Empty means everyone (the MDT still checks employment)
cooldownMs10000At most one new login link per player in this time
reuseMs11 hAn already loaded tablet is shown again instead of logging in anew while the session is valid
propprop_cs_tablet in the left handModel, bone, offset, rotation. false turns it off
animationamb@code_human_in_bus_passenger_idles@female@tablet@base / basefalse turns it off
messagesGerman textsWhat players read in chat (cooldown, no Discord, not allowed, not an employee, suspended …)

Ranks ​

config/ranks/ranks.lua

lua
Config.Ranks = {
  jobs = {
    ambulance = {
      [0] = "trainee",
      [2] = "paramedic",
      [4] = { "paramedic", "instructor" }, -- one grade can carry several keys
    },
  },
  clearOnOtherJob = true, -- switching to an unmapped job clears the InGame ranks
}

The values are rank keys, the InGame-Schlüssel (inGameKey) of a rank in the MDT under Einstellungen → Ränge. A grade without an entry uses the highest mapped grade below it.

Timeclock ​

config/timeclock/timeclock.lua

OptionDefaultDescription
jobs{}Jobs whose duty is clocked in the MDT, e.g. { "ambulance" }
clockOutOnDisconnecttrueClock out whoever leaves the server while on duty

Kiosk ​

config/kiosk/kiosk.lua

OptionDefaultDescription
locations{}{ x, y, z, radius, label } per machine
cooldownS300One ticket per player in this time
command"wartenummer"Command to draw a ticket in range

Queue tickets (Wartenummern) must also be enabled in the facility's settings in the MDT.

Ausweis ​

config/ausweis/ausweis.lua. Dienstausweis means service ID card.

OptionDefaultDescription
item"mdt_dienstausweis"The usable item. It must exist in your inventory
radius3.0Players within this many metres see the card

Medic ​

The medic module has its own folder, config/medic/. The main switches are covered on the Medic module page.

FileContents
gameplay.luaDebug, health authority, timeline, damage, bleeding, self-care, assist level, tiers, minigames, body view, treatment
runtime.luaMain switch Runtime.enabled, conflicts with ambulance scripts, health pinning, downed, sensory, bystanders, respawn, plausibility
items.luaTreatment items (medic_*), all renamable
props.luaProps and animations for treatments
notruf.luaIn-game emergency call (item, keys, who receives it, blips)
transport.luaDrag, carry, spineboard, stretcher, ambulance, arrival
hospital.luaIn-game hospital: builder ACE, tiers per action, imaging, surgery
monitor.luaPatient monitor and defibrillator
integration.luaIntegration exports, toxicology

np_* FiveM resources