Systems Overview
Architecture, config flags, pharmacies, insurance, supplies, bans, and records
Architecture and escrow
Open files handle most integration work.
Key files:
shared/config.luacovers jobs, meds, pharmacies, insurance, supplies, bans, permissions, notify, and TextUI.shared/lang.luastores UI strings and metadata description templates.client/client_open.luahandles animations, overdose, lean, panic hooks, shoplifting hooks, and client-side vehicle keys.server/server_open.luahandles Discord logging, metadata building, medication helpers, and server-side vehicle keys.server/insurance.luaandclient/insurance.luahandle plans, payments, claims, and self-service insurance UI.server/insurance_broker.luaandclient/insurance_broker.luahandle broker sales, commissions, and insurance bans.server/pharmacy_supplies.luaandclient/pharmacy_supplies.luahandle stock, restocks, and supply reduction.server/prescription_records.luamanages DB prescription records and flagging.server/employee_computer.luaandclient/employee_computer.luapower the staff computer.server/shoplifting.luaandclient/shoplifting.luahandle shelf loot, detection, and bans.
Escrow keeps the core flow files protected.
The main open integration files are still available for your server-specific hooks.
Critical config flags
These values change behavior fast:
Config.TestModeConfig.DebugConfig.PayIntoSocietyConfig.PayIntoInsuranceSocietyConfig.TargetConfig.ServerSidePeds
Leave Config.TestMode off on live servers.
It changes how writing and test commands behave.
Database
Representative tables used by the system:
prescription_recordspharmacy_suppliesmedical_insurancemedical_insurance_claimspharmacy_bansmed_insurance_commissionsmed_insurance_bans
Config.DatabaseCleanup handles retention for claims, adjuster activity, and inactive bans.
Config.MaxPrescriptionRecords caps how many records are kept per doctor.
Prescriptions and medications
Authoring depends on:
Config.JobConfig.MinimumGradeConfig.ItemUsewithConfig.ItemNameor
Config.CommandName
The prescription item uses metadata for patient details, doctor signature, medication, and dose tracking.
Config.Medications defines each medication entry.
Each entry can include:
itemlabeloptional
totaleffectssideEffectsanimcostPerDose
Pricing comes from the base medication cost plus the dose cost, then insurance modifies that total.
Pharmacies
Each Config.Pharmacies entry can include:
ped model and spawn
blip
customer interaction radius
walk-to-counter behavior
employee counter
drug collection location
restock location
robbery shelves and loot
Staff permissions come from Config.PharmacyPermissions.
That controls records, flagging, unflagging, unbans, and history clearing.
Insurance
Config.InsuranceSystem is the master insurance switch.
It also handles claim retention, payment cycle days, and medication rejection chance.
Config.InsurancePlans defines the plan list, fees, discount, down payment, and medication eligibility.
Config.InsuranceJob defines broker access, minimum grade, boss grade, commission, and self-service availability.
Supplies and restock
Config.SuppliesSystem controls stock levels, low-stock checks, restock reward, and the supply box model.
Config.RestockMission and Config.PharmacyRestockMissionLocations control the delivery mission flow.
The server export reducePharmacySupplies(pharmacyId) returns whether stock was actually reduced.
Shoplifting, bans, and records
Config.Bans controls ban history, repeat multipliers, and permanent ban thresholds.
Detection uses shelf chances and pharmacist busy-state style rolls.
The employee computer supports:
prescription search
flagged prescription review
panic integration
patient targeting for staff flows
Lean, overdose, and hooks
Lean-related items:
Config.CoughSyrupItemConfig.LeanCupItemConfig.SprunkItemConfig.LeanItemConfig.LeanItems
Overdose and narcan related values:
Config.NarcanItemDrugTaken(amount)StartOverdose()StopOverdose()
Open integration points include dispatch, vehicle keys, notify, TextUI, and Discord logging.
Last updated