SE Block Swap KIT — Dev Blog
From Frustration to Automation: Building a Blueprint Tool for Space Engineers
The Problem That Started It All
If you've ever built a warship in Space Engineers, you know the pain. You spend hours perfecting the hull of your latest battle cruiser, carefully placing hundreds of armor blocks to get that perfect silhouette. Then you realize: this thing is made of light armor.
Time to upgrade to heavy armor for combat. Block by block. One at a time. For the next two hours.
There had to be a better way.
Week 1: Proof of Concept
The first step was understanding how Space Engineers stores blueprints. Turns out, they're just XML files—specifically bp.sbc files tucked away in your blueprint folders. Each block is defined with a SubtypeName that identifies exactly what it is.
Light armor block? LargeBlockArmorBlock
Heavy armor block? LargeHeavyBlockArmorBlock
The pattern was clear. A simple find-and-replace wouldn't cut it (too many edge cases), but a proper XML parser could surgically swap these values while preserving everything else—positions, orientations, colors, ownership data.
The first prototype was 50 lines of Python. It worked on a test blueprint. I immediately broke my favorite ship with it.
Back to the drawing board.
Week 2: The Devil in the Details
Turns out Space Engineers has a lot of armor block variants:
- Standard cubes
- Slopes (multiple angles)
- Corners and inverted corners
- Round armor pieces
- Half blocks
- Armor panels
- 2x1 slopes with base and tip variants
Each one has a light and heavy version. Each one has large grid and small grid variants. The mapping table grew to 60+ entries.
I also discovered the game uses both SubtypeName and SubtypeId tags inconsistently. Some blueprints have one, some have both, some have neither for certain blocks. The parser needed to handle all cases without breaking modded blocks that might share similar naming patterns.
Lesson learned: Always check for edge cases in user-generated content.
Week 3: Safety First
Nothing ruins your day like corrupting a blueprint you spent 40 hours building. Automatic backups became non-negotiable.
But there was another gotcha: binary cache files.
Space Engineers caches blueprint data in .sbcB5 files. If this file exists, the game loads it instead of the XML file you just modified. Your changes appear to do nothing.
The tool now automatically detects and removes these cache files after processing. One less "why isn't it working?" moment for users.
Week 4: Bidirectional Conversion
The original goal was light-to-heavy conversion. But users in testing immediately asked: "Can it go the other way?"
Makes sense. Sometimes you want a lightweight exploration variant of your combat ship. Sometimes you downloaded a blueprint that's too heavy for your server's PCU limits.
Week 5: User Experience Polish
Command-line tools are powerful, but not everyone lives in a terminal. The standalone GUI came together using Python's built-in tkinter—no external dependencies, no installation headaches.
Key UX decisions:
- Drag-and-drop support: Just drop your bp.sbc file onto the window
- Clear status feedback: Users see exactly how many blocks were scanned and replaced
- Conversion direction toggle: One click to switch between light→heavy and heavy→light
- Backup checkbox: Enabled by default, but power users can disable it
The goal was simple: if you can use Space Engineers, you can use this tool.
Week 6: Building the Executable
Python is great for development, but asking users to install Python and run scripts from command line? That's a support nightmare waiting to happen.
PyInstaller packages everything into a single .exe file. No Python installation required. No dependencies to manage. Download, double-click, done.
The build process is now a single batch file. CI/CD might come later, but for now, simplicity wins.
Technical Decisions & Trade-offs
Why Python?
- Cross-platform potential (even though we're targeting Windows primarily)
- Excellent XML parsing in the standard library
- Rapid iteration during development
- Easy to package as standalone executable
Why not regex for XML parsing?
- XML structure can vary (attribute order, whitespace, nested elements)
- Regex fails catastrophically on edge cases
ElementTreepreserves document structure we don't want to touch
Why no external dependencies?
- Simpler distribution
- No version conflicts
- Users don't need pip or virtual environments
- The standard library has everything we need
What's Next?
The core functionality is solid. Future possibilities:
- Batch processing UI: Select a folder, convert all blueprints at once
- Block filtering: Convert only specific block types
- Preview mode: Show what would change without modifying anything
- Integration with SE Toolbox: If there's community interest
Final Thoughts
This started as a weekend project to solve my own problem. It turned into a proper tool because the Space Engineers community has the same frustrations I did.
The best tools are born from necessity. If you've ever sat there manually replacing armor blocks one by one, wondering if there's a better way—now there is.
Stop clicking. Start commanding.
— xXMSGXx December 2025
Leave a comment
Log in with itch.io to leave a comment.