GTA5 Police Bodyguard v1.1
==========================

Overview
--------

GTA5 Police Bodyguard is a ScriptHookVDotNet v3 mod for GTA V PC single player.
It lets you spawn NPC bodyguard squads near the player with F5.

Bodyguards can use Police or Merryweather appearance, follow the player on foot, use ground vehicles, and fight confirmed hostile NPCs.
The squad system supports up to four squads: Green, Pink, Yellow, and Orange.
Each squad can have 1 to 4 members.

This build is compatible with GTA V 1.0.3788.0 and ScriptHookVDotNet v3.7.0-nightly.153.

Important:
This mod is for single player only. Do not use it in GTA Online.


v1.1 Changes
------------

- Squad vehicles are recreated automatically when destroyed.
- When a squad vehicle is repositioned to catch up, squad members are placed back inside the vehicle.
- Enemy law-enforcement NPCs hit by bodyguard fire are delayed briefly before going down.
- Weapon changes are now handled only in Squad Members settings.
- Police Settings and Merryweather Settings no longer contain weapon options.


Requirements
------------

- GTA V for PC
- Script Hook V
- ScriptHookVDotNet v3.7.0-nightly.153

Do not downgrade to ScriptHookVDotNet v3.6.0 for current GTA V builds.
The official v3.6.0 release page warns to use nightly.89 or later for GTA V
1.0.3258.0 or later.

Your GTA V root folder should contain:

- dinput8.dll
- ScriptHookV.dll
- ScriptHookVDotNet.asi
- ScriptHookVDotNet3.dll


Installation
------------

1. Install Script Hook V into the GTA V root folder.
2. Install ScriptHookVDotNet v3.7.0-nightly.153 into the GTA V root folder.
3. Create a folder named scripts in the GTA V root folder if it does not exist.
4. Copy the scripts folder from this ZIP into the GTA V root folder.

Expected files:

Grand Theft Auto V\scripts\Gta5PoliceBodyguard.dll
Grand Theft Auto V\scripts\PoliceBodyguard.ini


Controls
--------

F5:
  Spawn the currently selected bodyguard team.

F6:
  Open or close the bodyguard menu.

F7:
  Switch between Defense and Combat.

Num 8 / Num 2:
  Move menu selection up or down.

Num 5:
  Select the highlighted item.

Num 6:
  Open a submenu.

Num 4 / Num 0 / Escape:
  Go back or close the menu.


Bodyguard Modes
---------------

Defense:
  Prioritizes staying with and protecting the player.

Combat:
  Prioritizes eliminating confirmed hostile NPCs.
  In combat mode, bodyguards may move away from the player to push enemies, improve line of fire, and fight more aggressively.


F6 Menu
-------

Main menu:

- Spawn bodyguard
- Delete bodyguard
- Change bodyguard
- Strength
- Settings

Change bodyguard:

- Police
- Merryweather

Strength:
  Adjusts bodyguard accuracy, fire rate, and damage tuning.

Settings:

- General Settings
- Police Settings
- Merryweather Settings
- Squad Members


General Settings
----------------

Blips:
  Toggle bodyguard minimap blips.

Blip Mode:
  Switch between All, LeaderOnly, and Team.

Mode:
  Switch between Defense and Combat.


Police Settings
---------------

Arrival:
  Changes how Police bodyguards spawn.

  Direct:
    Spawn directly on foot.

  PatrolCar:
    Spawn inside police vehicles.

Squads:
  Sets Police squad count from 1 to 4.
  This applies on the next spawn.

Units:
  Switch between Police, SWAT, and Mixed.

Vehicle:
  Changes the Police ground vehicle model.
  Options: NONE, POLICE, POLICE2, POLICE3, POLICE4, FBI, RIOT.


Merryweather Settings
---------------------

Vehicle:
  Changes the Merryweather ground vehicle model.
  Options: NONE, MESA3, DUBSTA, GRANGER.

Squads:
  Sets Merryweather squad count from 1 to 4.
  This applies on the next spawn.


Squad Members
-------------

You can configure Green, Pink, Yellow, and Orange squads.

Members per Squad:
  Sets the selected squad member count from 1 to 4.
  This applies on the next spawn.

Weapon Mode:

  Shared from Member 1:
    Squad members use Member 1's weapon setting.

  Custom per Member:
    Each member can use an individual weapon setting.

Member 1 to Member 4:
  Changes each member's weapon.
  For Pink, Yellow, and Orange squads, Member 1 acts as the squad leader.
  Green uses the player as the main anchor, so there is no separate Green NPC leader.


Initial INI Settings
--------------------

The release INI is tuned for a simple v1.1 first run:

- PoliceArrivalMode=PatrolCar
- PoliceTeamCount=1
- PoliceMembersPerTeam=1
- PoliceVehicleModel=POLICE
- MerryweatherMembersPerTeam=1
- MerryweatherVehicleModel=GRANGER
- UseSharedWeapons=true
- GreenMembers=1
- PinkMembers=1
- YellowMembers=1
- OrangeMembers=1
- Member1Weapon=WEAPON_COMBATPISTOL

With UseSharedWeapons=true, each squad uses its Member 1 weapon.


INI Sections
------------

Settings are saved here:

Grand Theft Auto V\scripts\PoliceBodyguard.ini

[General]
  Blips, blip mode, and mode switch key.

[Follow]
  Follow distances.

[Police]
  Arrival mode, squad count, unit type, and ground vehicle model.

[Merryweather]
  Squad count, member count, and ground vehicle model.

[VehicleTeleport]
  Vehicle catch-up teleport settings.

[Squads]
  Per-squad member counts, shared weapon mode, and Member1Weapon to Member16Weapon.

[Modes]
  Default mode and combat/defense distances.


Vehicles
--------

If vehicle spawning is enabled, squads spawn inside their assigned ground vehicles.
When the player enters a vehicle, squad vehicles try to follow while keeping distance.

If a squad vehicle falls too far behind, it can be repositioned onto a road.
When that reposition happens, squad members are placed into their assigned vehicle automatically.

If a squad vehicle is destroyed, the mod creates a new assigned vehicle and places the squad inside it.


Combat Behavior
---------------

- Bodyguards attack NPCs that pass the hostile target checks.
- Friendly NPCs, bodyguards, and protected mission allies should not be attacked.
- Wanted hostile law enforcement can be attacked.
- Law-enforcement targets hit by bodyguard fire are delayed briefly before going down.
- Non-police NPCs such as gang members can be attacked if there is proof that they are attacking the player or bodyguards.
- NPCs are not attacked just because they are armed.


Logs
----

Bodyguard debug log:

Grand Theft Auto V\scripts\Gta5PoliceBodyguard.log

For loading problems, also check:

Grand Theft Auto V\ScriptHookVDotNet.log


Package Contents
----------------

scripts\Gta5PoliceBodyguard.dll
scripts\PoliceBodyguard.ini
README_ENGLISH.txt
README_JAPANESE.txt
GTA5_MODS_DESCRIPTION.txt

Source code, project files, and PDB files are not included in the release ZIP.


Notes
-----

This is an AI bodyguard mod under active development.
Mission NPCs, police AI, and vehicle AI can behave differently depending on the GTA V scenario.

Do not use this mod in GTA Online.
