se-dev-server-code
Original:🇺🇸 English
Translated
15 scripts
Allows reading the decompiled C# code of the Space Engineers Dedicated Server
10installs
Added on
NPX Install
npx skill4agent add viktor-ferenczi/se-dev-skills se-dev-server-codeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →SE Dev Server Code Skill
Allows reading the decompiled C# code of the Space Engineers Dedicated Server. The "game logic" of the server is largely the same as the game (client) is running. The entry point (main executable), some aspects of logging and configuration differ. Also, some of the libraries are not used by the server, but they may still present to provide the necessary data structures and some backend functionality.
⚠️ CRITICAL: Commands run in a UNIX shell. Use bash syntax. On Windows this is BusyBox; on Linux use the native shell.
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 (on Windows,
Prepare.baton Linux)prepare.sh - bash: Run UNIX shell commands via busybox
- search: Run code searches using
search_server_code.py - test: Test this skill by running
test_search_server_code.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 |
Requirements
The host system must have the following on :
PATH- Python 3.11 or newer
- git command line client (used to version each decompiled server build)
- dotnet SDK (for installing )
ilspycmd
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.DONEIf server auto-detection fails, set before running the preparation script. It may point to either the dedicated server root or directly to the directory.
SE_SERVER_ROOTDedicatedServer64Folder Layout
After preparation the skill folder contains a junction/symlink. The actual data lives outside the skill folder so that it is preserved across / / cycles.
DataClean.batPrepare.batprepare.shskills/se-dev-server-code/
├── Data/ (junction/symlink → per-user persistent server-code data)
│ ├── .git/ local Git repository tracking decompiled sources
│ ├── .gitignore ignores CodeIndex/, Content/, __pycache__, *.py[cod], *.bak, *.log
│ ├── game_version.txt recorded SE_VERSION / CLIENT_BUILD_NUMBER / SERVER_BUILD_NUMBER
│ ├── Decompiled/ decompiled C# sources, organised per assembly (committed)
│ ├── Content/ textual server content (NOT committed - regenerated)
│ └── CodeIndex/ CSV indexes (NOT committed - regenerated)
├── Bin64/ (junction/symlink → server's DedicatedServer64, removed after preparation)
└── ... skill scripts and documentationThe folder is a junction/symlink to the per-user persistent server-code data directory ( on Windows, on Linux). Treat , and exactly as before.
Data%USERPROFILE%\.se-dev\server-code~/.se-dev/server-codeData/DecompiledData/ContentData/CodeIndexLocal Versioning of Decompiled Sources
The folder is a local Git repository. Every successful preparation creates a commit of the decompiled C# sources whose message is the server's version label, e.g. .
Data1.208.015 b4This means:
- All previously decompiled server versions are preserved in the local Git history. You can any past commit inside
git checkoutto inspect or diff against an older build.Data/ - Server updates are detected automatically by comparing the binaries' embedded version constants with . If they differ (or the file is missing),
Data/game_version.txt,Decompiled/andContent/are wiped and a fresh decompilation runs.CodeIndex/ - This makes it easy to update plugins, mods and scripts for compatibility with new server releases: diff the relevant source between two commits inside to see exactly what changed.
Data/
The repository uses an internal author/email () so commits work even on machines without a configured global Git identity.
se-dev-skills@localhostEssential Documentation
- CommandExecution.md - ⚠️ READ THIS FIRST - Windows command execution details; on Linux keep bash syntax and use
prepare.sh
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)
Quick Search Examples
bash
# Find class declarations
uv run search_server_code.py class declaration MyCubeBlock
# Find method signatures
uv run search_server_code.py method signature UpdateBeforeSimulation
# Find class hierarchy
uv run search_server_code.py class children MyTerminalBlock
# Count results before viewing (useful for large result sets)
uv run search_server_code.py class usage MyEntity --count
# Limit number of results
uv run search_server_code.py class usage MyEntity --limit 10
# Paginate through results
uv run search_server_code.py class usage MyEntity --limit 10 --offset 0
uv run search_server_code.py class usage MyEntity --limit 10 --offset 20Always check the server code when:
- You're unsure about the server's internal APIs and how to interface with them.
- The inner workings of the Space Engineers Dedicated Server is unclear.
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
Server Content Data
The textual part of the server's is copied into the folder for free text search:
ContentData/Content- 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
Content Index
Data/CodeIndex/content_index.csvrel_pathData/Content/usageData/Decompiled/rel_pathusageRunning the Dedicated Server
The server executable is in the folder.
SpaceEngineersDedicated.exeDedicatedServer64Headless Mode (No UI)
SpaceEngineersDedicated.exe -consoleThis bypasses the Telerik WinForms configuration UI and runs the server directly.
Configuration
The server is configured via XML files. The primary configuration file is located in the server's AppData directory (typically ).
SpaceEngineers-Dedicated.cfg%APPDATA%\SpaceEngineersDedicated\Key configuration areas:
- Server settings (name, world, mods, max players)
- World settings (game mode, inventory size, welding speed)
- Network settings (port, public/private)
Configuration should be done by editing the XML files directly or with utility Python scripts. See below for planned utilities.
Planned Utility Scripts (Not Yet Implemented)
- config_editor.py — Read and modify values from the command line (e.g. set server name, max players, world name)
SpaceEngineers-Dedicated.cfg - world_manager.py — List, backup, and manage saved worlds in the server data directory
- mod_manager.py — List and validate mods referenced in the configuration
Server-Only Assemblies
| Assembly | Description |
|---|---|
| Server entry point (replaces |
| Dedicated server framework, lifecycle, and configuration |
| Remote client support (RCON-like functionality) |
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.
Data/Decompiled - In the folder search the files appropriate for the task. See ContentTypes.md for the list of types.
Data/Content - Do not search for decompiled server code outside the folder. The decompiled server source tree must be there if the preparation succeeded.
Data/Decompiled - Do not search for server content data outside the folder. The copied server content must be there if the preparation succeeded.
Data/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
Remarks
The original source of this skill: https://github.com/viktor-ferenczi/se-dev-skills