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
| Option | Type | Default | Purpose |
|---|---|---|---|
Config.Locale | string | "fr" | Default language for the interface and texts. Values: fr, en, pt-br, pt, ru. |
Config.DevMode | bool | true | Skips the on-duty check server-side (the job is still checked). Set to false in production. |
Config.AllowedJobs | table | see below | Jobs allowed to open the MDT. |
Config.JobConfig | table | see below | Per-job settings and permissions. |
Config.OpenItem | string | "mdt_medic" | Inventory item that opens the MDT. |
Config.OpenCommand | string | "mdtmedic" | Slash command to open the MDT (/mdtmedic). |
Config.PrescriptionItem | string | "medic_prescription" | Tearable prescription item. |
Config.CertificateItem | string | "medic_certificate" | Tearable certificate item. |
Config.MedicalAssessmentItem | string | "medic_assessment" | Tearable medical assessment item. |
Config.AutopsyItem | string | "autopsy_report" | Autopsy report item. |
Config.InjuryItem | string | "injury_report" | Injury report item. |
Config.UseCustomBilling | bool | true | Enables the billing integration. If false, the "Billing" tab is disabled (standalone use). |
Config.BillingResource | string | "lo_billing" | Billing resource called into (when UseCustomBilling = true). |
Config.Webhooks | table | disabled | Optional Discord webhooks (enabled = false by default). |
Config.Tabs | table | 10 tabs | Tabs shown in the side panel. |
Config.VersionCheck | table | enabled | Version 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.
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.
| Job | minGrade | Certificates | Autopsies | Pricing |
|---|---|---|---|---|
doctor | 0 | ✅ | ✅ | ✅ |
medic | 0 | ❌ | ❌ | ❌ |
doctorle | 0 | ✅ | ✅ | ✅ |
doctorwe | 0 | ✅ | ✅ | ✅ |
doctornh | 0 | ✅ | ✅ | ✅ |
doctorna | 0 | ✅ | ✅ | ✅ |
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):
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.
Config.DevMode = true -- testing onlyWARNING
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/:
| Code | Language |
|---|---|
fr | French (default) |
en | English |
pt-br | Portuguese (Brazil) |
pt | Portuguese (Europe) |
ru | Russian |
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.