Configuration
The main options in the Yecoyz MDT config file.
All options are in config.lua, and every option there has a comment. This page covers the ones most servers change. Dispatch and witnesses are on Dispatch.
General
Config.Locale = 'en' -- a file in locales/ (locales/en.json)
Config.Currency = '$' -- shown with finesTo add a language, copy locales/en.json (for example to de.json), translate the values and set Config.Locale = 'de'. Missing keys fall back to English.
Opening
Config.Open = {
Command = 'mdt', -- false: no command
Key = 'F11', -- default key; players can rebind it. '' for none
Where = 'anywhere', -- 'anywhere', 'vehicle' or 'none' (only tablet, computers or item)
VehicleClasses = { 18 }, -- classes that count as emergency vehicles
VehicleModels = {}, -- extra models that count, e.g. { 'police4', 'fbi2' }
Item = false, -- an item that opens the MDT, e.g. 'mdt_laptop'
Animation = true, -- hold a tablet while the MDT is open on foot
RequireDuty = false, -- only on duty (the framework's duty, or yecoyz_duty)
}
Config.Computers = {
{ coords = vec3(441.87, -978.93, 30.69), department = 'police', label = 'Police computer' },
{ coords = vec3(311.03, -594.71, 43.28), department = 'ems', label = 'Hospital computer' },
}Departments
Each department has a type (police or ems) that decides its pages, the jobs that belong to it with the lowest grade that gets access, and the lowest grade for each permission.
Config.Departments = {
police = {
type = 'police',
label = 'Police Department',
short = 'PD', -- case number prefix
jobs = { police = 0, sheriff = 0 },
society = 'police', -- company account fines are paid into (false for none)
permissions = {
['cases.view'] = 0, ['cases.close'] = 1, ['cases.delete'] = 3,
['warrants.approve'] = 2,
-- ...
},
},
}TipPermissions can also be changed in the MDT (Administration > Permissions). Those changes are saved in the database and win over the config. Grades marked as boss in your framework always have every permission.
Fines and sentencing
Config.Fines = {
Mode = 'direct', -- 'direct', 'bill' (your billing script) or 'record'
Account = 'bank',
CollectOnLogin = true, -- collect unpaid fines at the next login
}
Config.Sentencing = {
Unit = 'months',
MaxJail = 150, -- 0 = no limit
MaxFine = 50000, -- 0 = no limit
PleaReduction = 0.25,
CooperationReduction = 0.15,
MaxCount = 10,
}The penal code starts with Config.PenalCode and is edited in the MDT after that.
Warrants
Config.Warrants = {
RequireApproval = true, -- a warrant needs someone with warrants.approve first
DefaultDays = 7,
MaxDays = 60,
}Medical privacy
What the police see of a person's medical data:
Config.MedicalPrivacy = {
PoliceSeeInCare = true, -- that the person has an open care case
PoliceSeeRecords = false, -- the medical records themselves
}Hospitals
Each hospital has wards with a number of beds for the bed board:
Config.Hospitals = {
{
id = 'pillbox', label = 'Pillbox Hill Medical Center', coords = vec3(298.6, -584.6, 43.3), phone = '555-0100',
wards = { { name = 'Emergency', beds = 8 }, { name = 'Surgery', beds = 3 } },
},
}Tablet and radar
Config.Tablet = {
Enabled = true, -- the MDT as an app on Yecoyz Tablet, when it runs
Label = 'MDT',
Icon = 'shield',
InstalledByDefault = true,
}
Config.Radar = {
Enabled = true, -- Yecoyz Radar, when it runs
SyncWarrants = true, -- active vehicle warrants go on the radar's BOLO list
Alerts = true, -- alert when a plate reader reads a BOLO plate
AlertTo = 'unit', -- 'unit' or 'officer'
}Limits
Config.Limits = {
SearchResults = 25,
PageSize = 25,
TextLength = 20000,
TitleLength = 120,
WritesPerMinute = 40, -- per player
}Open a ticket in the Discord with what you tried and what you see, and I'll help you get it running.