NAVI DRIVE 2.4 - Phone and GPS for BeamNG.drive (0.40.4)
Created by Fraat
================================================

NEW IN 2.4 BETA
- Bus: destination sign (route number + destination) and inside screens (next
  stop, following stops) updated at every stop, on the game's buses and with mods
  reading the same data (BusDispCtrl, WayLine). Text editable in the app.
- Pick your line in the Bus app, plus new Navi Drive lines (N1 to N6) built from
  each map's bus stops, career map included.

NEW IN 2.3 BETA
- Touch map (GPS): drag to move, wheel to zoom, long press (or right click) to
  drop a pin then "Go" or "Favourite", double-click or "Recenter" to follow your car.
- Place search (magnifier): gas stations, garages, dealers, missions, map places
  and your favourites, sorted by distance.
- In-car GPS screen (Navi Drive GPS part) is now a touch screen: click it from the
  driver seat to pan, zoom, long press = destination. Technique from the
  "Touchscreen & Navigation" mod by Lotnaler (used with permission).
- Taxi, ideas from "Taxi Career RP" (buell): pickup fee + per km + per second,
  live meter, riders in a hurry or calm, early bonus, +25 % per extra rider,
  detailed payout, black market rides (x3, crash or police = reduced pay),
  drop the rider early (-50 $).
- Fleet (Jobs > Fleet, career): hire drivers for your other vehicles, train them
  and collect their earnings.
- New "Navi" design (default theme) and new logo.
- Checked with BeamNG.drive 0.40.4.

NEW IN 2.2 BETA
- Theft: on foot, walk up to a parked car and press F: a lockpicking game opens
  in the phone (stop the needle in the green zone with Space). In career the
  car joins your vehicles and sells with the normal game sale system.
- Taxi: 10 $/km at x1 up to 100 $/km at x5, ride offers, seated visible
  passengers, 80+ passenger lines. Clearer GPS ride card for taxi and bus.
- Camera: live view in the phone, selfie, zoom, photo edits, wallpaper.
- Bank: loans from 500 to 20,000 $.

NEW IN 2.1 BETA - TAXI / BUS CAREERS, DEEPER THEFT
- Taxi and Bus each have a level (1-50), XP and an average passenger rating.
  Levels unlock seats (taxi: 1 passenger at level 1 up to 10; bus: 10 seats
  + 4 per level) and a pay bonus (+3% per level).
- Vehicle class (D, C, B, A, S): the game's class in career, otherwise by
  value. It multiplies taxi fares (x0.85 to x1.75).
- Money and XP multipliers for taxi and bus (x0.5 to x5).
- Coherent routes: taxi pickups/drop-offs at the map's parking spots; the
  bus follows the map's real bus lines.
- Customer types, passenger groups, doors open at stops and close after,
  visible passengers waiting on the kerb, passenger weight added to the car.
- Your name (Settings > Phone): the phone and passengers call you by it.
- Theft: hotwiring, alarms, fence or chop shop, price from the car's real
  value, class and condition, fence orders (x1.5), thief reputation.

NEW IN 2.0 BETA - THE NAVI DRIVE PHONE
- The app is now a phone: icon home screen (20 apps), dock, keyword search
  (apps and settings), bottom bar: back, home, rotate, close. Closed, it
  becomes a small pill.
- Portrait or landscape in one tap; the handle at the bottom right stretches
  the phone any time. 7 models (Classic, Edge to edge, Notch, Foldable,
  Retro, Rugged, Mini) + 13 themes + 14 cases.
- Weather: pick the weather and the time speed "1 game min = 5 s ... 0.5 s".
- Radial menu (R key): Navi Drive > weather, time speed, hour (in career
  under the Career menu, in free roam under Quick actions).
- Camera: orbit / chase / driver / free view, photos without the interface
  (navidrive/photos folder), Gallery with 8 filters.
- Listings, Dealer, Garage: in career, the game's real offers (route, visit,
  dealership); in free roam, paid from the Navi Drive wallet and delivered
  next to you.
- Income and Expenses: career financial history, otherwise the mod's own.
  8-step tutorial + video tutorial in the Tutorial app.

NEW IN 1.13 BETA - JOBS (page "Jobs", the car icon)
- Taxi: drive to the blue beacon, stop, the customer gets in; the GPS then
  guides you to the destination. Fare per kilometre. Passengers get unhappy
  with hard braking, crashes and speeding: smooth driving earns a tip and a
  5-star rating, but a passenger who has had enough leaves (30% of the fare).
- Bus: a 6-stop line. Stop on each beacon for 5 s, passengers board and get
  off, you are paid per passenger, plus a line bonus (punctuality and smooth
  driving). Fares are halved if the vehicle is not a bus.
- Car theft: get into a PARKED car and it counts as stolen. Crashes and
  speeding raise the "wanted" level; get 500 m away to cool down. Drive to
  the fence (orange beacon, GPS-guided), stop on it once the wanted level is
  low enough and the car is sold (price depends on the car's value, its
  damage and the wanted level). Your own cars are never counted as stolen.
- Money goes to the Navi Drive wallet and, in Career mode, to your Career
  balance too. Totals are saved in settings/navidrive/jobs.json.
- Balance values are at the top of lua/ge/extensions/naviDriveJobs.lua (CFG).
- Not in this beta yet: police patrols and arrests, redesigned interface.

NEW IN 1.12
- 3D GPS: the "Navi Drive GPS 2x" part shows up again in the parts menu
  (Navigation slot).
- Custom voices: the voice list now opens inside the app (the standard
  drop-down list did not open in the game).
- Map: roads now show on every map (before, on big maps such as Italy,
  only the route line was drawn, or roads looked dashed).
- GPS: no more missed turns on streets with driveways, parking lots or
  closely spaced junctions (before, several km could go by with no arrow
  and no voice).
- Phone access: fixed the "Fatal Lua Error ... bind" error on BeamNG
  0.39.4 (and the blank 3D GPS screen).
- Stability: night lighting, boosted headlights and rain never reuse an
  object the game has destroyed (a possible cause of "GPU crashed" /
  STATUS_HEAP_CORRUPTION crashes).

CONTENTS
 1. What the mod does           7. Time & weather
 2. Installing and updating     8. Night lighting and headlights
 3. How to use                  9. Music, wallpapers and custom voices
 4. GPS voice                  10. Troubleshooting
 5. Phone                      11. Credits and licenses
 6. 3D GPS in the car


1. WHAT THE MOD DOES
--------------------
An all-in-one HUD app: voice-guided GPS, speed limit (km/h or mph), game
time, time & weather, night lighting, boosted headlights, Career Tracker,
music player, phone access, and a 2x 3D GPS unit to fit in your car.
13 screen styles, 14 frames, wallpapers, display up to 4K, English and
French.


2. INSTALLING AND UPDATING
--------------------------
1. Close BeamNG.drive.
2. Copy navidrive_fraat.zip, WITHOUT UNZIPPING IT, into:
     %LOCALAPPDATA%\BeamNG\BeamNG.drive\current\mods\
   (or install it from the in-game Repository).
3. Load a session, then Esc > HUD Apps > add "Navi Drive".
4. Place the app and resize it by dragging its edges.
Updating from an older version: delete the old zip (e.g. navidrive.zip)
from the mods folder so the mod isn't loaded twice. Your settings, music,
wallpapers and custom voices are kept.


3. HOW TO USE
-------------
Left bar: Home, GPS, Career, Music, Time & weather, Settings.
- GPS: set a destination on the big map (M key).
- Speed limit top right, game time bottom right, music bottom centre (the
  orange button opens the music folder).
- Compass on the right: "heading up" or "north up", plus zoom.
- Settings, in collapsible sections: General, Display, Speed alerts, GPS
  voice, Phone. Style and Wallpaper open from Settings.


4. GPS VOICE
------------
- Like a real GPS: "In 200 meters, turn right", then "Turn right" at the
  right moment. Each said once, and only while the car is moving (nothing
  while stopped at a light). One extra, earlier announcement on fast roads
  (above 80 km/h).
- Turns are computed from the game's route and the map's road network: a
  big intersection made of several crossings counts as one turn, ramps and
  forks are announced ("Bear slightly right", "Take the exit"), a junction
  you drive straight through stays silent. The arrow stays on the same
  turn until you've passed it, and its distance only goes down.
- After a turn, if the next instruction is more than 1.2 km away:
  "Continue straight ahead".
- Also announces U-turns, route calculated, recalculating, the approach to
  the destination, arrival, and speeding if the alert is on.
- When you start the engine: "Good morning" (5 am - 6 pm) or "Good
  evening" + your nickname (6 per gender, e.g. "captain", "princess").
- Collision detector: when the car really hits something (not just hard
  braking), the voice yells "Ouch!", "Ouch, that hurt!" or "Whoa...
  ouch!" depending on how hard the hit was.
- 12 built-in voices: English and French, female and male, 3 styles, each
  with its own voice and its own lines:
  * Normal: clear, calm voice, classic GPS phrases.
  * Charming: soft (female) or deep (male) voice, speaks slowly and slips
    in a compliment now and then.
  * Funny: a "tipsy" co-pilot who hesitates, hiccups and makes silly
    remarks; the direction is always said clearly.
- Music gets quieter during announcements.
- Custom voices: as many as you like (your own voice, a Waze pack...),
  picked from a list. See section 9.


5. PHONE
--------
Settings > Phone > On: a QR code and your personal link appear. Scan it
with your phone on the same Wi-Fi as the PC: map, next turn, speed limit,
time, music, time & weather, all touch-friendly.
- The game itself hosts the page on your local network (port 8765).
  Nothing is sent over the Internet.
- The link contains a unique code, kept between sessions. "New link"
  disables the old one.
- If Windows asks to allow BeamNG on private networks: accept.


6. 3D GPS IN THE CAR
--------------------
A GPS unit mounted in the car, based on the game's BeamNavigator, twice as
big, showing the Navi Drive screen (map, turn, speed limit, time).
- Garage > Parts > "Navigation" slot (the stock GPS slot).
- "Navi Drive GPS 2x (horizontal)" or "(vertical)": $250.
- Tuning menu > Navi Drive GPS: size (x1 to x3), left/right, fore/aft and
  height offsets, screen rotation.
