Skip to content
swillunderscorePublic

About

Talk to any NPC in Cyberpunk 2077 - free-text conversations with a local LLM, voices cloned from your own game files, memory, and NPC actions

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

Repository files navigation

Real Talk

Talk to any NPC in Cyberpunk 2077. Look at someone, press R, and type — they answer in character, generated by an AI model you run on your own machine (no API key, nothing leaves your PC) or a cloud provider if you'd rather not. NPCs anchored to a place remember you between conversations. No character packs, no hand-written NPC list: if the game can spawn them, you can talk to them.

Built with Claude (Opus 5 / Fable 5) as the implementation partner — it wrote the code and dug APIs out of the decompiled game scripts, under my direction. The design, priorities, and the testing that found the real bugs are mine.


⚠️ Before you start — two things

1. Local model? Add a launch option, or the mod looks completely dead. Steam → Cyberpunk 2077 → Properties → Launch Options:

%command% -no-tls

RedHttpClient refuses plain http:// without it, and fails silently — the single most common setup problem. Cloud (OpenRouter) users skip this. GOG/Epic: add -no-tls to the launch arguments the same way (for voice, see the GOG/Epic note under Voice).

2. This mod changes your save, and some of it can't be undone. NPCs act on the conversation — follow you, take or hand over eddies, walk off, and (if you enable Violence) shoot who you point them at. NPCs can be killed, including ones the game may need, and death is permanent. Back up your saves. NPC Actions and Violence are separate switches, both off by default, and /reset returns the person in front of you to normal.

Where saves live / how cautious to be
%USERPROFILE%\Saved Games\CD Projekt Red\Cyberpunk 2077\

The bar for acting is deliberately low: a model that plays its part acts on what you ask, and a small model sometimes acts on what you nearly asked. That is the price of NPCs that can actually do things. If you care about a save, copy it aside first, or play on one you don't mind losing.


Requirements

  • Cyberpunk 2077 (tested on 2.31). Phantom Liberty optional — with it, the expansion's characters get voices, bios and quest awareness too; without it, nothing looks for it.
  • RED4ext · redscript · Codeware · RedData · RedFileSystem · Mod Settings
  • RedHttpClient 0.7.1+ — ⚠️ get it from GitHub releases, not Nexus (the Nexus build may be 0.7.0, which has no -no-tls support at all, so every request fails no matter what). Version prints on startup in red4ext\logs\red4ext-*.log.

Optional, each unlocking a feature: Audioware (spoken replies) · Appearance Menu Mod (talking gestures; also its manual follow/stop is the way out if a companion gets stuck).

"REDScript compilation failed" listing lots of mods?

You're missing a dependency. The mod list in that popup is misleading — everything compiles as one unit, so one missing piece takes down every script mod. Open r6\logs\redscript_rCURRENT.log; the first error names the real cause.


Get a model

The mod doesn't ship a model — you run one locally and it connects. You don't type an endpoint or edit files for this: Mod Settings → Server is a dropdown. Install one of the programs below, start it, pick its name in the dropdown, and the address is filled in for you.

Program Ease Pick in dropdown
KoboldCpp easiest on Windows — one .exe, load a model, go KoboldCpp
LM Studio easy, nice UI LM Studio
Ollama easy, command-line Ollama
llama.cpp most control, most manual llama.cpp

