Mods.RogueTrader.Brevity
RogueTrader.Brevity
Shortens Warhammer 40,000: Rogue Trader's dialogue: export every conversation line, simplify it with an LLM, and load the shorter text back through a runtime overlay mod.
Released on Nexus Mods as Rogue Trader Brevity: https://www.nexusmods.com/warhammer40kroguetrader/mods/651
Building needs RogueTrader.Shared checked out next to this repo (shared game paths, references, packaging and helpers).
Scope
SPEC.md is the complete product, built and unbuilt, with every story and its ticket; RELEASE.md is the current finish line (MS-74, Brevity 3.0.0 with a current page and the tools on R:), which completes it.
Installed copies of the tools
run.bat (or run.ps1) at the repo root is the shared MindAttic run menu. .agent/publish.json names the two tool projects (BrevityMod is the in-game mod and ships through Nexus instead). Option 1, Redeploy, publishes both tools to R:\MindAttic\Apps\Mods.RogueTrader.Brevity\Debug (framework-dependent) and \Release (self-contained win-x64 single-file DialogueExport.exe and DialogueSimplify.exe, no .NET install needed). Each installed exe takes the same arguments as the dotnet run commands below. The first Release publish on a machine restores the .NET 9 win-x64 runtime packs into the NuGet packages folder (NUGET_PACKAGES, on R: on SnowCrash). That can take many minutes while the drive is busy. Let it finish: stopping it throws the partial extraction away, and later publishes reuse the packs.
Phase 1: export the dialogue
dotnet run -c Release --project tools/DialogueExport -- --out dialogue.jsonl
It reads the blueprints straight from Owlcat's modding template (<game>/Modding/WhRtModificationTemplate.tar, or an extracted Blueprints folder via --blueprints) and the English strings from enGB.json; no game mod is needed. --game overrides the install folder (default: the Steam path on SnowCrash).
Each line of dialogue.jsonl is one cue (NPC line) or answer (player reply):
| Field | Meaning |
|---|---|
key
|
String key in enGB.json, the key the overlay mod replaces
|
kind
|
cue or answer
|
dialog
|
The conversation it belongs to (null if no dialog reaches it) |
speaker
|
Unit name, Player, Narrator, or null for the conversation's owner
|
prevKey
|
The line shown just before it |
check
|
Skill check that leads to it or that the answer shows, e.g. SkillPersuasion Hard success
|
soulMarkShift / soulMarkRequirement
|
Conviction change or gate, e.g. Hope 2
|
voiced
|
Has voice-over (from Sound.json)
|
words, text
|
Word count and the original English text |
Phase 2: simplify with Claude
dotnet run --project tools/DialogueSimplify -- --in dialogue.jsonl --speaker Idira --limit 3 --sync
Needs ANTHROPIC_API_KEY set. Each request is one conversation (split at 120 lines / 4,000 words), sent to claude-opus-5-5 with structured JSON output. Target length: NPC lines 20-40% of the original (close to 20% for most; more only for exposition or emotional beats), non-verbal description cut to a few words, player answers about 50%. Options:
--dry-runcounts what would be sent and sends nothing.--speaker NAME,--dialog TEXT,--limit Npick a subset;--skip-voicedleaves voiced lines alone.--syncsends requests one at a time (good for trials); without it the job goes through the Message Batches API at half price. Stopping and rerunning the same command resumes a batch.--model,--effort low|medium|high|max(defaultmedium).--export DIRwrites each pending request asDIR/<id>.jsonplusINSTRUCTIONS.mdand a manifest, and needs no API key: Claude Code subagents rewrite each chunk into<id>.out.json.--import DIRthen runs those replies through the same checks and cache.
Results are cached in .brevity/cache.jsonl by a hash of the original text (plus the prompt version), so reruns and game patches only send lines that changed. A line is rejected (and kept in .brevity/rejects.jsonl to retry later) if it comes back missing, empty, or with a different set of markup tokens. .brevity/simplified.json maps each string key to its shortened text for the overlay mod.
Phase 4: the overlay mod
dotnet build src/BrevityMod
Builds a Unity Mod Manager mod and installs it, with the current .brevity/simplified.json, into %USERPROFILE%\AppData\LocalLow\Owlcat Games\Warhammer 40000 Rogue Trader\UnityModManager\RogueTraderBrevity (the game starts its own Unity Mod Manager, so nothing else is needed). Rebuild after each import to pick up newly shortened lines. If the Nexus release is also installed through Vortex, the build refreshes Vortex's staged copy too, so a Vortex deploy doesn't put the older release back. Override GameDir, UmmDir, ShortText or VortexModsDir with -p:Name=value.
Releases
Every release has its own list of changed lines, docs/dialogue-polish-changes-v<major>.md. To release, append the new version and the current line count of .brevity/cache.jsonl to tools/releases.json, then run python -I tools/release_changes.py. It rebuilds each release's text from the append-only cache and writes the list for any release that doesn't have one yet.
How the mod works
When the English text loads, the mod writes the shortened lines into the game's localization pack in memory; enGB.json on disk is never touched. Disabling the mod in Unity Mod Manager (Ctrl+F10) puts the original text back immediately, even mid-conversation; lines without a shortened version always show the original.
Pages in this repository
- RogueTrader.Brevity — Project Bible — Brevity makes Warhammer 40,000: Rogue Trader's dialogue shorter by swapping in LLM-shortened English text at runtime, without touching the…
- Code ledger: Mods.RogueTrader.Brevity — Every tracked source file and the ticket in this repo's tree that accounts for it (MAT-T484; method:…
- Dialogue changes in 1.0.0 — First release: every NPC line, narration and answer option rewritten shorter, base game and all three story DLCs.
- Dialogue changes in 2.0.0 — Restored lines the length limit had cut too far: Calcazar's and Argenta's prayers and Ulfar's poems in full, Calligos's suspicion of the…
- Dialogue polish: every changed line (RTB-T250) — Lines the brevity pass had cut into stilted or broken English, or where a word was swapped for a flatter one without saving anything,…
- Nexus Mods page: Rogue Trader Brevity — Live at https://www.nexusmods.com/warhammer40kroguetrader/mods/651 (1.0.0 published 2026-10-25).
- Mods.RogueTrader.Brevity — Release charter — A Unity Mod Manager mod for Warhammer 40,000: Rogue Trader that swaps the game's dialogue for LLM-shortened text at runtime, plus the…
- Mods.RogueTrader.Brevity — Product specification — In docs/ECOSYSTEM.md (the workspace's source), this repo is a product in the Mods family, a Rogue Trader mod whose common build code comes…