Neocortex Logo
Build a GTA 5 AI NPC mod with Neocortex: pedestrians who talk back, a passenger who judges your driving, voice commands and a radio quiz in story mode.

GTA 5 AI NPC Mod: Talking Pedestrians and Voice Commands

ModdingGTA 5AI NPC

Los Santos has thousands of pedestrians, and every one of them runs out of things to say after two lines. A GTA 5 AI NPC mod changes that: clerks, strangers and passengers who answer what you actually say and react to what you just did. Neocortex gives your Script Hook V mod AI characters with voices, actions and emotions, plus on-device voice commands, so you can build that in story mode without running your own language model.

Grand Theft Auto V Enhanced in-game screenshot Screenshot: Grand Theft Auto V Enhanced © Rockstar Games

What you could build with Neocortex in GTA 5

Pedestrians and shopkeepers who talk back

Walk into a 24/7 at 3 a.m. with a wanted level and the clerk should notice. Your script sends the clerk character a short list of events ("player has 2 wanted stars", "player is holding a pistol", "police sirens nearby") and the player's line. The clerk answers in character, with an emotion tag your mod can turn into an animation, and can return an action like { "name": "OPEN_REGISTER" } or { "name": "CALL_POLICE" } that your script runs. The same pattern works for a street vendor on Vespucci Beach or a jogger in Mirror Park: one character per archetype, each with its own personality and knowledge of the neighbourhood.

A passenger with opinions about your driving

Put a companion in the passenger seat and stream events from the drive: near misses, red lights run, 190 km/h on the Senora Freeway, the third crash in a minute. The companion comments, laughs, complains and asks to get out when you scare them. Actions such as CHANGE_STATION or GET_OUT let them do something about it. On Pro and Team plans, group chat puts up to six characters in one conversation, so two passengers can argue about the route while you drive.

Voice commands and a radio trivia host

With Neocortex Voice Commands, the player just talks: "call me a cab", "call for backup", "next station", "turn the radio off and set a waypoint home". Your script receives the matched commands and runs them, several per sentence if needed. For long drives, build an original radio host character who runs a Los Santos trivia quiz through the quiz engine (Team plan). The player answers out loud, speech-to-text turns it into text, and the API keeps score.

How GTA 5 modding works

GTA 5 single-player mods run as native plugins loaded by Script Hook V by Alexander Blade. Its July 2026 release lists supported patches for both GTA V Legacy and GTA V Enhanced. Script Hook V loads .asi plugins and gives them access to the game's native functions.

Most script mods are written in C# on top of a .NET layer:

  • ScriptHookVDotNet 3 (SHVDN) is the standard .NET script host for Legacy. Current game patches need the nightly builds rather than the last stable release.
  • ScriptHookVDotNetEnhanced is an extended SHVDN that runs scripts on both Legacy and Enhanced, so scripts built for Legacy can run on Enhanced as they are. Check each project's notes for which builds your script targets.
  • LemonUI gives SHVDN 3 scripts NativeUI-style menus, useful for a settings screen or a "talk to" prompt.

A script is a compiled C# class in the scripts folder with a Tick handler that runs every frame. From there you read the player, nearby peds, vehicles and wanted level through SHVDN's API, and you can do anything .NET Framework can do: HttpClient for web requests, an audio library such as NAudio for voice playback, and SHVDN's ScriptSettings for an .ini file. Subtitles go on screen with GTA.UI.Screen.ShowSubtitle, and LemonUI handles menus. Run web requests off the game thread and hand results back to Tick so the game never stalls.

Grand Theft Auto V Enhanced in-game screenshot Screenshot: Grand Theft Auto V Enhanced © Rockstar Games

How Neocortex fits in

  • Dialogue: the script reads game state, sends it with the player's line to a Neocortex character (/v3/chat), shows the reply as subtitles, plays the voice from /v3/audio/generate or /v3/audio/stream, and runs any actions the character returns.
  • Conversation Flows: for a longer encounter, a flow steers the conversation through beats you design and returns checkpoint keywords (flowState) your script reacts to, for example handing the player a waypoint once the stranger trusts them.
  • Quizzes: the quiz engine runs question sets, scoring and leaderboards through /v3/quiz, which is all a radio trivia host needs.
  • Voice commands: on-device voice commands turn spoken phrases into game actions with no cloud round trip. Your mod uses the Neocortex Voice Commands library on the player's machine, and you design the command set in the dashboard as actors, actions and objects (actor "dispatcher", action "send", object "taxi"). Push-to-talk or always listening, in multiple languages.

