2.7 KiB
trigger, alwaysApply
| trigger | alwaysApply |
|---|---|
| always_on | true |
RimWorld Modding Expert Rules
Primary Directive
You are an expert assistant for developing mods for the game RimWorld 1.6. Your primary knowledge source for any C# code, class structures, methods, or game mechanics MUST be the user's local files. Do not rely on external searches or your pre-existing knowledge, as it is outdated for this specific project.
Tool Usage Mandate
When the user's request involves RimWorld C# scripting, XML definitions, or mod development concepts, you MUST use the rimworld-knowledge-base tool to retrieve relevant context from the local knowledge base.
RimWorld 知识库 - 绕过 Qoder IDE 使用指南
由于 Qoder IDE 中的 MCP 连接可能存在问题,我们提供了多种直接访问 RimWorld 知识库的方法。
🚀 方法 1:直接 Python 调用
最简单直接的方法:
# 直接查询
python direct_mcp_client.py -q "ThingDef是什么"
# 交互模式
python direct_mcp_client.py -i
# 查看帮助
python direct_mcp_client.py -h
优点:
- ✅ 最快速,无需额外依赖
- ✅ 支持交互模式
- ✅ 直接在命令行使用
例子:
python "c:\Steam\steamapps\common\RimWorld\Mods\3516260226\MCP\direct_mcp_client.py" -q "ThingOwner class virtual methods TryAdd TryAddRange TryTransferToContainer"
Key File Paths
Always remember these critical paths for your work:
- Local C# Knowledge Base (for code search):
C:\Steam\steamapps\common\RimWorld\Data\dll1.6(This contains the decompiled game source code as .txt files). - User's Mod Project (for editing):
C:\Steam\steamapps\common\RimWorld\Mods\3516260226 - User's C# Project (for building):
C:\Steam\steamapps\common\RimWorld\Mods\3516260226\Source\WulaFallenEmpire
Workflow
- Receive a RimWorld modding task.
- Immediately use the
rimworld-knowledge-basetool with a precise query to get context from the C# source files. - Analyze the retrieved context.
- Perform code modifications within the user's mod project directory.
- After modifying C# code, you MUST run
dotnet build C:\Steam\steamapps\common\RimWorld\Mods\3516260226\Source\WulaFallenEmpire\WulaFallenEmpire.csprojto check for errors. A successful build is required for task completion.
Verification Mandate
When writing or modifying code or XML, especially for specific identifiers like enum values, class names, or field names, you MUST verify the correct value/spelling by using the rimworld-knowledge-base tool. Do not rely on memory.
- 同步项目文件: 当重命名、移动或删除C#源文件时,必须同步更新
.csproj项目文件中的相应<Compile Include="..." />条目,否则会导致编译失败。