MD MIO Studio
Version 1.0 — Visual MIO development for Hearts of Iron IV: Millennium Dawn
MD MIO Studio is a VS Code extension developed by pouyanprz, a member of the Millennium Dawn development team, for editing existing Military Industrial Organizations (MIOs). Design trait trees visually while keeping the original game script and localization under your control.
Features
| Feature |
What you can do |
| Visual Tree Designer |
Drag traits on a grid, zoom, pan, fit, search and select traits. |
| Two-way synchronization |
Work with the visual tree and source editor; reveal the corresponding trait in code. |
| Trait Inspector |
Edit local trait properties, supported modifiers, names and icons. |
| Dependencies |
Create and edit All Parent, Any Parent and Mutual Exclusive links; choose Classic or Smart routing. |
| Multi-selection |
Move, align, space, delete and copy multiple local traits; paste with unique tokens and grid-snapped placement. |
| Equipment Scope |
Browse source-indexed equipment, archetypes, categories and groups; edit organization and trait restrictions with compatibility checks. |
| Localization and headings |
Edit English display names and headings while preserving existing localization keys and unrelated text. |
| Raw Code Editor |
Edit supported local trait script with syntax highlighting, search, validation and Draft staging. |
| Draft and Review |
Stage changes, review diffs, undo or redo, apply or discard; save through VS Code. |
| Diagnostics |
Inspect structural issues, dependency problems, equipment scope and indexed identifiers; audit the indexed workspace without writing files. |
| Source Scanner |
Detect the MD root from the organization path, index local definitions and artwork, and reuse persistent catalogue caches. |
Installation and first use
1. Install the requirements
- Visual Studio Code 1.90 or later — Download VS Code.
- Python 3.10 or later — Download Python. On Windows, select Add python.exe to PATH if offered by the installer, then restart VS Code.
- Millennium Dawn — have a local copy of the mod files available.
In VS Code, open Terminal → New Terminal and check that Python works:
python --version
Install Pillow to enable DDS/TGA icon previews:
python -m pip install Pillow
If your system uses python3 instead of python, use python3 in both commands and set mdMioStudio.pythonPath to python3 in VS Code Settings. Use the same Python executable for Pillow and the extension.
2. Install MD MIO Studio
Open Extensions in VS Code and search for MD MIO Studio to install it from the Marketplace once available. Alternatively, select Extensions → … → Install from VSIX and choose the provided .vsix file.
3. Open and edit an MIO
- Select File → Open Folder and open your local Millennium Dawn source folder. If VS Code asks whether you trust the folder, confirm only if you trust its contents.
- Open an existing MIO
.txt file in common/military_industrial_organization/organizations/.
- Open the Command Palette (
Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS), then select MD MIO Studio: Open Current File as Tree or MD MIO Studio: Open Tree to Side.
- Edit the tree, review your changes, select Apply All, then Save All in VS Code.
Back up or commit your mod files before editing.
Advanced Settings (Optional)
MD MIO Studio automatically detects the Millennium Dawn source folder. If necessary, open VS Code Settings and search for MD MIO Studio to configure:
| Setting |
Purpose |
mdMioStudio.sourceRoot |
Manually select the Millennium Dawn source folder. |
mdMioStudio.pythonPath |
Specify a different Python executable. |
mdMioStudio.gameRoot |
Specify the HOI4 installation folder for base-game icon textures. |
Use Rescan to refresh the catalogue after changing source files externally.
Editing safeguards and limitations
- Existing inherited traits are read-only in the visual editor. Complex includes and overrides may require manual source editing.
- Static diagnostics do not simulate HOI4 runtime behavior or provide a complete registry of every valid modifier, trigger or effect. Verify changes in the game.
- MIO Settings, Create New MIO, Trait Logic, Game Preview, graphical N-of-M editing, Trait Description and Smart Modifier Suggestions are on hold. Existing script remains editable through the appropriate raw or native source editor.
- Unstaged raw input is session-local. Stage or reset it before closing. Drafts are not source-file saves.
- No game assets or MD source archives are redistributed with the extension.
Credits
Developed by pouyanprz, Millennium Dawn development team member, for the Millennium Dawn modding community.
Free to use under the included software license. Hearts of Iron IV and Millennium Dawn names and assets remain the property of their respective owners.