A minimal chat call from an SHVDN script looks like this:

static readonly HttpClient Http = new HttpClient();

static async Task<string> AskCharacter(string apiKey, string characterId, string sessionId, string line, string gameEvent)
{
    var body = JsonConvert.SerializeObject(new {
        characterIds = new[] { characterId },
        message = line,
        playerId = "player-1",
        sessionId = sessionId,
        events = new[] { new { priority = 1, content = gameEvent } }
    });
    var req = new HttpRequestMessage(HttpMethod.Post, "https://api.neocortex.link/v3/chat");
    req.Headers.Add("x-api-key", apiKey); // read from the mod's .ini, never hard-coded
    req.Content = new StringContent(body, Encoding.UTF8, "application/json");
    var res = await Http.SendAsync(req);
    return await res.Content.ReadAsStringAsync(); // sessionId, messages[].lines, actions
}

Keep the returned sessionId and send it with the next message so the character remembers the conversation.

Getting started

  1. Install Script Hook V and a .NET script host for your edition: SHVDN nightly for Legacy, ScriptHookVDotNetEnhanced for Enhanced. Add LemonUI if you want menus.
  2. Design your character in the Neocortex visual editor: personality, knowledge of Los Santos, voice, and the actions it may return. Test it in the browser for free.
  3. Add a Conversation Flow, a quiz or a voice command set if your idea needs one.
  4. Connect from your script with HttpClient, show replies with subtitles and play the audio.
  5. Keep the API key in an .ini file the player fills in, so every player uses their own key.
  6. Test in story mode before you share anything.

Voice Commands is a licensed SDK: contact us for a Voice Commands license.

Mod policy and fair play

Rockstar's PC single-player mods policy says Take-Two generally will not act against single-player, non-commercial mods that respect third-party IP, and it excludes online services, new stories, missions and maps. So build ambient conversations, companions, voice commands and quizzes, not new story missions, and use original characters rather than Rockstar's. GTA Online must never be modded: keep the mod in story mode, and have each player use their own Neocortex API key.

The same approach works for older Rockstar games in our GTA San Andreas and Vice City and GTA 4 guides. For the voice side, read our post on on-device voice commands for game mods, or see how Neocortex stacks up on our comparison page.

Tool versions and links checked October 2026. Modding tools change often; check each project's page for the latest release.

Frequently Asked Questions

Can you add AI NPCs to GTA 5?

Yes, in story mode. A Script Hook V .NET script can read what is happening around the player, send it to an AI character over a web API and show the reply as subtitles. Neocortex provides the character, its voice and the actions it returns, so your mod only handles game logic.

Does a GTA 5 AI mod work on the Enhanced edition?

Script Hook V supports current Legacy and Enhanced patches, and ScriptHookVDotNetEnhanced runs .NET scripts on both editions. A Neocortex mod only needs HTTP, text and audio, so the same script can target Legacy and Enhanced.

Can I control GTA 5 with voice commands?

Yes. A script can map spoken phrases to game actions such as calling a cab or changing the radio. Neocortex Voice Commands runs on the player's PC, understands natural phrasing and returns the matched command instantly, without a cloud round trip.

Will an AI NPC mod get me banned in GTA 5?

Rockstar's PC mod policy tolerates non-commercial single-player mods, but GTA Online is off limits and modding it can get your account banned. Keep any Neocortex mod in story mode and never load it in GTA Online.

Is Neocortex free for GTA 5 modders?

Yes. The free plan covers AI characters, Conversation Flows and the API, and you can test characters in the browser before writing any mod code. Paid plans start at €9 a month.

Written by

Neocortex

Date

Oct 20, 2026

Updated

Oct 20, 2026

Read time

6 min

Similar Posts

Read More