- Vertical picture upside down? Set the rotation to -90.


7. TIME & WEATHER
-----------------
- Time flow handled by the mod: play/pause, time, speed x0.5 to x30 or real
  time; nights pass twice as fast.
- Weather: 5 presets and Clouds, Fog, Wind, Rain sliders. If the map has no
  rain, the mod creates it.
- Diagnostics button: report in navidrive\diagnostic.txt.


8. NIGHT LIGHTING AND HEADLIGHTS
--------------------------------
- At nightfall: street lamps, houses and map lights turn on gradually;
  everything turns off at sunrise.
- Quality: Low (24 lights), Medium (48), High (92), around you.
- Boosted headlights (Realistic or Powerful) for your car and nearby
  traffic, without shadows to spare the graphics card.
- On maps that already have the game's night lighting, no duplicate street
  lamps.


9. MUSIC, WALLPAPERS AND CUSTOM VOICES
--------------------------------------
Folder: %LOCALAPPDATA%\BeamNG\BeamNG.drive\current\navidrive\
(created automatically on first launch; the app's "folder" buttons open
it directly)
- music\        : mp3, ogg, wav, flac (one subfolder = one playlist)
- backgrounds\  : jpg, png, webp
- voices\custom\ : your custom voices. ONE SUBFOLDER = ONE VOICE, e.g.
    voices\custom\My voice\
    voices\custom\My Waze pack\
  Settings > GPS voice > "Custom" style: pick the voice in the list
  ("Refresh" if you just added it). "Voice name" + "Rename" changes the
  displayed name. Below the list, Navi Drive shows how many phrases it
  recognized.
  * Record your voice: "Custom" style > "Record a voice" button. The
    recorder opens in your browser (address http://127.0.0.1:8765/recorder,
    game running). Name your voice, read the 51 phrases into your mic,
    download the .zip and unzip it into voices\custom\: it creates the
    voice folder.
  * Waze pack: Waze voice packs (.tar.gz, e.g. on archive.org) work as
    they are: Navi Drive understands their file names (TurnRight,
    200meters, Arrive...). In the recorder, "Import a Waze voice pack"
    turns one into a .zip ready to unzip into voices\custom\. Phrases a
    pack doesn't have are skipped. Waze packs belong to their authors:
    keep them for personal use.
  * By hand: ogg, mp3, wav, webm or m4a files named like the built-in
    voices (m_right, d_300, e_arrived...) or like Waze.
  * Advanced: a voice.json file in a voice folder can set "map" (which
    phrase uses which file, or a list picked at random) and "quips" (lines
    slipped in now and then after a turn).
  The old voices\custom_fr\ and custom_en\ folders still work.


10. TROUBLESHOOTING
-------------------
- Time & weather > Diagnostics, then post navidrive\diagnostic.txt and a
  screenshot on the mod's page.
- An error shows in a red banner in the app: take a screenshot.
- "The GPU crashed" crash (d3d12): update your graphics driver; if it keeps
  happening, start the game in DirectX 11. To check whether the mod plays
  a part: night lighting on Low and boosted headlights Off, then drive the
  same route again.
- Phone: same Wi-Fi as the PC, and Windows Firewall must allow BeamNG.
- Limit shows "--": the road has no limit in the map data.
- In Career mode, the game may enforce its own time and weather.
- Default settings: delete settings\navidrive\settings.json.


11. CREDITS AND LICENSES
------------------------
Navi Drive was created by Fraat. Thanks to the authors of these mods and
resources, which helped and inspired the interface:
- TaxiDriver Reloaded (GPS, phone access)
  https://www.beamng.com/resources/taxidriver-reloaded.38575/
- TaxiDriver (the original mod)
  https://www.beamng.com/resources/taxidriver.28763/
- Roadwave music player (music folder and audio formats)
  https://www.beamng.com/resources/roadwave-%E2%80%94-in-car-music-player-with-3d-audio.39115/
- BeamLegalRacing (GPS, time and weather on 0.39)
  https://github.com/r3eckon/BNG-BeamLegalRacing
- Improved Navigation Map (navigation app)
  https://github.com/Toast732/improvedNavigation
- BeamMP EnvSync (game time)
  https://github.com/EvanMulawski/BeamMP-EnvSync
- West Coast USA with Lights (night lighting)
  https://www.beamng.com/resources/west-coast-usa-with-lights.38130/
- BeamNG Documentation (night lighting, lights)
  https://documentation.beamng.com/
Included resources (no code or file is taken from the mods above):
- Voices: Kokoro-82M (hexgrad, Apache 2.0 license) via sherpa-onnx (k2-fsa,
  Apache 2.0) and eSpeak NG; a few lines of the French Charming female
  voice made with ElevenLabs. Details: voices\VOICES_LICENSE.txt
- QR Code Generator (Kazuhiko Arase, MIT license): qrcode_LICENSE.txt
- Google Fonts (SIL OFL 1.1 license): fonts\OFL.txt
