Skip to content

Configuration

All configuration lives in config/config.lua. This file is part of the escrow_ignore set (along with locales/ and sql/), so it is freely editable. The comments in the file are in English and without accents for Lua encoding safety.

Main options

OptionTypeDefaultPurpose
Config.Localestring"fr"Default language for the interface and texts. Values: fr, en, pt-br, pt, ru.
Config.DevModebooltrueSkips the on-duty check server-side (the job is still checked). Set to false in production.
Config.AllowedJobstablesee belowJobs allowed to open the MDT.
Config.JobConfigtablesee belowPer-job settings and permissions.
Config.OpenItemstring"mdt_medic"Inventory item that opens the MDT.
Config.OpenCommandstring"mdtmedic"Slash command to open the MDT (/mdtmedic).
Config.PrescriptionItemstring"medic_prescription"Tearable prescription item.
Config.CertificateItemstring"medic_certificate"Tearable certificate item.
Config.MedicalAssessmentItemstring"medic_assessment"Tearable medical assessment item.
Config.AutopsyItemstring"autopsy_report"Autopsy report item.
Config.InjuryItemstring"injury_report"Injury report item.
Config.UseCustomBillingbooltrueEnables the billing integration. If false, the "Billing" tab is disabled (standalone use).
Config.BillingResourcestring"lo_billing"Billing resource called into (when UseCustomBilling = true).
Config.WebhookstabledisabledOptional Discord webhooks (enabled = false by default).
Config.Tabstable10 tabsTabs shown in the side panel.
Config.VersionChecktableenabledVersion check on boot (GitHub).

NOTE

The items (OpenItem, PrescriptionItem, CertificateItem, etc.) must exist in vorp_inventory.items. Using a torn document opens a NUI viewer that renders the paper template with the metadata.

Access & jobs

MDT access is controlled per job. On open, the resource compares the character's job against Config.AllowedJobs. Both the main job (character.job) AND secondary jobs (character.multiJobs) are checked: a character holding a medical job as a multiJob can therefore open the MDT.

lua
Config.AllowedJobs = {
    "doctor",
    "medic",
    "doctorle",
    "doctorwe",
    "doctornh",
    "doctorna"
}

TIP

To add a job, add its name to Config.AllowedJobs and create the matching entry in Config.JobConfig (minimum grade + permissions). A job listed in AllowedJobs but missing from JobConfig will have no feature permissions defined.

Per-job permissions (Config.JobConfig)

Each allowed job has a block in Config.JobConfig defining the minimum grade required to open the MDT and its per-feature permissions.

JobminGradeCertificatesAutopsiesPricing
doctor0
medic0
doctorle0
doctorwe0
doctornh0
doctorna0

Field details:

  • minGrade — Minimum grade required in the job to open the MDT.
  • canIssueCertificates — Allows issuing certificates and medical assessments.
  • canPerformAutopsies — Allows performing autopsies.
  • canEditPricing — Allows editing the price list.

Example block (the medic job is intentionally restricted):

lua
Config.JobConfig = {
    doctor = {
        minGrade = 0,
        canIssueCertificates = true,
        canPerformAutopsies   = true,
        canEditPricing        = true,
    },
    medic = {
        minGrade = 0,
        canIssueCertificates = false,
        canPerformAutopsies   = false,
        canEditPricing        = false,
    },
    -- ... doctorle, doctorwe, doctornh, doctorna
}

DevMode

Config.DevMode is enabled by default (true) to ease testing: the on-duty check is skipped server-side. The job check stays active in all cases.

lua
Config.DevMode = true  -- testing only

WARNING

In production, set Config.DevMode = false. Otherwise, any player holding an allowed job will be able to open the MDT without being on duty.

Languages

Config.Locale sets the default language. 5 languages ship in locales/:

CodeLanguage
frFrench (default)
enEnglish
pt-brPortuguese (Brazil)
ptPortuguese (Europe)
ruRussian

The language files (locales/*.lua) are part of the escrow_ignore set: you can edit them or add your own.

Tips

TIP

For standalone use without a billing script, set Config.UseCustomBilling = false: the "Billing" tab will be disabled.

NOTE

Discord webhooks are disabled by default (Config.Webhooks.enabled = false). Fill in the desired URLs and set enabled = true to log patient creations, prescriptions, certificates, autopsies and billing.

TIP

Config.VersionCheck queries a public GitHub repository (version only, no source code) and reports any available update in the console. Disable it via Config.VersionCheck.enabled = false.