﻿MDT Pro - quick install
=======================

MDT Pro starts a local browser MDT when you go on duty with LSPDFR. You can use it on the same PC,
Steam overlay, or another device on your network.


Requirements
------------
Install these external mods:

  - LSPDFR and RagePluginHook
  - CommonDataFramework (CDF), required for every setup

The normal MDT Pro release installs these support files with the plugin:

  - plugins\LSPDFR\MDTPro.dll
  - plugins\LSPDFR\CommonDataFramework.dll
  - plugins\LSPDFR\CommonDataFramework\PostalXMLs\*.xml
  - plugins\LSPDFR\CalloutInterfaceAPI.dll
  - plugins\LSPDFR\Newtonsoft.Json.dll
  - plugins\LSPDFR\LemonUI.RagePluginHook.dll
  - System.Data.SQLite.dll in the GTA V root
  - x64\SQLite.Interop.dll
  - MDTPro\

LemonUI is required. The release includes it, but you can get it here if you ever need to replace it:
https://github.com/LemonUIbyLemon/LemonUI/releases/download/v2.2/LemonUI.zip

Callout Interface is optional for loading, but needed for live Active Call details.

Pick one local integration stack:

  - Policing Redefined
  - StopThePed + Ultimate Backup

Do not run Policing Redefined together with StopThePed + Ultimate Backup. CDF is still required either way.

In the MDT, open Settings -> Config and Plugins and set Traffic stops & events and Backup (Quick Actions)
to match the stack you installed.

MDT Cloud login:

  - Register an account at https://mdt.stockhosting.com.au
  - Use Policing Redefined only
  - StopThePed + Ultimate Backup is local-MDT only and is not supported for Cloud login right now


OpenIV install
--------------
Use MDTPro-*.oiv for the normal install. It puts the plugin, web UI, SQLite files, LemonUI,
and support DLLs in the expected GTA V folders. It does not install MDTProNative.

Use MDTPro-*-Uninstall.oiv to remove MDT Pro plugin files and the MDTPro web folder. It
leaves shared dependencies such as SQLite and Newtonsoft.Json so other mods can keep using them.


Manual install
--------------
Copy the release into your GTA V folder, the one with GTA5.exe. Do not copy the .oiv files into the game.

Keep the folder layout intact:

  From this release                     Into your GTA V folder
  ------------------                    ------------------------
  plugins\lspdfr\                      plugins\LSPDFR\  (includes MDTPro and support DLLs)
  MDTPro\                               MDTPro\
  System.Data.SQLite.dll                GTA V root
  x64\SQLite.Interop.dll                x64\SQLite.Interop.dll

SQLite has one strict rule: System.Data.SQLite.dll belongs in the GTA V root, not only under plugins.
If MDT Pro cannot open its database, check that file and x64\SQLite.Interop.dll first.


Use
---
  1. Start GTA V and go on duty with LSPDFR.
  2. MDT Pro shows one or more addresses, usually http://127.0.0.1:9000.
  3. Open that address in Chrome, Edge, Brave, or Steam overlay.

Addresses are also written to MDTPro\ipAddresses.txt.

If another device on your network cannot connect, add a Windows Firewall inbound rule on the game PC for
the MDT port, usually 9000.


Update
------
Overwrite the plugin files, MDTPro folder, and SQLite files with the new release.

Keep MDTPro\data\ and MDTPro\config.json if you want to keep your records and settings.


Troubleshooting
---------------
  - Log file: MDTPro\MDTPro.log (next to config.json)
  - Plugin load errors: also check RAGEPluginHook.log in the GTA V folder
  - Saved MDT addresses: MDTPro\ipAddresses.txt
  - Default in-game MDT Pro menu key: F10


Credits
-------
MDT Pro is derived from External Police Computer (EPC), an LSPDFR police computer mod.
Thanks to the EPC authors and contributors for the original project and idea.

License
-------
MDT Pro is licensed under the Eclipse Public License 2.0 (EPL-2.0). Full text: LICENSE in this folder.
Some default data files may be under the MIT License; see the project repository for details.