Koja Scripts

Demo mode

The /mdtdebug commands for filling the MDT with demo data, spawning fake officers and citizens, and recording showcases.

Demo mode

/mdtdebug fills the MDT with believable data and lets you trigger events on demand. It is meant for recording showcases, screenshots and testing. It is not a gameplay feature.

Requirements

  • The player must have one of the aces in Config.DebugTools.aces. The default list is koja-mdt.debug and command.
  • For seed, unseed and the data commands (call, wave, panic, alpr, warrant, mail) the player must also be a registered officer in the MDT, that is, hold a job from shared/departments.lua. Otherwise the command fails (for seed with a message that the player must be an MDT officer).
  • Without the ace the commands answer with a no permission message.

Give the ace in server.cfg:

server.cfg
add_ace group.admin koja-mdt.debug allow

Commands

Type /mdtdebug with no action to print the help line. Chat shows a suggestion with all actions.

CommandDescription
/mdtdebug seedFills the MDT with demo data (see below). If demo data already exists it is removed first. Reopen the MDT afterwards.
/mdtdebug unseedRemoves everything the seed created.
/mdtdebug call [code]Creates one dispatch call at a random place. Codes: 10-71, 10-68, 10-50, 10-16, 10-60, 10-66, 10-10, 10-55, 10-90, 10-52, F-STR. Without a code a random scenario is used.
/mdtdebug call hereCreates a random call at your own position and street.
/mdtdebug wave [n]Creates n random calls (1 to 8, default 4) one after another, 7 to 12 seconds apart.
/mdtdebug panicCreates a panic call (10-99) from one of the demo officers.
/mdtdebug alprCreates an ALPR hit call (code 10-ALPR) for a stolen demo vehicle and writes it to the ANPR log.
/mdtdebug warrantCreates a pending arrest warrant in your department and notifies the department, so a judge can approve it.
/mdtdebug mailDelivers a mail from a demo officer to your inbox with a notification.
/mdtdebug cam [mode]Spawns a fake officer with a recording bodycam. Mode is run (default), walk or drive. The first two move on foot, drive puts the officer in a siren-lit patrol car. Watch it in the MDT under Body cameras.
/mdtdebug citizen [car]Spawns a fake citizen in front of you, optionally with a car. Write a citation for them or look them up in the MDT.
/mdtdebug mood [mood]Mood is sign, refuse or random. Sets how fake citizens react to citations and ID requests. random uses Config.DebugTools.signChance.
/mdtdebug event [kind]Kind is shot, taser or note. Fires a bodycam event on all your fake officers' cameras and reports how many cameras received it.
/mdtdebug clearDeletes the fake officers and citizens you spawned.

Fake peds are also removed when you disconnect and when the resource stops.

What seed creates

The seed writes into your database with identifiers starting with demo: and remembers the row ids it created, so unseed removes exactly those rows. The data is attached to the department of the player who ran the command.

AreaContent
Officers12 demo members across LSPD, BCSO, SAHP, EMS, LSFD and a DOJ judge, with callsigns, badges, a week of duty sessions, division memberships, certifications, and rewards and strikes
People15 demo citizens with flags, notes and licenses. They appear in people search while the seed is active
Vehicles12 demo vehicles linked to those owners, some stolen, wanted, uninsured or unregistered
ReportsSeveral reports with officers, suspects, victims, witnesses, charges and vehicles, some closed and processed
EvidenceLocker items with chain of custody entries
WarrantsWarrants linked to reports, including pending ones
BOLOs and bulletins4 BOLOs and 4 bulletins
CitationsTickets linked to reports
CourtCases with charges, hearings and docket entries
CustodyJail records and impounds
Mail, calendar, notificationsMails in your inbox, 4 calendar events and notification entries
ANPRSeveral ANPR log entries

The demo people and vehicles are injected into the framework bridge only while the seed is active. They are not written into your framework tables.

Typical showcase recording

  1. Prepare

    Join with a police job, go on duty and open the MDT once.
  2. Seed

    Run /mdtdebug seed and reopen the MDT. Dashboard, people, vehicles and reports are now filled.
  3. Add live action

    Use /mdtdebug wave 4 for calls arriving, /mdtdebug panic for a panic alert, /mdtdebug alpr for a plate hit and /mdtdebug mail for a new mail.
  4. Add field actors

    Spawn /mdtdebug cam drive for a bodycam stream and /mdtdebug citizen car for a citation scene. Use /mdtdebug mood sign so the citizen always signs.
  5. Clean up

    Run /mdtdebug clear and /mdtdebug unseed.

Config

OptionDefaultDescription
Config.DebugTools.enabledtrueMaster switch. false disables all of the above.
Config.DebugTools.aces{ 'koja-mdt.debug', 'command' }Aces allowed to use the tools.
Config.DebugTools.signChance0.75Sign chance for the random mood.
Config.DebugTools.officerModel's_m_y_cop_01'Fake officer ped.
Config.DebugTools.citizenModelsfive modelsFake citizen peds.
Config.DebugTools.patrolVehicle'police'Vehicle for cam drive.
Config.DebugTools.citizenVehicle'sultan'Vehicle for citizen car.