A new Visual Studio Code extension for Hearts of Iron IV mod development, focused on ease of use, orchestration, and assisting the mod community and mod teams with a modern HOI4 modding toolset with multiple functions and uses.
A comprehensive Visual Studio Code extension for Hearts of Iron IV mod development. This extension provides a complete suite of visual editors, analyzers, and productivity tools for creating professional HOI4 mods.
- Installation
- Quick Start
- Visual Editors
- Analysis Tools
- Content Browsers
- Graphics Tools
- Localization Tools
- Development Tools
- Search and Navigation
- Keyboard Shortcuts
- Configuration
- Troubleshooting
- Contributing
- Download the latest
.vsixfile from Releases - Open VS Code
- Press
Ctrl+Shift+Pand type Install from VSIX - Select the downloaded file
- Reload VS Code when prompted
- Open your mod folder in VS Code (File > Open Folder)
- Look for the Shield icon in the Activity Bar (left sidebar)
- Click it to reveal all tools organized by category
- Start with Welcome / Help for an interactive guide
Command: HOI4: Focus Tree Editor
A full visual editor for creating and modifying national focus trees with drag-and-drop functionality.
- Click Focus Tree Editor in the sidebar, or
- Press
Ctrl+Shift+Pand type "Focus Tree Editor"
- Left Sidebar: List of all focus trees in your mod
- Center Canvas: Visual focus tree with draggable nodes
- Right Panel: Property editor for selected focus
- Click the + New Tree button
- Enter country tag (e.g.,
GER,ENG) - Enter tree name
- Click Create
- Click Add Focus in toolbar, or
- Right-click on canvas and select "Add Focus Here", or
- Press A key to add at center
- Click a focus node to select it
- Edit properties in right panel:
- Focus ID: Internal identifier
- Name/Description: Click to edit localization
- Icon: GFX sprite name (with preview)
- X/Y Position: Grid coordinates
- Cost: Days to complete
- Prerequisites: Required focuses (AND groups, OR within groups)
- Mutually Exclusive: Blocking focuses
- Available/Bypass: Trigger conditions
- Completion Reward: Effects on completion
- AI Will Do: AI weighting
- Drag and drop focus nodes to reposition
- Position snaps to grid automatically
- Connections update in real-time
- Click Link Prerequisites button or press P
- Click the parent focus first
- Click the child focus
- Repeat for more connections
- Press Escape to exit link mode
For OR prerequisites (any one required), add multiple focuses to the same prerequisite group using the dropdown in the editor.
- Click Link Exclusives button or press M
- Click first focus
- Click second focus
- Both focuses will block each other
| Key | Action |
|---|---|
| A | Add focus at center |
| P | Toggle prerequisite linking mode |
| M | Toggle exclusive linking mode |
| Delete | Delete selected focus |
| Escape | Cancel current operation |
- Focus positions use HOI4's grid system (each unit = 1 column/row)
- Focuses with
relative_position_idshow calculated absolute positions - Double-click a focus to quickly edit its name
- Use the zoom controls for large trees
Command: HOI4: Decision Editor
Visual editor for creating and managing decisions with full support for all decision types.
- Standard Decisions: Instant effect on activation
- Timed Decisions: Effect after countdown
- Timed Missions: AI-triggered with timeout
- Selectable Missions: Player-chosen missions
- Left Sidebar: File browser and decision list
- Center Panel: Decision list with categories
- Right Panel: Full property editor
- Click Templates button
- Choose a template:
- War Goal Decision
- Political Action
- Timed Mission
- Economic Decision
- State Action
- Faction Interaction
- Select target category
- Click "Create from Template"
- Click + Add button
- Select decision type
- Select category
- Edit properties in right panel
Select a decision to edit:
- Basic Info: ID, name, description, icon, category
- Cost and Timing: PP cost, days, re-enable delay
- Conditions: Allowed, Available, Visible triggers
- Targets: Fixed targets, target array, state targeting
- Effects: Complete, Remove, Timeout, Cancel effects
- AI: AI weighting and conditions
- Click Browse... next to Icon field
- Search or scroll through available GFX sprites
- Click to preview, double-click to select
For highlight_states:
- Click Pick States... button
- Search by ID or name
- Click states to select (multi-select)
- Click "Apply" to insert state list
Click Preview to see how the decision appears in-game UI, including icon display, name and description, cost and duration, and category placement.
- Click Validate to check for errors
- Automatic validation on save
- Shows missing localizations, invalid references
- Click Search All button
- Enter search term
- Filter by type (flags, events, ideas, states)
- Click results to jump to that decision
Command: HOI4: Tech Tree Editor
Visual editor for technology trees with research time calculations.
- Visual tech tree layout matching in-game view
- Drag-and-drop positioning
- Research time and cost editing
- Prerequisite linking
- Category management
- Icon preview
- Select a technology file
- Click technologies to edit properties
- Drag to reposition
- Link prerequisites by clicking connection mode
- Research time and cost
- Start year
- Categories and folders
- Prerequisites
- Research bonuses
- Unlocked equipment/units
Command: HOI4: Open Map Editor
Visual map editor for provinces, states, and strategic regions.
- Provinces: Individual province view
- States: State boundaries and ownership
- Strategic Regions: Military regions
- Supply Areas: Logistics visualization
- Open Map Editor
- Click on map to select province
- Province ID shown in status bar
- Copy ID with button or
Ctrl+C
Click state to select, then edit properties in side panel:
- Owner and controller
- Victory points
- Buildings (infrastructure, factories, etc.)
- Resources (steel, oil, etc.)
- Core states
- Click building icons to place
- Adjust levels with +/- buttons
- Visual indicators on map
Command: HOI4: OOB Creator
Create Orders of Battle (starting military units) for countries.
- Click New OOB or select existing
- Set country tag
- Build military hierarchy
- Theater > Army Group > Army > Corps > Division
- Drag units to reorganize
- Right-click for context menu
- Click New Division
- Select division template or create custom
- Add battalions: Infantry, Artillery, Armor, Support companies
- Set equipment levels
- Assign to army/corps
- Create air wings
- Assign aircraft types and counts
- Set home air base
- Create task forces
- Assign ships
- Set home port
- Generates valid HOI4 OOB file
- Automatically creates unit history file
- Proper formatting and structure
Command: HOI4: Equipment Analyzer
Analyze, compare, and simulate production of equipment.
- Browse all equipment by category
- Filter by year, type, archetype
- View detailed stats
- Select equipment to edit
- Modify any stat
- See combat preview update
- Save to original file
- Select equipment
- Set factory count
- Apply modifiers (industrial capacity, production efficiency, resource availability)
- View production rate and time estimates
- Select up to 3 equipment items
- Side-by-side stat comparison
- Highlights best/worst values
- Cost efficiency analysis
Command: HOI4: Battle Simulator
Simulate combat between divisions to test effectiveness.
- Attacker: Build or select division
- Defender: Build or select division
- Terrain: Select combat terrain
- Modifiers: Add entrenchment, air support, etc.
- Add any unit types
- Set equipment variants
- Apply doctrines and modifiers
- Soft/Hard Attack values
- Defense and Breakthrough
- Organization and HP
- Armor and Piercing
- Predicted winner
- Estimated battle duration
- Casualty estimates
- Organization damage over time
Command: HOI4: AI Behavior
Analyze and understand AI decision-making in your mod.
- View AI strategy plans
- Analyze focus tree AI weights
- See decision AI priorities
- Understand AI division templates
- Select country or AI file
- Browse AI behaviors by type
- View conditions and weights
- Identify potential issues
Command: HOI4: Event Chain Visualizer
Visualize event relationships and chains.
- Interactive graph view
- Automatic chain detection
- Option tracking
- Namespace filtering
- Open Event Chain Visualizer
- Select event namespace or file
- View connected events as graph
- Click nodes to see event details
- Follow option arrows to see triggers
- Zoom with scroll wheel
- Pan by dragging background
- Click nodes to select
- Double-click to open event file
Command: HOI4: Show Dependency Graph
Shortcut: Ctrl+Alt+D
Visualize relationships between files in your mod.
- File dependency visualization
- Circular dependency detection
- Impact analysis
- Filter by file type
- Open from sidebar or command
- Select root file or view all
- Explore connections
- Click nodes to see details
Right-click any file and select "Analyze Impact" to see:
- What files depend on this file
- What this file depends on
- Potential cascade effects of changes
Command: HOI4: Idea Browser
Browse and search all ideas, national spirits, and advisors.
- National Spirits
- Political Advisors
- Military Advisors (Army, Navy, Air)
- Theorists
- Laws (Economy, Trade, Conscription)
- Hidden Ideas
- Search by name or effect
- Filter by category
- View all modifiers
- See availability conditions
- Cost information
- Open Idea Browser
- Select category or search
- Click idea to see details
- Double-click to open source file
Command: HOI4: Flag Tracker
Track global flags, country flags, and variables across your mod.
- Find all flag/variable definitions
- Track where flags are set
- Track where flags are checked
- Identify unused flags
- Global flags
- Country flags
- State flags
- Variables
- Dynamic modifiers
- Open Flag Tracker
- Search for flag name
- View all references
- Click to jump to location
Command: HOI4: GFX Auditor
Validate and manage graphical assets.
- Missing Assets: GFX defined but file missing
- Unused Assets: Files with no GFX reference
- Invalid Dimensions: Wrong image sizes
- Format Issues: Incorrect file formats
- Open GFX Auditor
- Run audit (automatic on open)
- Review issues by category
- Click to navigate to problem
- Use Quick Fix for common issues
- Generate missing GFX entries
- Create placeholder images
- Fix path references
Command: HOI4: Image Toolkit
Image processing and conversion tools.
- View DDS files directly
- Convert between formats (DDS, PNG, TGA)
- Resize images
- Generate mipmaps
- Batch processing
- DDS (DXT1, DXT5, BC7)
- PNG
- TGA
- BMP
Command: HOI4: Event Picture Creator
Create and manage event pictures.
- Browse existing event pictures
- Create new event GFX entries
- Preview at correct dimensions
- Auto-generate sprite definitions
- Open Event Picture Creator
- Browse or create new
- Select source image
- Set GFX name
- Generate entry and copy files
Command: HOI4: Animated DDS
View animated DDS files used in HOI4.
- Play animated textures
- Frame-by-frame view
- Speed controls
- Export frames
Command: HOI4: Localization Dashboard
Shortcut: Ctrl+Alt+L
Overview of localization coverage and management.
- Coverage statistics by category
- Missing key detection
- Language comparison
- Batch operations
- Overview: Total coverage percentage
- By File: Coverage per localization file
- Missing: List of unlocalized keys
- Comparison: Compare languages
- Add multiple keys at once
- Copy from one language to another
- Export missing keys list
Command: HOI4: Event Localizer
Quickly localize events with assisted suggestions.
- Event-focused localization
- Title and description editing
- Option text management
- Preview formatted text
- Open Event Localizer
- Select event file
- Edit titles, descriptions, options
- Save to localization file
Shortcut: Ctrl+Shift+L
Instantly add localization for selected text.
- Select a localization key in your code (e.g.,
my_event.1.t) - Press
Ctrl+Shift+L - Enter the localized text
- Automatically added to your localization file
Set your default localization file in settings:
{
"hoi4.localizationFile": "localisation/mymod_l_english.yml"
}Command: HOI4: Dev Notes
Project management integrated into your mod workspace.
- Drag-and-drop task management
- Customizable columns
- Card labels and due dates
- Rich text descriptions
- Attach notes to specific files
- Quick access from explorer
- Color-coded by priority
Automatically finds comments:
// TODO: ...// FIXME: ...// NOTE: ...# ISSUE: ...
- Saved to
.hoi4-dev-notes.json - Add to
.gitignoreif desired - Share via version control
Command: HOI4: Performance Profiler
Shortcut: Ctrl+Alt+P
Analyze mod performance and find bottlenecks.
- File size analysis
- Trigger complexity scoring
- Effect chain depth
- Event fire frequency estimates
- Large Files: Files that may cause loading issues
- Complex Triggers: Expensive condition checks
- Heavy Effects: Resource-intensive effects
- Recommendations: Optimization suggestions
- Open Performance Profiler
- Run analysis
- Review issues by severity
- Click items to navigate
- Follow recommendations
Command: HOI4: Show Debug Log
Shortcut: Ctrl+Alt+O
View and analyze HOI4's debug output.
- Live log tailing
- Error highlighting (red)
- Warning highlighting (yellow)
- Filter by type
- Search functionality
- Click errors to open source
Start continuous monitoring:
HOI4: Start Debug Log Watcher- Run the game
- Errors appear in real-time
HOI4: Stop Debug Log Watcherwhen done
Set your log path:
{
"hoi4.debugLogPath": "C:/Users/You/Documents/Paradox Interactive/Hearts of Iron IV/logs"
}Command: HOI4: Changelog Generator
Generate changelogs from git history.
- Reads git commits automatically
- Auto-categorizes changes
- Version tagging
- Markdown export
- Custom templates
- Features
- Bug Fixes
- Balance Changes
- Content Additions
- Performance
- Open Changelog Generator
- Select date range or version tags
- Review and edit entries
- Export as Markdown
- Ready for Steam/GitHub
Command: HOI4: Global Search
Shortcut: Ctrl+Alt+G
Search across all mod content.
| Command | Shortcut | Searches |
|---|---|---|
| Search Flags | Ctrl+Shift+F |
Country flags, global flags |
| Search Events | - | Event IDs and content |
| Search Focus | - | Focus tree IDs and effects |
| Search Decisions | - | Decision IDs and triggers |
Shortcut: F12
Jump to the definition of event IDs, focus IDs, decision IDs, idea IDs, and technology IDs.
Shortcut: Shift+F12
Find everywhere something is used.
| Shortcut | Action |
|---|---|
Ctrl+Shift+L |
Quick Localize selected text |
Ctrl+Alt+G |
Global Search |
Ctrl+Alt+D |
Dependency Graph |
Ctrl+Alt+P |
Performance Profiler |
Ctrl+Alt+L |
Localization Dashboard |
Ctrl+Alt+O |
Debug Log Viewer |
Ctrl+Shift+I |
Analyze Impact |
F12 |
Go to Definition |
Shift+F12 |
Find All References |
Ctrl+Space |
IntelliSense suggestions |
Ctrl+. |
Quick Fix menu |
Access via File > Preferences > Settings and search for "HOI4" or edit the Extension Settings Workspace.
{
"hoi4.gamePath": "C:/Program Files/Steam/steamapps/common/Hearts of Iron IV",
"hoi4.defaultLanguage": "english",
"hoi4.localizationFile": "localisation/mymod_l_english.yml",
"hoi4.enableDiagnostics": true,
"hoi4.debugLogPath": "Documents/Paradox Interactive/Hearts of Iron IV/logs"
}Create .vscode/settings.json in your mod folder for project-specific settings:
{
"hoi4.modName": "My Awesome Mod",
"hoi4.modVersion": "1.0.0",
"hoi4.supportedGameVersion": "1.14.*"
}- Ensure you opened a folder, not individual files
- Check for
descriptor.modin root (identifies HOI4 mod) - Reload VS Code:
Ctrl+Shift+P> "Reload Window" - Check Output panel for errors: View > Output > "HOI4 Modding Tools"
- Verify
map/definition.csvexists - Ensure
map/provinces.bmpis valid - Check file permissions
- Set localization file in settings
- Ensure file uses UTF-8-BOM encoding
- Verify file path is correct relative to workspace
- Check for circular
relative_position_idreferences - Verify all referenced focuses exist
- Save and reload the tree
- Large mods take time to index on first open
- Close unused editor panels
- Disable unused features in settings
- Rebuild index:
HOI4: Rebuild File Index
your-mod/
├── common/
│ ├── countries/
│ ├── country_tags/
│ ├── decisions/
│ │ └── categories/
│ ├── ideas/
│ ├── national_focus/
│ ├── technologies/
│ └── units/
│ └── equipment/
├── events/
├── gfx/
│ ├── event_pictures/
│ ├── interface/
│ │ └── goals/
│ └── leaders/
├── history/
│ ├── countries/
│ ├── states/
│ └── units/
├── interface/
├── localisation/
├── map/
│ ├── definition.csv
│ └── provinces.bmp
└── descriptor.mod
- Message awesome___. aka Olander on Discord
- Hearts of Iron IV by Paradox Interactive
- VS Code Extension API
- The HOI4 modding community
- Chaofan
- Issues: GitHub Issues
- Discussions: GitHub Discussions





