钢铁雄心4模组工具扩展版
All-in-one preview tools for HOI4 mod developers — Focus Tree · Technology Tree · Event Tree · World Map · MIO · GUI · GFX · DDS/TGA
[!IMPORTANT] The main difference between this project and HOI4 Mod Utilities / HOI4 Utilities 2026 is the graphical editing support added to the preview features.
Features
| Preview | Description |
|---|---|
| World map | Preview with provinces, strategic regions and supply areas |
| Focus tree | Preview with conditions, shared focuses, joint focus trees and custom titlebars |
| Technology tree | Preview |
| Event tree | Preview |
| MIO | Military Industrial Organization preview |
| GUI | Preview |
| GFX | Preview .gfx sprite definitions (all HOI4 sprites are defined here) |
| Images | Preview .dds / .tga files |
Getting Started
- Install and enable this extension in VSCode.
- Set the Heart of Iron IV install path (either way):
- (Recommended) Open the command palette with
Ctrl+Shift+Pand use the commandSelect HOI4 install pathto browse the folder that installed Heart of Iron IV; - Or set
mdHoi4Utilities.installPathin the settings page (Ctrl+,).
- (Recommended) Open the command palette with
- Open your mod development folder.
- (Optional) Open the command palette with
Ctrl+Shift+Pand use the commandSelect mod fileto set the working mod descriptor (the.modfile). - Use these entries:
- Command palette (
Ctrl+Shift+P) commands:Preview World Map/Preview HOI4 file; - The
Preview HOI4 filebutton on the top-right toolbar of the text editor; - Open a
.ddsor.tgafile directly.
- Command palette (
Extension Settings
| Setting | Type | Description |
|---|---|---|
mdHoi4Utilities.installPath |
string |
Heart of Iron IV install path. Without this, most features are broken. |
mdHoi4Utilities.loadDlcContents |
boolean |
Whether to load DLC images when previewing files (all DLCs are around 600MB; enabling this uses more memory). |
mdHoi4Utilities.modFile |
string |
Path to the working .mod file, used to read replace_path. If not specified, uses the first .mod file in the first folder of the workspace. |
mdHoi4Utilities.enableSupplyArea |
boolean |
Check this to enable supply areas when developing mods for HOI4 1.10 or below. |
mdHoi4Utilities.previewLocalisation |
enum |
Language of the content shown in the event tree preview. |
Known Issues
- The focus tree GUI cannot be configured like the technology tree.
- Edge lines on the world map do not always fit the edges of the colors.
- The event tree preview will duplicate an event when it is reachable from different options.
Credits
This project evolved from the following projects, and we thank all previous contributors:
- Original extension repository: herbix/hoi4modutilities — the earliest HOI4 mod tooling.
- Base extension repository: MillenniumDawn/MD-VSCode-Utility-Tool — this repositoryis forked from it.
- Special thanks to AngriestBird for helping this project.
Contribute
If you have any suggestions or issues, feel free to open an issue or a PR on the Github repository.