Repository navigation
Releases
v1.4.2
Fixes for the four problems found on 1.19.4.2, the first live run of the R-5 mod checks (which found and fixed more), and the native and campaign changes merged since 1.4.1.
Launch, shutdown and menu fixes (HOI4 1.19.4.2)
hoi4_launchstops at once when the owned game process exits or the game opens its fatal-error dialog (the helper
hoi4.exe -error_title ...). The error carries the exit code, the dialog title and message when there is one, the
error.loglines and any crash folder, instead of waiting out the timeout (#30). Live: a normal launch with a broken map
file ended in 22 s with exit code 0xC0000005 (before, it ran to the timeout).hoi4_shutdownwaits until the owned process is really gone (pid dead and no longer in the process list, creation time
checked) before it restores the config and DLC files. The DLC restore allows a short grace for a process list that
clears late (#29). Live: the process was gone when the call returned, in every run.hoi4_new_gamewithexit_to_menuclicks Exit to Menu on the Playthrough Overview window (#28). The label is read at
2x and 3x with a pattern that tolerates a misread letter (1.5x read it as "Exit*o Menu" live). The older fallback that
clicked any "Quit" is limited to the statistics screen: on the main menu, still being drawn, it exited the game.
Live: the resign took 11 s and the new game started.- Clicks are scaled from the captured frame to the game window when the capture has the window's shape at another size
(#27).hoi4_statusshows the frame size and scale. The live setup on 14 November differed from the report: the
capture matched the window (2560x1440), but the screen was a single 1920x1080 display, so the START button lay below
the desktop and the cursor stopped at the corner. A click point outside the desktop now moves the game window until
the point is reachable (a window that fits is never moved). Live: with the window at 2560x1440 on that display, a new
game started in 25 s with no START retry (before: START was clicked four times in vain).
Mod checks (R-5), first live run
Run on 14 November 2026 against a scratch mod with events, decisions and a focus tree, on a 1920x1080 window.
hoi4_check_triggerandhoi4_check_focusanswered correctly, including the unmet prerequisite,available
conditions and falseORandNOTblocks.hoi4_smoke_namespacefired events and answered every option, took a decision and named the unmet condition of
another. It reported a hidden event without options and a script error. Fixed: the cursor rests on the middle of the
screen before a window is read (a leftover option tooltip made every second firing unreadable); an option or title
that shows a raw localisation key is reported astext_missing; a decision row that OCR did not read is looked for
again, and a raw key name is matched more loosely (OCR readslivetest_missing_locastivetest_missing_toc).hoi4_sweep_locscrolls the decisions list page by page, so rows below the first screen are read. Before, a sweep
of the decisions panel found nothing; now it finds the raw keydebug_decisions.- Not confirmed: the raw-key decision row of the scratch mod was not flagged by the sweep, and the smoke test did not
take that decision in one run (both OCR limits, issues #66 and #67); the-error_titledialog path ofhoi4_launchis
covered by tests only.
Full list of changes: CHANGELOG.md.
Verify a download: sha256sum -c SHA256SUMS.txt --ignore-missing and
gh attestation verify <file> --repo klimPaskov/HOI4-Live-Tools.
v1.4.1
The Python server installs on macOS from the release archive.
install.pynow supports macOS as well as Windows. It installs into~/Library/Application Support/hoi4-live-tools
(app/,venv/,config.json,artifacts/,install.json, as on Windows). It installs the PyObjC frameworks
the macOS platform needs (Cocoa, Quartz, ApplicationServices, ScreenCaptureKit, Vision), checks that the
server answers, and registers the clients it finds. Linux is still refused; use the native runtime there.- The new POSIX launcher
app/hoi4-live-toolsis what macOS clients start. It chooses Python and settings the
same wayhoi4-live-tools.cmddoes on Windows:HOI4_LIVE_PYTHON, then the privatevenv, then a checkout
.venv, thenpython3. The release archive stores it with LF line endings and mode 755, and the installer sets
it executable again after copying. requirements.txtlists the macOS-only PyObjC dependencies with the samesys_platformmarkers as
pyproject.toml. The Windows install is unchanged.- Tested on macOS 26.5 (Apple silicon) with Apple's Python 3.9.6: a fresh install took 25 s, the server listed
52 tools, every selftest line passed (including Vision OCR), and re-running, registering Claude Code and Codex,
statusanduninstall --purgeall worked. The game was not started.
Full list of changes: CHANGELOG.md.
Verify a download: sha256sum -c SHA256SUMS.txt --ignore-missing and
gh attestation verify <file> --repo klimPaskov/HOI4-Live-Tools.
v1.4.0
Mod-test checks, DLC without the Steam client, four launch fixes on 1.19.4.1, and war tools for the native
macOS and Linux builds. The Windows Python server gains the new test-mode tools; it still has 52 tools.
War tools (native macOS and Linux)
- New army tools:
hoi4_army_motorization(set an army's supply motorization),hoi4_army_detach(move chosen
divisions out of an army) andhoi4_division_disband(disband divisions of one army). - New read and map tools:
hoi4_alerts,hoi4_occupation,hoi4_war_stats(read-only) andhoi4_map_mode. hoi4_research_startcan replace the research in a busy slot (replace: true).- Orders that the game answers with a receipt now settle as errors when the receipt is a refusal, the camera
is reset more reliably, error messages say what was missing, and the campaign playbook gained notes on army
organisation and the war operating loop. Details are in the macOS tool list.
Launch check
- Refusing a launch while a Steam client or steamcmd runs is now opt-in: set
HOI4_LIVE_REQUIRE_STEAM_CLOSED=1
(Python server and native Linux supervisor). Unset, the launch goes ahead.
Launch failures
Four launch failures seen on 1.19.4.1 on 2 November are handled. Offline tests and fakes cover the logic. A live
run on HOI4 1.19.4.2 on 9 November confirmed the MAP_ERROR stop (below) and hoi4_new_game with no START
retry needed in two runs; the START retry itself, the custom Select Country screen and the console changes were
not exercised live (see "Live acceptance" below).
hoi4_launchwith-debugfails at once when the game reports a MAP_ERROR (it waits on an OK dialog),
with the error lines fromerror.log, the dialog text if OCR reads it, and a screenshot, instead of waiting
for the launch timeout. A normal launch lists the lines asmap_errors.hoi4_new_gameclicks START again at most three more times (30 s apart) when the ready screen stays up, then
fails withstart_not_registered. The result reportsstart_retries.hoi4_new_gamegoes through a mod's own Select Country screen: it recognises it by its heading or by a
confirming button next to Back to menu, clicks the country by name and the button, and continues from the
ready screen. When the screen offers neither, the call stops withcustom_country_screenand the text it saw.- The console opens over an open sea-region panel and over a total conversion's own interface. A toggle that
visibly changes the console area counts as opened when the console frame cannot be seen (it is closed the same
way in the same call, andkeep_openis refused in that case), andhoi4_consolecloses open windows with
Esc once before giving up (console_not_open).
DLC without the Steam client
hoi4_prepare(Python, test mode): copieslauncher-v2.sqliteanddlc_signaturefrom the normal user
folder into the run's user folder with a byte-exact backup, so a launch without the Steam client keeps the
DLC.hoi4_shutdown(orhoi4_prepare action=restore) puts the folder back and never overwrites a file
that changed after the copy.hoi4_launch prepare_dlc=truedoes both steps. The README explains the launch
order (prepare, launch, test, shutdown). New config keydlc_source_dir.docs/tools.mdregenerated from the registry (it had drifted behindhoi4_front,hoi4_memoryand others).
Smoke tests and checks (R-5)
hoi4_check_trigger(test mode): evaluates a trigger block in the running game for a country (or a state)
and returns true or false with the unmet condition. Each top-level condition is asked on its own through the
console (eval_effectwrapping anifthat logs TRUE or FALSE to game.log), and a falseOR,NOTor scope
block is explained by its children.hoi4_check_focus(test mode): is a national focus selectable for a country? Reads the focus from the game
and mod files and asks the game about: already completed, each prerequisite group, each mutually exclusive
focus, every condition ofavailableandallow_branch; a holdingbypassis reported. Not checked: a focus
already in progress, focus slots, political power.- New test-mode tool
hoi4_sweep_loc: sweeps the map and the panels for[missing_key], raw localisation keys, unresolved$VARIABLES$and[Root.GetName]commands and colour codes shown as text through OCR, and lists the localisation warnings thaterror.logandtext.loggained during the sweep. hoi4_smoke_namespace(test mode): fires every event<namespace>.Nthrough the console, answers each option
of its window (one firing per option), takes the decisions of a category or id prefix through the decision
panel after checking their conditions with the game, and reads the newerror.loglines after every step.
One report (Markdown and JSON underartifacts/) lists per event and decision what appeared, what was
answered, the unmet condition of a decision that could not be taken and the error lines. State, unit leader
and character events, targeted decisions and missions are skipped with the reason.dry_runlists the plan.
Live acceptance (Windows, HOI4 1.19.4.2)
Run on 9 November 2026 with the installed 1.4.0 candidate, a scratch user folder, no mods unless stated, and no
console, save edit or memory write.
- Install and
selftestpass; the server answers 52 tools. A normal debug launch reaches the main menu in 88 to
129 s;hoi4_statusandhoi4_screenreport the running game andmain_menu. hoi4_prepare/prepare_dlc: both DLC files are copied,error.loghas no "Could not find DLC", the main menu
shows the DLC icons, and the restore removes both files and leaves the real user folder byte-identical.-debuglaunch of a scratch mod with province 221 removed from its strategic region fails with
map_error_on_launchabout a minute after the start. The log line reads
MAP_ERROR: The province 221 - has no strategic region assigned.hoi4_new_gamestarts a game (1936.1.1.12) for two countries in 9 to 27 s withstart_retries0.- Not confirmed: the START retry (never needed), the custom Select Country screen (Old World Blues and The New
Order: Rises Again both failed to load their map on 1.19.4.2 with their own script errors, so no total
conversion could be reached), and every console-based tool (hoi4_console,hoi4_check_trigger,
hoi4_check_focus,hoi4_smoke_namespace,hoi4_sweep_loc), which the run did not use. - Found, not fixed in this release: at a 2560x1440 game window the capture and OCR frame is 1920x1080 and
clicks go to unscaled coordinates, so menu clicks miss (use a 1920x1080 window); after a resign 1.19.4.2 shows a
"Playthrough Overview" window whose Exit to Menu buttonhoi4_new_game exit_to_menudoes not click;
hoi4_shutdowncan return before the process has exited and then leaves the DLC files for
hoi4_prepare action=restore;hoi4_launchwaits for its timeout when the game crashes on a map error
instead of reporting the crash.
Known limits
Windows only; windowed or borderless at 1920x1080 and interface scale 1; the screen language of the game must
match the OCR language; the campaign tools were verified on the vanilla interface with one large mod; the phase 4
exit check was not repeated end to end on the final code and the two-year campaign runs of the plan were not made
(see docs/STATUS.md).
Full list of changes: CHANGELOG.md.
Verify a download: sha256sum -c SHA256SUMS.txt --ignore-missing and
gh attestation verify <file> --repo klimPaskov/HOI4-Live-Tools.
v1.3.0
The native Linux runtime gets the macOS management toolset on HOI4 1.19.4.1:
hoi4-live-nativefor Linux x86_64 now accepts only HOI4 1.19.4.1 (GNU build ID2265e6e7...) and
binds about 120 tools with--bind-management. 104 of them were run live against the Linux game,
including a declared war (Linux live verification).- The macOS build gets the fixes found on Linux (air mode detection, the intelligence agency,
"Delete task force" and "Agency Created!" pop-ups, stable confirmation clicks). - The Windows Python package is unchanged apart from its version.
Full list of changes: CHANGELOG.md.
Verify a download: sha256sum -c SHA256SUMS.txt --ignore-missing and
gh attestation verify <file> --repo klimPaskov/HOI4-Live-Tools.
v1.2.0
HOI4 1.19.4.1. The Windows runtime gets the 1.19.4.1 fixes below. The native runtime ships for the
first time as experimental downloadable builds:
hoi4-live-nativefor macOS (Apple silicon, ad-hoc signed with the debugger entitlement): the
full management toolset on HOI4 1.19.4.1 macOS (Mach-O UUID DFA875A5), about 120 tools.hoi4-live-nativefor Linux x86_64: the narrower Linux toolset (telemetry, focus, research,
production and construction). It accepts only HOI4 1.19.3 (GNU build ID a4971c9e...); 1.19.4.1
Linux builds are refused until their offsets are mapped and verified.
Steam rules for every launcher (Python hoi4_launch and the native Linux launcher):
- The game is never started while a Steam client,
steamwebhelperorsteamcmdruns
(steam_running). Under WSL the Windows host is checked too throughtasklist.exe
(steam_check_unavailablewhen interop is off;HOI4_LIVE_WINDOWS_STEAM_CHECK=skiponly when the
harness checks the Windows host itself). - No Steam variable (
SteamAppId,SteamGameId,STEAM_COMPAT_*...) or Steam overlay preload
reaches the game. The native Linux launcher also gives the game an empty privateHOMEinside the
run directory.
Windows runtime
- Live session on HOI4 1.19.4.1 (2 November 2026, Windows 11,
-debug, 1920x1080
borderless, three launches). Launch to the main menu took 81 to 139 s. A new 1936 game, the
top bar, the console andeval_effect, popups, events, politics, the focus
tree, production lines with an MIO choice andhoi4_shutdownworked after
these fixes:- Console replies printed in red ("Unknown command", wrong arguments) are read.
- The main menu is recognized when OCR garbles one of its buttons.
- A server whose game exited can launch a new one: an exited bound process has
no window and its binding is dropped. - A user folder without
save games/reads as having no saves. - The game-font reader no longer fails on a crop with only small glyphs.
- Auto capture retries PrintWindow every 15 s after a blank frame instead of
staying on ffmpeg ddagrab, which timed out after a relaunch.
- Later fixes from the same session:
- Seen on 1.19.4.1 and not fixed yet:
- The
hoi4_diplomacyview of a country whose state name differs from the
country name did not open Find. - The console did not open over an open sea-region panel or over a total
conversion's custom interface (ZIN). Pressing the console key by hand worked. - Custom country-select screens stop
hoi4_new_gameat Select Country. - With
-debug, a MAP_ERROR opens error.log in Notepad and an OK dialog over
the main menu, andhoi4_launchwaits for the menu until its timeout. - Without the Steam client the game finds no DLC in a fresh user folder unless
launcher-v2.sqliteanddlc_signaturefrom the real one are copied in, and
Career Profile is unavailable.
- The
Full list of changes: CHANGELOG.md.
Verify a download: sha256sum -c SHA256SUMS.txt --ignore-missing and
gh attestation verify <file> --repo klimPaskov/HOI4-Live-Tools.
HOI4 Live Tools 1.1.0
Test mods and play Hearts of Iron IV from your coding agent, on Windows.
This is the current stable release. It launches the game, loads saves, fires events, answers popups, runs time forward, reads the screen and error log, and plays campaigns through the game interface. 43 tools.
Download and install
- Download
hoi4-live-tools-1.1.0.zipbelow and unpack it anywhere. - In that folder, run
python install.py. It creates a private Python environment and registers the server with Claude Code, Codex, Cursor and OpenCode. - Restart your coding client, then check the game side with
%LOCALAPPDATA%\hoi4-live-tools\app\hoi4-live-tools.cmd selftest.
HOI4 Mod Setup can install this release for you.
Requirements
- Windows 10 or 11, Hearts of Iron IV from Steam (tested on 1.19.2)
- Game windowed or borderless, interface scale 1, game language matching the OCR language
- Python 3.9 or newer and the Windows English OCR component
- FFmpeg (optional, for capture fallback and recording)
What's new in 1.1.0
- Faster clock:
hoi4_advancefollows telemetry day records instead of pausing to read the date, so a game day takes 0.7 s instead of 3.3 s.background=truekeeps the game running while the agent acts. - Standing orders (
hoi4_standing): research, focus, construction and production queues that run when their situation comes up. - New tools:
hoi4_clock,hoi4_standing,hoi4_peace. - Macros for construction plans, production fill, attacks, diplomacy and focus search.
- Safety: a window guard before every campaign action, and console and manual-save tools refuse in Ironman and multiplayer games.
- Many OCR and panel-reading fixes. The full list is in the changelog.
Known limits
- Windows only. macOS and the native Linux runtime are separate, unreleased work.
- Campaign tools were verified on the vanilla interface with one large mod. The planned two-year campaign runs were not made, so long unattended campaigns are not yet proven.
Verify your download
SHA-256 of hoi4-live-tools-1.1.0.zip: 15d6d86b3d7d6d6795bd2a9598d56d312831ff8b4f9c518a38eec522c8c623e4 (also in SHA256SUMS.txt).
Looking for the native runtime?
A faster Rust runtime built on Clausewitz-MCP is in developer preview on Linux and is not part of this release. It reads game state directly in milliseconds and has passed live tests for time, research, Focus and construction-panel controls. See the README to build it from source.