Configuration
Official Ledger
Settings of the Official Ledger (mdt): jobs and sections, ranks, duty, search, the law and doctor sections, help calls, the justice section and the penal code.
The Official Ledger is the record book of the law, doctors, the railway and the court. It opens by job. All keys are in Config.MDT in apps/mdt/config.lua. Do not use Turkish letters in its texts. Amounts are in dollars.
#General
| Setting | Default | What it does |
|---|---|---|
Enabled |
true |
The app |
Jobs |
VORP and RSG examples | Job to section, see below. Jobs not listed see the book closed |
Ranks |
sheriff, doctor |
Grade names: [job] = { [grade] = 'name' }. A grade not written shows the core's grade name on RSG, otherwise "Rutbe N" |
Duty.Default |
true |
VORP: on duty when joining. RSG uses the core's onduty |
Duty.Required |
true |
Actions that change records (status, note, fine, report, prescription) only on duty |
Search.MinLength |
3 |
Letters a name search needs |
Search.Cooldown |
1500 |
ms between two searches per player |
Search.Limit |
20 |
Records per search |
Search.Recent |
30 |
Recent records listed without a search |
NearbyDistance |
5.0 |
Most distance to fine, add a patient or give medicine |
NearbyRadius |
15.0 |
Radius of the nearby list. Players further away cannot be picked |
Places |
10 towns | { name, x, y, z }. The nearest is written as the place of a call or incident. Empty: only the distance is shown |
#Jobs
luaJobs = {
sheriff = { section = 'law', label = 'Valentine Serifligi' },
deputy = { section = 'law', label = 'Valentine Serifligi', icon = 'badge-deputy' },
doctor = { section = 'doctor', label = 'Valentine Hekimligi' },
railroad = { section = 'rail', label = 'Valentine Gari', icon = 'badge-rail' },
judge = { section = 'court', role = 'judge', label = 'Bolge Mahkemesi', icon = 'badge-court' },
-- ...
},
| Field | What it is |
|---|---|
section |
'law' (sheriff, marshal), 'doctor', 'rail' or 'court' |
role |
Court only: 'judge', 'prosecutor', 'lawyer' or 'clerk' |
label |
Office name on the home page |
icon |
Optional badge in the header |
The shipped list has VORP examples (sheriff, deputy, marshal, police, doctor, medic, railroad), RSG examples (vallaw, rholaw, blklaw, strlaw, stdenlaw) and the court (judge, prosecutor, lawyer, clerk). Match them to your jobs.
#Law
| Setting | Default | What it does |
|---|---|---|
Law.DefaultReward |
50 |
Reward when a person is set "Wanted" without one |
Law.MaxReward |
10000 |
Largest reward |
Law.DefaultCrime |
'Sorusturma suruyor' |
Crime text when none is given |
Law.MaxNote, MaxPlace, MaxSummary, MaxCrime |
200, 40, 600, 40 |
Text lengths |
Law.MaxReportPeople |
8 |
People on one report |
Law.Tariff |
5 fines | { id, label, amount }. Keep the id: records use it |
Law.MaxFineItems |
5 |
Tariff lines on one fine |
Law.Invoice |
{ Enabled = true, Account = 'company', PeriodDays = 7 } |
A fine is written as a Ledger bill and paid there. 'company': to the business till when the job is in Config.Company.Jobs. 'personal': to the officer, which needs Config.Billing.AllowPersonalSend = true. If the bill cannot be written, the fine is still recorded and the officer is told. Every job in Config.Company.Jobs is a business with its own till, so each law job that writes fines must be listed there |
Law.ReportTypes |
6 types | { id, label, icon }: robbery, brawl, theft, murder, smuggling, other |
#Doctor
| Setting | Default | What it does |
|---|---|---|
Doctor.MaxNote |
400 |
Treatment note length |
Doctor.Diagnoses |
{ 'Kursun', 'Kirik', 'Ates', 'Zehir', 'Yanik', 'Diger' } |
Diagnosis choices |
Doctor.Medicines |
4 medicines | { id, label, dose, item, amount }. item is an inventory item, nil in the shipped list |
Doctor.MaxRxItems |
4 |
Medicines on one prescription |
Doctor.GiveItems |
false |
true: medicines with an item are given to the patient, who must be nearby |
Doctor.Calls.Enabled |
true |
Help calls that on-duty doctors see in a list |
Doctor.Calls.Command |
'yardim' |
/yardim [short text]. '': no command, only the HelpCall export |
Doctor.Calls.Cooldown |
120 |
Seconds between two calls of one player |
Doctor.Calls.ExpireMinutes |
15 |
An unanswered call is dropped after this |
Doctor.Calls.Max |
20 |
Calls waiting at once |
Doctor.Calls.DefaultText |
'Yardim cagrisi' |
Text of a call without one |
Doctor.Calls.SevereWords |
{ 'vurul', 'kursun', 'bayil', 'olu', 'kan' } |
A call containing one of these is shown as severe |
#Railway
Rail.Tiles are the four tiles of the railway home page: { icon, color, title, meta }. In the shipped file all four say "Yakinda" (coming soon).
#Justice
Case files, arrest and search warrants, arrests, BOLOs and the court. Used by the law and the court together.
| Setting | Default | What it does |
|---|---|---|
Justice.MaxFine |
5000 |
Highest fine a judge can give |
Justice.MaxJail |
240 |
Longest jail time in minutes, for arrests and sentences |
Justice.MaxBail |
5000 |
Highest bail |
Justice.WarrantDays |
7 |
Days a signed warrant is valid |
Justice.SentenceEvent |
'' |
Server event fired on a guilty verdict, for a jail or fine script |
Justice.ArrestEvent |
'' |
Server event fired on an arrest |
Justice.PenalCode |
27 offences | See below |
The events are fired with TriggerEvent(name, data):
| Event | data fields |
|---|---|
SentenceEvent |
person, character, name, case, fine, jail, judge |
ArrestEvent |
person, character, source, name, fine, jail, bail, officer |
luaConfig.MDT.Justice.ArrestEvent = 'my_jail:arrested'
luaAddEventHandler('my_jail:arrested', function(data)
-- data.source, data.jail (minutes), data.bail, data.fine
end)
A penal code line:
lua{ id = 'horsetheft', label = 'At hirsizligi', class = 'felony', fine = 120, jail = 45 },
id must not change; records use it. class is 'misd' (misdemeanour), 'felony' or 'capital'. fine is in dollars, jail in minutes. An arrest adds up the chosen offences, limited by MaxJail.
#apps/mdt/config_server.lua
Only Logs. See config_server.lua.