Neocortex Logo
Build a Red Dead Redemption 2 AI NPC mod with Neocortex: saloon keepers who remember you, camp conversations, posse voice commands and a campfire quiz.

RDR2 AI NPC Mod: Talking Strangers, Camp Chatter and Voice Commands

ModdingRed Dead Redemption 2AI NPC

You ride into Valentine at dusk, caked in mud, with a bounty on your head and a horse that has seen better days. The saloon keeper looks you over and asks what happened out there. A drunk at the bar decides you look like trouble and says so. Back at camp, two of your gang are still arguing about whether the train job was worth it. In the base game, those people pick from a handful of recorded lines. A Red Dead Redemption 2 AI NPC mod lets them answer what you actually say. Neocortex gives your ScriptHookRDR2 mod AI characters with voices, memory and actions, plus on-device voice commands, so you can build it in story mode without running your own language model.

Red Dead Redemption 2 official in-game screenshot of Arthur Morgan Screenshot: Red Dead Redemption 2 © Rockstar Games

The RDR2 mod stack at a glance

RDR2 reached PC in November 2019, a year after consoles, and its single-player modding scene runs on the same ideas as GTA V's: a native hook that loads plugins, and a .NET layer on top for scripts.

ToolWhat it gives youWhen you need it
Script Hook RDR2Loads .asi plugins and exposes the game's native functions. Supports builds 1491.17 and above, and shuts the game down if you enter Red Dead Online.Always
ScriptHookRDR2 V2A community hook with the same API, built for the newest patchIf the original hook lags behind a game update
ScriptHookRDR2DotNet V2A .NET script host, an updated fork of the original ScriptHookRDR2DotNet. Needs .NET Framework 4.8 or later and the VC++ 2019 x64 runtime.For C# scripts
Lenny's Mod LoaderReplaces game files through a virtual file systemOnly for asset mods; script mods don't need it

Use the .asi and DLLs from the same ScriptHookRDR2DotNet release, and expect older C# scripts to need small fixes.

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, your horse, the bounty in each region and the time of day, and you can use anything .NET Framework offers: HttpClient for web requests, an audio library such as NAudio for voice playback, and an .ini file for settings. Subtitles and prompts go on screen through the game's own UI natives.

From a game event to a spoken reply

Every feature in this post runs on one loop. 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/stream, and runs any actions the character returns. Make web requests off the game thread and hand results back to Tick so the game never stalls.

A minimal chat call from a ScriptHookRDR2DotNet script:

static readonly HttpClient Http = new HttpClient();

