se-dev-game-code
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSE Dev Game Code Skill
SE 开发游戏代码 Skill
Allows reading the decompiled C# code of Space Engineers version 1.
⚠️ CRITICAL: Commands run in a UNIX shell (busybox), NOT Windows CMD. Use bash syntax!
Examples:
- ✅
test -f file.txt && echo exists - ✅
ls -la | head -10 - ❌ - This will NOT work
if exist file.txt (echo exists)
Actions:
- prepare: Run the one-time preparation (Prepare.bat)
- bash: Run UNIX shell commands via busybox
- search: Run code searches using
search_code.py - test: Test this skill by running
test_search.bat
允许查看《太空工程师》版本1的反编译C#代码。
⚠️ 重要提示:命令在UNIX shell(busybox)中运行,而非Windows CMD。请使用bash语法!
Examples:
- ✅
test -f file.txt && echo exists - ✅
ls -la | head -10 - ❌ - 此命令无法运行
if exist file.txt (echo exists)
操作:
- prepare: 执行一次性准备操作(Prepare.bat)
- bash: 通过busybox执行UNIX shell命令
- search: 使用执行代码搜索
search_code.py - test: 通过运行测试该Skill
test_search.bat
Routing Decision
路由规则
Check these patterns in order - first match wins:
| Priority | Pattern | Example | Route |
|---|---|---|---|
| 1 | Empty or bare invocation | | Show this help |
| 2 | Prepare keywords | | prepare |
| 3 | Bash/shell keywords | | bash |
| 4 | Search keywords | | search |
| 5 | Test keywords | | test |
按顺序检查以下匹配规则 - 匹配到第一条即生效:
| 优先级 | 匹配模式 | 示例 | 路由目标 |
|---|---|---|---|
| 1 | 空调用或仅调用命令名 | | 显示本帮助文档 |
| 2 | 包含Prepare相关关键词 | | prepare |
| 3 | 包含Bash/Shell相关关键词 | | bash |
| 4 | 包含Search相关关键词 | | search |
| 5 | 包含Test相关关键词 | | test |
Getting Started
快速开始
⚠️ CRITICAL: Before running ANY commands, read CommandExecution.md to avoid common mistakes that cause command failures.
If the file is missing in this folder, you MUST run the one-time preparation steps first. See the prepare action.
Prepare.DONE⚠️ 重要提示:在执行任何命令前,请阅读CommandExecution.md,以避免导致命令执行失败的常见错误。
如果本文件夹中缺少文件,你必须先执行一次性准备步骤。请查看prepare操作。
Prepare.DONEEssential Documentation
核心文档
- CommandExecution.md - ⚠️ READ THIS FIRST - How to run commands correctly on Windows
- CommandExecution.md - ⚠️ 请首先阅读 - 如何在Windows上正确执行命令
Code Search Documentation
代码搜索文档
- QuickStart.md - More examples and quick reference
- CodeSearch.md - Complete guide to searching classes, methods, fields, etc.
- HierarchySearch.md - Finding class/interface inheritance and implementations
- Advanced.md - Power user techniques for complex searches
- Troubleshooting.md - What to do when searches return NO-MATCHES or too many results
- Implementation.md - Technical details for skill contributors (optional)
- QuickStart.md - 更多示例与快速参考
- CodeSearch.md - 搜索类、方法、字段等的完整指南
- HierarchySearch.md - 查找类/接口的继承与实现关系
- Advanced.md - 高级用户的复杂搜索技巧
- Troubleshooting.md - 当搜索无结果或结果过多时的解决方法
- Implementation.md - 供Skill贡献者参考的技术细节(可选)
Quick Search Examples
快速搜索示例
bash
undefinedbash
undefinedFind class declarations
Find class declarations
uv run search_code.py class declaration MyCubeBlock
uv run search_code.py class declaration MyCubeBlock
Find method signatures
Find method signatures
uv run search_code.py method signature UpdateBeforeSimulation
uv run search_code.py method signature UpdateBeforeSimulation
Find class hierarchy
Find class hierarchy
uv run search_code.py class children MyTerminalBlock
uv run search_code.py class children MyTerminalBlock
Count results before viewing (useful for large result sets)
Count results before viewing (useful for large result sets)
uv run search_code.py class usage MyEntity --count
uv run search_code.py class usage MyEntity --count
Limit number of results
Limit number of results
uv run search_code.py class usage MyEntity --limit 50
uv run search_code.py class usage MyEntity --limit 50
Paginate through results
Paginate through results
uv run search_code.py class usage MyEntity --limit 100 --offset 0
uv run search_code.py class usage MyEntity --limit 100 --offset 100
Always check the game code when:
- You're unsure about the game's internal APIs and how to interface with them.
- The inner workings of Space Engineers is unclear.uv run search_code.py class usage MyEntity --limit 100 --offset 0
uv run search_code.py class usage MyEntity --limit 100 --offset 100
建议在以下情况时查看游戏代码:
- 你对游戏的内部API及其调用方式不确定时
- 不清楚《太空工程师》的内部运行机制时Custom Scripting
自定义脚本
For building your own utility scripts to work with the indexes and decompiled code:
- ScriptingGuide.md - How to write Python scripts, use BusyBox, handle Windows paths
若要构建用于处理索引与反编译代码的自定义工具脚本:
- ScriptingGuide.md - 如何编写Python脚本、使用BusyBox、处理Windows路径
Game Content Data
游戏内容数据
The textual part of the game's is copied into the folder for free text search:
ContentContent- Language translations, including the string IDs
- Block and other entity definitions
- Default blueprints and scenarios
- See ContentTypes.md for the full list of content types
游戏中的文本部分已复制到文件夹中,支持全文搜索:
ContentContent- 语言翻译内容,包括字符串ID
- 方块及其他实体定义
- 默认蓝图与场景
- 完整的内容类型列表请查看ContentTypes.md
General Rules
通用规则
- In the folder search only inside the C# source files (.cs) in general. If you work on transpiler or preloader patches, then also search in the IL code (.il) files.
Decompiled - In the folder search the files appropriate for the task. See ContentTypes.md for the list of types.
Content - Do not search for decompiled game code outside the folder which is at the same level as this skill file. The decompiled game source tree must be there if the preparation succeeded.
Decompiled - Do not search for game content data outside the folder which is at the same level as this skill file. The copied game content must be there if the preparation succeeded.
Content
- 通常情况下,仅在文件夹内的C#源文件(.cs)中搜索。如果你处理转译器或预加载器补丁,也可在IL代码文件(.il)中搜索。
Decompiled - 在文件夹中搜索与任务对应的文件。内容类型列表请查看ContentTypes.md。
Content - 请勿在本Skill文件同级目录的文件夹之外搜索反编译游戏代码。若准备操作成功,反编译的游戏源码树必须位于该文件夹中。
Decompiled - 请勿在本Skill文件同级目录的文件夹之外搜索游戏内容数据。若准备操作成功,复制的游戏内容必须位于该文件夹中。
Content
Action References
操作参考
Follow the detailed instructions in:
- prepare action - One-time preparation
- bash action - Running UNIX shell commands via busybox
- search action - Running code searches
- test action - Testing this skill
请参考以下详细说明:
- prepare 操作 - 一次性准备操作
- bash 操作 - 通过busybox执行UNIX shell命令
- search 操作 - 执行代码搜索
- test 操作 - 测试本Skill