Skip to content

Configuration

All of lo_mdtbf's configuration lives in config/config.lua. This file stays editable even on escrow-protected builds: config/*.lua, locales/*.lua and sql/*.sql are listed in escrow_ignore.

Main options

OptionDefaultDescription
Config.Locale"fr"Interface language. Values: "fr", "en", "pt-br", "pt", "ru", "de".
Config.DevModetrueDevelopment mode. true skips the server-side on-duty check. Set to false in production.
Config.GapWithRealYear124RP year offset for auto report references (real year - offset).
Config.Pagination(table)Rows per page per view (see below).
Config.AllowedJobs(list)Jobs allowed to open the MDT.
Config.AllowedJobsManage(list)Jobs allowed to create / edit / delete (a subset of AllowedJobs).
Config.CrossStationJobs(list)Jobs that see every station (bypass the per-station filter).
Config.JobConfig(table)Minimum job grade required to open the MDT (minGrade).
Config.OpenItem"mdt_bf"Inventory item that opens the MDT.
Config.OpenCommand"mdtbf"Fallback command to open the MDT.
Config.MandatItem"official_warrant"Item created when copying a warrant.
Config.OrdonnanceItem"official_prescription"Item created when copying a court order.
Config.Stations(table)Registry of stations (bureaus) and the jobs attached to each.
Config.VersionCheck(table)Update check on start (console).

NOTE

The three items (mdt_bf, official_warrant, official_prescription) must exist in vorp_inventory.items. The mdt_bf item can carry a metadata.station = "<id>" to lock the MDT to a specific station; without it, the server picks the first station that lists the player's job.

Access & jobs

Access control relies on two complementary lists:

  • Config.AllowedJobs — jobs that can open the MDT. This is the minimum level (read-only).
  • Config.AllowedJobsManage — jobs that can create, edit and delete records. This list must be a subset of AllowedJobs.

A job present in AllowedJobs but absent from AllowedJobsManage is therefore read-only. That's the intended case for civilian roles such as tresor (present in AllowedJobs, absent from AllowedJobsManage).

Default allowed jobs (Config.AllowedJobs):

lua
Config.AllowedJobs = {
    "stdsheriff", "valsheriff", "annsheriff", "rhosheriff",
    "strsheriff", "blwsheriff", "marshal", "redeaglerangers",
    "armsheriff", "tribunal", "ssksheriff", "tblsheriff",
    "gouv", "avocat", "tresor", "procureur",
}

Jobs that can manage records (Config.AllowedJobsManage) — same as above without tresor.

Minimum grade per job

Config.JobConfig enforces a minimum grade (minGrade) to open the MDT, job by job. All jobs are minGrade = 0 by default.

lua
Config.JobConfig = {
    stdsheriff = { minGrade = 0 },
    -- ...
}

TIP

To gate the MDT behind a rank, raise minGrade. Example: stdsheriff = { minGrade = 2 } requires a Deputy grade or higher.

Stations & sharing

Config.Stations declares the bureaus. Each station has an id, a displayed name and the list of jobs that belong to it. This registry is used to:

  1. Filter visible records (citizens, reports, warrants… are scoped to the player's active station).
  2. Resolve a default station from the player's job when the MDT item carries no metadata.station.
  3. Populate the station picker shown to cross-station roles.

Config.CrossStationJobs (default tribunal, procureur, gouv) lists the region-wide jobs that bypass the per-station filter: they see records from every bureau and get a station picker.

RP year (GapWithRealYear)

Auto-generated report references follow the STD-1902-1234 format. The year is computed like this:

lua
RP year = real year - Config.GapWithRealYear

With the default value 124, in 2026 this gives 2026 - 124 = 1902 (the Red Dead Redemption era). Adjust the offset to align the RP year with your server's timeline.

Pagination

Config.Pagination sets the number of rows per page per view:

lua
Config.Pagination = {
    citizens  = 9,   -- thumbnail rows (taller)
    effectifs = 10,  -- thumbnail rows (tighter)
    reports   = 11,  -- compact rows (no thumbnail)
}

NOTE

The reports value is reused for the warrants, court orders and investigations views (same compact layout). The defaults are tuned to the sheet layout so the pagination bar stays flush at the bottom-right.

DevMode

lua
Config.DevMode = true

WARNING

With DevMode = true, the on-duty check is skipped server-side — only the job is validated. You must set Config.DevMode = false in production so that only on-duty officers can open the MDT.

Languages

Config.Locale sets the active language among: fr, en, pt-br, pt, ru, de. An unknown locale falls back to French, then English.

Translations live in locales/*.lua (Lua side) and web/src/i18n/ (UI side, development sources). To add your own language, drop a file in both locations, then import and register it. The locales/*.lua files are listed in escrow_ignore, so they stay editable on protected builds.

Tips

TIP

  • Set Config.DevMode = false before going to production.
  • Keep AllowedJobsManage as a subset of AllowedJobs; leave purely read-only roles (e.g. tresor) out of AllowedJobsManage.
  • Adapt Config.Stations to your server's actual bureaus, then align AllowedJobs and CrossStationJobs accordingly.
  • To hand out a MDT locked to a station, stamp the mdt_bf item with metadata.station = "<id>" at give-time.