Part 2: For modders · 6 sections · page built 2026-12-05 00:35 UTC
The sf-papyrus-ref MCP server lets an agent look up a Papyrus name instead of inventing one. Your agent can also compare compiled scripts, look for unused records and export voice lines.
Richard is modding
- Try Richard's mods at Creations and Nexus Mods.
- Need help with Richard's mods? Visit Help Richard Help You.
What's new
- 2026-12-03. The page now has a Richard is modding panel that links to Richard's mods at Creations and Nexus Mods, and to Help Richard Help You.
- 2026-11-29. This page has a new look, the same as the other Richard Presents pages, with a menu that lights the section you are reading, a short summary at the top and this What's new box.
What to ask
Before you write any Papyrus call, look it up with sf-papyrus-ref, and tell me if a name isn't found.I recompiled my scripts. Compare the old and new compiled scripts and tell me whether anything really changed.Scan MyMod.esm for records I added but nothing uses, and explain what Orphaned and Unreferenced mean.What the agent runs
The sf-papyrus-ref MCP server, which starfield-agent includes as the papyrus-ref server, gives an agent four tools: papyrus_lookup, papyrus_script, papyrus_list_flag and papyrus_check. The starfield-agent skill game-code-rules sets what an agent may do with the game's scripts. Other agents follow each tool's AGENTS.md, and any agent that supports MCP can start the same command. The commands match the manual page.
python -I sf_papyrus_ref.py mcp --quietsf-papyrus-ref lookup Debug.Notification --no-localsf-papyrus-ref check Scripts --creationspython -I pex_compare.py compare <A> <B>python -I ba2_extract.py list <archive>To find which archive holds a file and which copy wins (sf-mod-check 0.27.0 and later), the agent uses ba2 find, which searches every loaded archive and loose folder in the game's order:
sf-mod-check ba2 find "textures\mymod\*"sf-cut-check scan --plugin MyMod.esmsf-cut-check why <FormID:Plugin.esm or EditorID>starfieldvt-export voices --out <folder> --plugin Starfield.esm --search "text" --listFor a scripted voice export, the agent uses starfieldvt-export, not the window, and runs --list first. StarfieldVoiceTool only browses and exports existing lines. To make the voice and lip files of new lines from your WAVs, the agent uses sf-mod-build's voice step, as Build a quest mod with an agent describes.
What you check
ba2 findwinners. The copy marked<- winsis the one the game uses only if the INIs allow it. When the output has anote:line about loose files and archives, ask the agent to repeat it. A plugin that didn't load has its archives left out, so ask whether any load-order problem was listed.found: false. If a lookup says a name isn't found, the agent must not use it unless it can read the script that defines it.checkexit codes. Exit 0 means no errors (warnings are allowed), and exit 1 means at least one error. With--creations,Debug.Trace,Debug.NotificationandDebug.MessageBoxare warnings and other DebugOnly calls are errors, so the agent doesn't need--allowfor the usual debug-switch pattern.[name only]findings. Chained calls are matched by name only, so they are less certain.- The compiler. sf-papyrus-ref isn't a compiler. The Papyrus compiler is the final judge, so look at the compile result.
- Orphaned and Unreferenced. Treat them as "nothing in the plugins uses it". Scripts aren't read, so a record a script fetches can look unused.
- Exit codes and the output words (
same,DIFFERENT,ONLY IN,UNREADABLE) from sf-pex-tools.
What stays your decision
- Whether a function is right for your mod. The lookup says it exists, not that it fits.
- Whether to delete a record sf-cut-check flags.
- Which voice lines to export, and whether you may share them. Exported audio is the game's or the mod's content.
- Sharing anything at all from the game's scripts or archives. The answer is no.
For CK and xEdit authors
The agent can look names up while you write scripts in the CK, run check on your scripts, and compare compiled scripts. It can't write records in the CK for you.
For code builders
The agent can write against BuildKit, including its quest helpers (since version 0.6.0, see Build a quest mod with an agent), and look up every Papyrus name first. BuildKit's README says to run IdLock.Apply before Quests.Fragments, and since version 0.6.3 a missing extra folder given to GameData throws. Ask it to run sf-papyrus-ref check and sf-cut-check scan --plugin on each build, and to keep the Mutagen 0.54.4 pin.
Never let an agent share the sf-papyrus-ref html site, its local cache or extracted game files, because they hold Bethesda's content. Don't put them in a repository, a release or a message.
Read the guardrails before you let an agent act on your files.