=====================================================================
  SEATBELT & CRASH PHYSICS V
  A realistic seatbelt system for GTA V (Single Player, PC Legacy)
  Version 1.0  |  Made by Sujal
=====================================================================

Fasten your seatbelt. Drive safely. Experience realistic driving in
GTA 5!

Seatbelt & Crash Physics V adds a fully interactive seatbelt to GTA V. Fasten
it with a key press when you get into a vehicle. Without it, a serious
crash can throw you through the windshield. With it, you stay in your
seat, until the crash is simply too fast for any seatbelt.

---------------------------------------------------------------------
  FEATURES
---------------------------------------------------------------------
  SEATBELT
  - Press a key (default B) to fasten / unfasten your seatbelt.
  - Seatbelt ON/OFF indicator in the top-left corner (green / red).
  - Fasten and unfasten click sounds.
  - Optional automatic seatbelt when you enter a vehicle.
  - Works in cars, SUVs, sports cars, supercars, sedans, trucks, vans
    and emergency vehicles. Motorcycles, bicycles, quad bikes, boats,
    helicopters, planes and trains are excluded automatically.
  - Does nothing while you are on foot.

  WARNING ALARM
  - Drive faster than 50 km/h without a seatbelt and an alarm beeps
    repeatedly, with a small "Fasten your seatbelt" message at the
    bottom of the screen flashing in sync with every beep.
  - Stops when you fasten your seatbelt.
  - Stops by itself after 60 seconds (configurable).

  REALISTIC CRASHES
  - Without a seatbelt: a hard crash at 100 km/h or more can throw you
    through the windshield with the normal GTA ragdoll.
  - The faster the crash, the harder and higher you are thrown.
  - The windshield breaks when someone is thrown out.
  - Rollovers can eject you as well.
  - With a seatbelt:
        under 95 km/h     fully protected
        95 - 170 km/h     you stay in the car but take small damage
        170 km/h and up   the belt can't save you, you can still be
                          thrown through the windshield
  - Crash and fall damage is normal GTA damage. If you use god mode /
    invincibility from a trainer, the mod will not lower your health.

  PASSENGERS
  - NPC passengers can be thrown out too. Each one randomly wears a
    seatbelt or not (50% by default).

  EXTRAS
  - After someone is thrown out, the vehicle (and a truck's trailer)
    is kept from despawning for 10 minutes.
  - Everything is configurable in the INI file.

---------------------------------------------------------------------
  REQUIREMENTS
---------------------------------------------------------------------
  - Grand Theft Auto V (PC, Legacy), single player only
  - Script Hook V
  - Script Hook V .NET (ScriptHookVDotNet v3)

---------------------------------------------------------------------
  INSTALLATION
---------------------------------------------------------------------
  1. Open the "scripts" folder inside this download.
  2. Copy EVERYTHING inside it to the "scripts" folder in your GTA V
     directory (create "scripts" if it does not exist). You should end
     up with:

        GTA V\scripts\SeatbeltCrashPhysicsV.cs
        GTA V\scripts\SeatbeltCrashPhysicsV.ini
        GTA V\scripts\SeatbeltCrashPhysicsV\warning.wav
        GTA V\scripts\SeatbeltCrashPhysicsV\fasten.wav
        GTA V\scripts\SeatbeltCrashPhysicsV\unfasten.wav

  3. Start the game. Get into a car and press B.

  UPDATING / OLD VERSIONS
  - If you used a test version called "RealisticSeatbelt" or
    "SeatbeltCrashPhysicsV", delete its .cs, its .ini and its sound
    folder first, otherwise two copies will run at the same time.

  UNINSTALL
  - Delete the files listed above. The mod does not change any game
    files.

---------------------------------------------------------------------
  CONTROLS
---------------------------------------------------------------------
  B  =  fasten / unfasten seatbelt (change it with SeatbeltKey in the
        INI)

---------------------------------------------------------------------
  SETTINGS  (SeatbeltCrashPhysicsV.ini)
---------------------------------------------------------------------
  [General]
    SeatbeltKey            key to fasten/unfasten (default B)
    AutoSeatbelt           fasten automatically on entering (false)
    ResetOnExit            reset seatbelt when you leave (true)
    ShowStartupMessage     "loaded" message after game start (false)

  [Crash]
    EnableEjection         turn windshield ejection on/off (true)
    CrashSensitivity       higher = crashes count as harder (1.0)
    MinEjectionSpeedKmh    minimum speed for ejection (100)
    ImpactThreshold        sudden speed change that counts as a crash (9)
    EnableRolloverEjection rollovers can eject (true)
    ThrowStrength          how hard you are thrown (1.0)
    SmashWindshield        break the windshield on ejection (true)
    KeepVehicleSeconds     keep the car from despawning (600)

  [Seatbelt]
    BeltSafeSpeedKmh       full protection below this speed (95)
    BeltFailSpeedKmh       belt can't save you from this speed (170)
    BeltMediumDamageMax    max small damage in between (25)
    BeltFailEjectChance    chance to be thrown at/above fail speed (0.9)

  [HUD]
    ShowHud                on/off indicator (true)
    HudDisplaySeconds      seconds it stays visible, 0 = always (5)
    HudX, HudY             indicator position (20, 20)
    ShowNotifications      extra text messages (false)
    ShowWarningMessage     flashing warning text (true)
    WarningMessage         the text
    WarningMessageX/Y      position (640, 655 = bottom center)
    WarningMessageScale    size (0.45)
    WarningMessageOnPercent how much of each beat it stays visible (55)

  [Sound]
    EnableSounds           all mod sounds on/off (true)
    WarnWhenUnbelted       alarm while driving unbelted (true)
    WarningSoundFile / FastenSoundFile / UnfastenSoundFile
                           file names of your sounds
    SoundVolume            0-100 (80)
    LoopCustomWarning      loop one long file instead of repeating a
                           short beep (false)
    WarningIntervalMs      time between beeps in ms (584)
    WarningMinSpeedKmh     alarm starts above this speed (50)
    WarningDurationSeconds alarm stops after this long, 0 = never (60)
    ShowSoundStatus        show which sound files are used (false)

  [Passengers]
    PassengerSupport       NPC passengers can be thrown out (true)
    NpcBeltChance          chance an NPC wears a seatbelt (0.5)

---------------------------------------------------------------------
  USING YOUR OWN SOUNDS
---------------------------------------------------------------------
  - Use .wav files and put them in scripts\SeatbeltCrashPhysicsV\ (or
    directly in "scripts"). Set the file names in the INI.
  - mp3 only works if Windows can load its mp3 driver. On some PCs it
    fails (MCI error 266). If so, convert the mp3 to .wav.
  - Short beep: keep LoopCustomWarning=false and set WarningIntervalMs
    to the length of one beat (60000 divided by BPM). The included
    warning.wav is one ding of 584 ms (about 103 BPM).
  - Long beeping file: set LoopCustomWarning=true.
  - If a file is missing, the built-in GTA beep is used instead.

---------------------------------------------------------------------
  TROUBLESHOOTING
---------------------------------------------------------------------
  Nothing works / no indicator / no sound
    - The script probably did not compile. Open ScriptHookVDotNet.log
      in your GTA V folder and look for lines with "error" that
      mention SeatbeltCrashPhysicsV.cs.
    - Make sure there is only ONE copy of the script in "scripts"
      (including subfolders).
    - Make sure Script Hook V .NET is installed and up to date.
    - Set ShowStartupMessage=true to check that the script is running.

  Yellow message "sound not found"
    - Check the file names in the INI and the folder
      scripts\SeatbeltCrashPhysicsV\.
    - Set ShowSoundStatus=true to see which files are in use.

  More details
    - scripts\SeatbeltCrashPhysicsV.log is written by the mod and lists
      sound problems and script errors.

---------------------------------------------------------------------
  CHANGELOG
---------------------------------------------------------------------
  1.0  First release.

---------------------------------------------------------------------
  CREDITS
---------------------------------------------------------------------
  - Mod by Sujal.
  - Warning beep taken from a "car seatbelt alarm" recording from the
    Freesound community.
  - fasten.wav and unfasten.wav are simple generated click sounds.
  - Script Hook V by Alexander Blade. Script Hook V .NET by crosire.

---------------------------------------------------------------------
  DISCLAIMER
---------------------------------------------------------------------
  Use at your own risk. Single player only. Do not use online. Back up
  your game files. This mod is not affiliated with Rockstar Games or
  Take-Two Interactive.
=====================================================================
