HOI4 Mod Utilities
中文说明
This extension add tools for Heart of Iron IV modding. Some of the tools may work on other Paradox games.
[!NOTE]
This repository is a mirror and maintenance fork of the original project hoi4modutilities. Its goal is not to rewrite the extension, but to keep this lightweight HOI4 modding utility usable for current game versions after the original project stopped being actively maintained.
Project stance
The original author wrote:
I'm disappointed by Paradox because of the Silk Road thing. I'll pause this project until they fix it.
The "Silk Road thing" refers to Paradox's handling of Silk Road-related historical framing in HOI4 content. A related focus was once named "Expand the Silk Road", presenting Timurid expansion, expansion into Central Asia and surrounding regions, and a railway from Urumqi to Herat as an "expansion" of the Silk Road. Later naming changes moved the wording closer to a Timurid framing, but did not fully address the underlying historical-context problem.
This mirror preserves the original author's concern. The Silk Road was a complex trans-Eurasian network of trade and cultural exchange routes, and should not be reduced to a convenient label for an unrelated regional narrative. HOI4 can contain alternate history and gameplay abstraction, but real historical concepts should still be handled with basic respect for historical context, source awareness, and factual grounding.
The maintenance work in this repository focuses on the tool itself: keeping focus tree, technology tree, map, event, GUI, GFX, and texture previews usable for current HOI4 versions and common mod development workflows.
Features
- World map preview
- Focus tree preview
- Event tree preview
- Technology tree preview
- Military industrial organization (MIO) preview.
- GUI preview
.gfx file preview (sprites used by HOI4 are defined here)
.dds, .tga file preview (images files used by HOI4)
For feature details and user manual, please refer to HOI4 Mod Utilities Wiki.
Steps to start
- Install and enable this extension in VSCode.
- Set Heart of Iron IV install path. You can:
- (Since v0.7.0, or on vscode web) Open command palette using
Ctrl+Shift+P. Use command Select HOI4 install path to browse the folder that installed Heart of Iron IV.
- Update setting
hoi4ModUtilities.installPath (you can open settings page of VSCode using Ctrl+,) to the folder that installed Heart of Iron IV.
- Open your mod develop folder.
- (Optional) Open command palette using
Ctrl+Shift+P. Use command Select mod file to set working mod descriptor (the .mod file).
- Use these entries:
- Command palette (
Ctrl+Shift+P) commands: Preview World Map and Preview HOI4 file*.
Preview HOI4 file (
)* button on right-top tool bar of text editor.
- Open a
.dds or .tga file.
* Preview HOI4 file (
) button/command is invisible, except on .gfx, map/default.map, technology tree or national focus tree files.
Demos
World map preview

Focus tree preview

Event tree preview

Technology tree preview

GUI Preview

Extension Settings
| Setting |
Type |
Description |
hoi4ModUtilities.installPath |
string |
Hearts of Iron IV install path. Without this, most features are broken. |
hoi4ModUtilities.loadDlcContents |
boolean |
Whether to load DLC images when previewing files. Enabling this will use more memory (All DLCs are around 600MB). |
hoi4ModUtilities.modFile |
string |
Path to the working .mod file. This file is used to read replace_path. If not specified, will use first .mod file in first folder of the workspace. |
hoi4ModUtilities.enableSupplyArea |
boolean |
If you are developing mod for HOI4(version<=1.10). Use this to check enable supply area. |
hoi4ModUtilities.previewLocalisation |
enum |
Language of content in event tree preview. |
hoi4ModUtilities.featureFlags |
array of string |
Feature flags are used to disable or enable features. Reloading is required after changing this. Please refer to Wiki on Github for details. |
Known Issues
- GUI of focus tree can't be configured like technology tree.
- Edge lines on world map not alway fit edge of colors.
- Event tree preview will duplicate events even they are same event if they are from different option.
Release Notes - [0.12.2]
Fixed
Contribute
If you have any suggestion, feel free to create issue on this Github repo.
If you want to contribute translation, feel free to create pull request to this Github repo. All localization related files are under i18n folder.
Thanks to all contributors listed here.