Skip to main content

Module layout

Module layout 

Source
Expand description

Pure helpers for assembling a runtime layer and reading its logs.

Launching a copied eu4.exe keeps the original install read-only, but it reintroduces Windows’ MAX_PATH limit: the game opens files by <runtime dir>\<relative path>, and anything past 259 characters silently fails to load. These helpers keep that budget and the log scan testable without a game.

Enums§

LayerAction
Classifies a top-level game-directory entry for the runtime layer: small loose files are copied so the engine can read and rewrite them freely; large data directories are linked so nothing is duplicated.

Constants§

MAX_PATH
Windows caps a classic path at 260 chars including the terminator.

Functions§

all_cases_ended
Whether the engine log shows an END record for every case in the session, meaning the run is complete and the game can be stopped.
classify_entry
Foch metadata, old loaders and stale console history never belong in a fresh runtime layer; everything else loose is copied, directories linked.
command_file
The console command file for a session: the bundle’s own commands, with ai prepended to disable AI for deterministic results.
dlc_load
A dlc_load.json enabling exactly the source mod and generated test layer.
fits_path_budget
Whether every game file still fits under MAX_PATH when the install is reached through a runtime directory of runtime_dir_len characters. longest_relative is the longest <dir>\<file> path below the install, relative to its root.
isolated_settings
A windowed, muted copy of the player’s settings.txt, so a test launch never goes fullscreen or plays sound. Keys absent from the template are left as the engine defaults them.