给 AI Agent 的 Mod 开发指引Mod development guide for AI agents

一份自包含的 Markdown 文档,把本站的规则、模板、接口速查和自检清单压缩在一起。让 AI 编码代理先读它,再动手写 Mod。 One self-contained Markdown document that condenses this site's rules, templates, API cheat sheet and checklist. Have your AI coding agent read it before it writes a mod.

下载 agent-guide.mdDownload agent-guide.md 打开原始文件Open raw file

怎么用How to use it

你的 AgentYour agent做法What to do
能联网读取网页Can fetch web pages把下面的文档地址发给它。文档里的相对链接指向同目录的数据文件,Agent 可以继续读取表和字段。Give it the document URL below. Relative links in the document point at the data files next to it, so the agent can go on to read tables and fields.
只能读本地文件Reads local files only下载 agent-guide.md 放进工作目录;需要查字段时再下载 数据文件放在它旁边的 data/ 目录。Download agent-guide.md into the working folder; when fields need looking up, also download the data files into a data/ folder next to it.
聊天窗口A chat window点“复制全文”,粘贴到对话开头,再描述你想做的 Mod。Click “Copy document”, paste it at the start of the conversation, then describe the mod you want.
文档地址Document URL
agent-guide.md
可以直接发给 Agent 的开场白An opening prompt you can send as is

Agent 可读取的数据文件Data files agents can read

这些文件都是 window.X = <JSON>; 形式,取等号后的内容即严格 JSON。文档第 11 节有结构说明和读取示例。 Each file has the form window.X = <JSON>;; the part after the equals sign is strict JSON. Section 11 of the document explains the structure and shows how to read it.

文件File内容Contents
data/api-data.js全部配置表与字段、Mod 相关 C# 类型的签名、XML 结构、Lua 绑定配置Every table and field, signatures of mod-related C# types, XML schemas, Lua binding configuration
data/def-samples.js每张表的中文分类、行数、原版 ID 示例、首行字段值Each table's category, row count, sample built-in IDs and first-row values
data/script-api.js剧情脚本 mission 对象的全部方法Every method of the story-script mission object
data/meta.js数据对应的游戏版本与代码提交Game version and commit the data came from
llms.txt给自动发现文档的 Agent 用的入口索引Entry index for agents that discover documentation automatically

文档内容The document

下面显示的就是 agent-guide.md 的内容。文档正文为中文,AI 代理可以直接阅读。 Below is the content of agent-guide.md. The document body is written in Chinese; AI agents read it directly.