DoubleHook NPCAI 3.1
NPCAI is the paid cloud-AI evolution of NPCI. It allows open-ended conversations with civilians and first responders instead of requiring a fixed phrase list.
Open DoubleHook's official Patreon
Do not use third-party reuploads. The guide assumes the user has legally obtained the current NPCAI package and selected the Policing Redefined build.
Dependencies observed in the Sentinel build
The package and its current documentation are the authority, but missing shared assemblies previously included errors for components such as:
Microsoft.Bcl.AsyncInterfaces.dll
System.Buffers.dll
System.Memory.dll
System.Numerics.Vectors.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Text.Encodings.Web.dll
System.Text.Json.dll
System.Threading.Tasks.Extensions.dll
DamageTrackerFramework.dll
Do not download these individually from DLL websites. Restore them from the official NPCAI/framework packages that own them.
Installation
- Download the PR-specific NPCAI package.
- Back up old
NPCXML, prompt, and config folders. - Remove obsolete NPCI/NPCAI DLLs from both root
pluginsandplugins\LSPDFR. - Extract the complete package into the GTA root.
- Verify the main NPCAI DLL is inside the documented plugin folder.
- Verify there is only one
NPCAI_API.dllunless the author explicitly requires another copy. - Enter the chosen Gemini or Groq credential in the private config.
- Launch once with default prompts before installing third-party prompt packs.
Microphone and push-to-talk
The personal build's most reliable approach was:
- Open Logitech G Hub.
- Map the desired side button to F24.
- Set NPCAI PTT to F24.
- Disable the same key in Discord or other overlays.
- Hold the button while speaking and release after the full sentence.
Direct XButton2 mapping did not work consistently across plugins.
Recommended starting options
EnableVisualContext=false
VisualContextToggleKey=L
VisualContextToggleModifier=RShift
AmbientSpeechEnabled=true
AmbientSpeechMinutes=3
Visual context can improve scene awareness but increases API usage. Keep it disabled until the basic voice pipeline works.
Six-part test
- Input: PTT press appears in the log.
- Capture: microphone activity starts.
- Transcription: spoken text is recognized.
- Request: API call is sent without authentication or quota errors.
- Response: a valid NPC reply returns.
- Presentation: the NPC responds and the player mouth animation/indicator behaves correctly.
The stage that fails determines the repair. Do not reinstall everything when only the recording device is wrong.
Troubleshooting
Mouth does not move and the NPC does not respond
The PTT event probably never started. Verify key mapping, modifier, focus, and plugin initialization.
Mouth moves but no response returns
Check API authentication, quota, network access, model availability, and JSON dependencies.
Game freezes or LSPDFR crashes immediately after PTT
Inspect the first exception in RagePluginHook.log. In the actual build this was caused by missing shared assemblies after files were replaced, not by the microphone itself.
Groq/Gemini test works outside the game, but NPCAI is silent
The API key is valid. Check whether the NPCAI DLL loaded, the selected provider matches the config, and the PTT listener receives the key.
NPC responses are repetitive or inappropriate
Return to the official prompts, verify visual context state, and test without community prompt packs. Add enhancements only after the default package is stable.
Privacy and cost
Cloud-AI conversation may send dialogue and scene context to the selected provider. Never upload API keys or raw configs publicly. Review the provider's quota and billing controls before enabling ambient speech.