static async Task<string> AskCharacter(string apiKey, string characterId, string sessionId, string line, string[] gameEvents)
{
    var body = JsonConvert.SerializeObject(new {
        characterIds = new[] { characterId },
        message = line,
        playerId = "player-1",
        sessionId = sessionId,
        // e.g. "player has a $50 bounty in New Hanover", "player's horse is injured", "it is raining"
        events = gameEvents.Select(e => new { priority = 1, content = e })
    });
    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, and the character remembers you the next time you ride into town.

Red Dead Redemption 2 official screenshot of a gunfight in town Screenshot: Red Dead Redemption 2 © Rockstar Games

What to build on the frontier

A saloon keeper who remembers you. Your script sends the keeper a few events with the player's line: the bounty, the mud, the fact that you shot up this saloon last week. The keeper answers in character, with an emotion your mod can turn into an animation, and can return actions such as { "name": "POUR_WHISKEY" } or { "name": "CALL_SHERIFF" } that your script runs. The same pattern covers a general store clerk in Rhodes, a ferryman on the Lannahechee or a doctor in Saint Denis: one original character per archetype, each with its own personality and knowledge of the area.

A stranger on the trail. Conversation Flows take a longer encounter through beats you design and return checkpoint keywords (flowState) your script reacts to. A lost prospector you meet near the Grizzlies starts out suspicious, warms up if you share your water, and finally marks the spot of his abandoned claim on your map. Keep these as short side encounters with original characters, not new story missions.

Red Dead Redemption 2 official screenshot of two riders in the snow Screenshot: Red Dead Redemption 2 © Rockstar Games

Camp chatter. This is where RDR2 shines for AI dialogue, because so much of the game happens around a fire. Send several characterIds in one /v3/chat call and the characters share one conversation. Leave message empty and a director decides who speaks next for a few turns, then hands the scene back to the player; set speakerCharacterId when your script wants a specific character to answer. Two original gang members can argue about splitting the take while a third tells them both to shut up, and you can walk over and pick a side. Group chat holds up to six characters and is on the Pro and Team plans.

Voice commands for your posse. Some orders should not wait for a language model: "posse, follow me", "make camp here", "hold the horses", "cover me". Neocortex Voice Commands runs on the player's PC, understands natural phrasing and returns the matched command with no cloud round trip. You design the command set in the dashboard as actors, actions and objects (actor "posse", action "follow", object "me"), and the player can stack several in one sentence, with push-to-talk or always-on listening, in multiple languages. Your script turns each command into a ped task.

A campfire trivia host. For quiet nights at camp, build an original storyteller who runs a frontier trivia game through the quiz engine (Team plan). The player answers out loud, speech-to-text turns it into text, and the API keeps score.

Story mode only

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. Rockstar's newer Mod Guidelines cover all its games and go further:

  • Leave Rockstar's story alone. Do not expand or modify its storylines, missions or characters. No new dialogue for Arthur, Dutch or Sadie.
  • Leave Rockstar's voices alone. Do not modify or reuse its voiceover performances. Give each AI character an original Neocortex voice designed from a text description, or one you have the rights to, never a clone of a Rockstar voice actor.
  • Multiplayer runs through Rockstar's Creator Platform, which for this game means RedM, and any mod outside that platform must stay strictly non-commercial.

The guidelines also state that they are not a license. Script Hook RDR2 already closes the game if you enter Red Dead Online, and your mod should never try to get around that. Keep it in story mode, keep it free, and have each player use their own Neocortex API key.

Next steps

  1. Install Script Hook RDR2 and ScriptHookRDR2DotNet V2 from the same release, and check that a sample script loads in story mode.
  2. Design your character in the Neocortex visual editor: personality, what they know about their corner of the map, voice, and the actions they may return. Test it in the browser for free.
  3. Add a Conversation Flow, a group chat scene, 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.

The same approach works across Rockstar's other games in our GTA 5 AI NPC mod guide, and our GTA 6 modding post looks at what could come next. Browse every game in our AI NPC and voice command mod guides, or read how on-device voice commands for game mods work. Start with one saloon keeper in one town, and Neocortex handles the rest of the conversation.

Tool versions and links checked October 2026. Modding tools change often; check each project's page for the latest release. Neocortex is not affiliated with Rockstar Games or Take-Two Interactive.

Frequently Asked Questions

Can you add AI NPCs to RDR2?

Yes, in story mode on PC. A ScriptHookRDR2 .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 Script Hook RDR2 work with the latest patch?

Script Hook RDR2 supports game builds 1491.17 and above, and community builds such as ScriptHookRDR2 V2 target the newest patch. A Neocortex mod only needs HTTP, text and audio, so it keeps working across hook versions.

Can I talk to NPCs in RDR2 with a microphone?

Not in the base game, where NPCs use recorded greet and antagonize lines. A mod can turn the player's speech into text, send it to a Neocortex character and play back a voiced reply, while short orders such as "follow me" run through on-device voice commands.

Will an RDR2 mod get me banned in Red Dead Online?

Script Hook RDR2 closes the game when you enter Red Dead Online, and Rockstar limits multiplayer modding to RedM and its Creator Platform. Keep any Neocortex mod in story mode with original characters, and it stays clear of online play.

Is Neocortex free for RDR2 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 24, 2026

Updated

Oct 24, 2026

Read time

7 min

Similar Posts

Read More