Each program's own quick-start (linked above) gets it running and serving a model — that's the part their docs cover. All you bring back here is which one it is, in the dropdown. Only two cases need the config file (r6\scripts\RealTalk\RealTalkConfig.reds): OpenRouter (cloud — put an API key + model id there, no download, no -no-tls), and a non-default port (the presets assume each program's standard port; if you changed it, pick Custom and set the URL).

Recommended model: Dan's Personality Engine 7B, Q5_K_M (~5 GB) — search 7b-m-dans-personalityengine-v1.2.1-rc-5-GGUF on Hugging Face, load it in whichever program you chose. Any instruct model works; character-tuned ones sound far less like a chatbot in a trenchcoat.

Start the model automatically with the game

You normally start your model program yourself and leave it running — KoboldCpp, LM Studio and Ollama all keep serving in the background, so you start them once and forget about them. That's the simplest setup and it's fine.

Linux/Proton can go one step further: the launcher (see Voice) reads server/sidecars.conf, one shell command per line, and starts/stops those with the game. Add your model server's line and the Play button does everything:

npc-tts-server.sh
/path/to/koboldcpp --model /path/to/model.gguf --port 5001

Windows doesn't auto-start the model yet — the Windows launcher starts only the voice server. Start your model program yourself (leave the window open). If you'd like real auto-start on Windows, it's a wanted feature; open an issue.

Either way the mod's redscript can't launch a program itself (mods are sandboxed), so this launcher — run from your Steam launch options — is the only auto-start mechanism, which is why there's no in-game "start server" button.

Model on another machine

Even with -no-tls, RedHttpClient only allows plain http:// to three address prefixes: http://127.0.0.1, http://localhost and http://192.168.0.. Anything else is refused silently. That includes a hostname (http://my-mac:1234/...) and any other LAN subnet (192.168.1.x, 10.x, …). If your model server is at 192.168.0.x, pick Custom and put its URL in the config file. Otherwise, forward a local port to it. Run this once in an admin PowerShell; it persists across reboots:

netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=1234 connectaddress=192.168.1.50 connectport=1234
# undo:
netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=1234

Use your server's IP and port, and the matching 127.0.0.1 port. Then pick the program's preset in the dropdown (LM Studio on its standard port 1234, as here), or Custom with http://127.0.0.1:<port>/v1/chat/completions. The server has to accept LAN connections (in LM Studio: Serve on Local Network).

Hardware — the model shares your GPU with the game
Your VRAM What to do
16 GB+ Comfortable. ~5 GB model + game with margin. Recommended.
12 GB Fine at 1080p/1440p; watch texture settings.
8 GB Tight — realistically low settings, no RT, and a smaller quant (Q4_K_M ~4.1 GB).
< 8 GB Run the model on CPU or a second machine (see Model on another machine below).

Ray tracing roughly doubles the game's VRAM use. Reference figures on a 16 GB card, game running with RT on: game ~9 GB + model/cache ~5.6 GB ≈ 14.6 GB. Replies typically land in a second or two; if yours are much slower, the model is spilling into system RAM — use a smaller quant.


Using it

Look at an NPC; if they can talk, a small [R] talk prompt appears. Press R (rebindable in Controls). Type, ENTER to send.

  • ENTER on an empty box steps out of the text field. With the box unfocused: the talk key closes the chat, DELETE wipes the conversation, arrow keys scroll back.
  • Reopening on the same NPC resumes it. Place-anchored NPCs also remember you across game sessions.
  • The game keeps running — you can move mid-conversation. If the game also binds your talk key (R is reload/interact in some setups) it still does its thing; a mod can't reserve a key, so pick a free one in Controls if it overlaps.

How it works — no authored content, and how NPCs decide to act

There is no authored content in this mod. The character card is assembled live when you open a chat, from what the game itself knows:

  • Who they are — name (including quest-driven reveals), civilian/ganger/kid class, gang affiliation, and for crowd NPCs a description from their actual appearance asset.
  • Where/when — district and in-game hour, live.
  • What they know — world context gated on your quest facts, relationship context for story characters, and whether they even know V (strangers aren't told your name).
  • How they talk — up to eight of the character's real spoken lines, harvested from your archives by pairing VO files with subtitle text, as few-shot examples.
  • What they remember — a per-character memory the model updates after each conversation, keyed on stable record hashes.

Actions come from the reply, not a tool schema. One model call per reply. The card asks for "speech in quotes" *then a plain-words action beat*. The reply is split: quotes → transcript + voice; everything else → the beat. The beat's words are matched to a small action vocabulary (a follow command, a move order), searched against the animation database for a gesture, and drive the facial expression. Only money and violence use explicit tags ([PAY 500], [ATTACK]) because they're irreversible; everything else is inferred from prose the model wrote as fiction. So the model is choosing narratively, not mechanically — it writes a scene, the mod listens.

The honest limit: the action vocabulary is matched by hand, so failures are translation failures (a phrasing the matcher doesn't know), not model failures. A measured design for replacing that matcher with a second grammar-constrained classifier call — benchmarked on a local 7B, a 31B and a frontier model — lives in docs/research/action-classifier.md. It is a validated design, not yet wired into the mod, so searching the scripts for it correctly finds nothing.

Typed commands — /reset, and the Cheats

/reset (or /stop) always works: it undoes everything the mod ever commanded on the NPC in front of you and returns them to normal. The rest need Cheats on in Mod Settings and exist for testing — they make an NPC act without asking:

command effect
/follow they follow you
/stay they stop and hold position
/kill they turn on whoever you're looking at (needs Violence)
/disarm (or /take) you take their weapon into your inventory

Asking for most of these works without Cheats — "put that away", "wait here", "give me your gun" go through the conversation and the person can say no. /disarm is the only one with no spoken equivalent: they can choose to hand a weapon over, but taking it isn't something they can be talked into.

Voice (experimental) — cloned locally from your own game files

NPCs speak their replies in a cloned approximation of their own voice. Off by default; enable Spoken Replies (TTS) and install Audioware.

Setup is one Launch Options line — the Play button does everything else:

Windows:  "C:\...\Cyberpunk 2077\tools\RealTalk\realtalk-launch.bat" %command% -no-tls
Linux:    "/path/to/Cyberpunk 2077/tools/RealTalk/realtalk-launch.sh" %command% -no-tls

First launch bootstraps everything in the background — a private Python, the XTTS-v2 voice model (~2 GB, once), and the extraction tools — all ordinary released tools fetched from their official sources by a short script you can read. Nothing packaged, nothing system-wide. After that: game starts, voice starts with it, both stop together.

Adding this line means you accept XTTS-v2's license. The voice model is under the Coqui Public Model License — non-commercial use only. Coqui's installer normally asks you to agree in a console window, but the launcher runs it where you can't answer, so the launcher says yes for you. If you don't agree, leave the line out: without it the voice model is never downloaded.

GOG / Epic: their launchers can only append arguments, so they can't wrap the game in the .bat. Run tools\RealTalk\realtalk-launch.bat yourself instead (a desktop shortcut to it works). With no arguments it starts bin\x64\Cyberpunk2077.exe -no-tls and does the same as the Steam line. If you'd rather launch from Galaxy/Epic, start tools\RealTalk\realtalk-voice.bat before you play and close its window when you're done. It needs one run of realtalk-launch.bat first, for the setup.

The voice server writes its output to tools\RealTalk\logs\realtalk-tts.log. If voice doesn't work, look there first.

Voices are automatic and always local. The first time a named character speaks, the server extracts their real VO from your archives, builds a reference clip, and clones it on your CPU — cached from then on. Crowd NPCs get a matching archive voice bank (gender/faction where possible, varied by look). Drop a clip in server/voices/<Name>.wav to override. Text appears immediately; the spoken line follows a few seconds later (synthesis is on CPU so it doesn't fight the game for GPU). Nothing is uploaded or shipped.

Linux/Proton: the two archive tools (WolvenKit CLI, vgmstream) aren't fetched for you — point REALTALK_WOLVENKIT / REALTALK_VGMSTREAM at your copies, or skip them and NPCs use built-in voices.

Settings

All in Mod Settings → Real Talk.

Setting What it does
Enabled Master on/off
Server Local presets or OpenRouter (fills in the address)
Talk / Reset Key Open/close chat (R); wipe conversation (DELETE)
Reply Length Max tokens per reply; ~120 suits spoken dialogue
Temperature Higher = more unpredictable; 1.0 is a good default
Context Size Your server's context window — match your -c setting
Memory Summaries NPC updates what it remembers about you on chat close
NPC Actions / Violence The two action switches — both off by default
Community / Crowd NPCs Place-anchored (remember you) vs pedestrians (can't)
Talking Gestures Gesture while speaking; needs AMM
Forget Everyone Erases all NPC memory; one-shot
Debug Log Off by default — with it off, no log file is written at all

Advanced: RealTalkConfig.reds holds a custom URL, model name, optional API key, and a house-style prompt applied to every character.

Privacy — what touches the internet (almost nothing)
  • One optional feature touches the internet, off by default: Character Lookup fetches a character's intro from the Cyberpunk wiki — just their name goes out, the same request your browser makes. Cached locally, shipped with nothing.
  • Nothing is logged with Debug Log off (the default): no file at all. With it on, replies are logged as a character count, not text. The voice server logs only structural lines (which voice/slot), never conversation.
  • Saved conversations live in r6\storages\RealTalk\. Delete a file, or use Forget Everyone.
  • Local model + local voice = nothing leaves your PC. OpenRouter sends your messages to their servers — that tradeoff is yours.
Troubleshooting · Why crowd NPCs don't remember you

No "[R] talk" on anyone — check Enabled, and that you're looking at a living, non-hostile NPC. Crowd pedestrians need Crowd NPCs on. Chat opens but no replies — you missed -no-tls. Or your model server is on another machine at an address RedHttpClient won't allow (see Model on another machine). Voice doesn't play — check tools\RealTalk\logs\realtalk-tts.log. Replies very slow — model spilling to system RAM; smaller quant. Stutter while replying — expected; generation shares the GPU. Lower Reply Length. Empty replies — you're running a reasoning model, which puts output in a field this mod doesn't read. Start the server with reasoning disabled (--reasoning off on llama.cpp) or use a non-reasoning model.

Crowd NPCs are one-off by design. Place-anchored NPCs have stable identities this mod can attach memory to. Pedestrians are pooled and recycled with randomly generated names — the same face returns with a different name — so there's no stable identity to remember. Not a limitation the mod can engineer around; it's how the engine spawns crowds.


AI disclosure & license

This mod uses AI at runtime and ships none of its output — no audio, no model weights, no game assets, no AI-generated content. The download is plain-text mod scripts and a readable Python server. Dialogue is generated live by the model you connect. Voices are synthesized on your CPU by XTTS-v2, cloned from lines inside your own game archives — never bundled, uploaded, or distributed, and off until you enable TTS.

XTTS-v2 downloads on first use from its publisher under the Coqui Public Model License (non-commercial). The voice launcher accepts that license on your behalf, so setting it up means you agree to it (see Voice). If a performer whose voice this can reconstruct, or a rights holder, asks for it to come down, it comes down — no argument.

Mod code is MIT.

Credits
  • Crowd-NPC targeting pattern and the talking-gesture anim entity: Appearance Menu Mod.
  • Audioware makes positional custom audio possible.
  • rayshader's Red* libraries and psiberx's Codeware are the plumbing.
  • Voice: coqui-tts (XTTS-v2).
  • Character lookup reads the Cyberpunk Wiki (CC BY-SA); nothing is redistributed.

About

Talk to any NPC in Cyberpunk 2077 - free-text conversations with a local LLM, voices cloned from your own game files, memory, and NPC actions

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages