Skip to content

reClausewitz 2.0Resilient Core & Extender for HOI4

Zero-AOB Clausewitz GUI scripting, sandboxed Lua 5.4 runtime, and live DX11 shader overrides with hot reload.

PDX GUI
1window "market_ui_bottom" {
2 button "diplo_view_button" {
3 override_vanilla = yes
4 properties = {
5 x = "lua:reClausewitz.calc_btn_x()"
6 y = -50
7 }
8 enabled = { has_war = no }
9 left_click = {
10 click = { lua = "reClausewitz.on_click()" }
11 ctrl_shift = { lua = "reClausewitz.on_click(true)" }
12 }
13 }
14}

Architecture Specifications ​

SubsystemImplementationRuntime Limits & Notes
Memory & HooksRTTI, XREF, Zydis x64, PE .pdataZero PatternScan signatures; SEH-protected reads
GUI ScriptingPdxParser AST + 250 ms WM_TIMER syncenabled, visible, override_vanilla, dirty, click modifiers
Lua RuntimeSandboxed Lua 5.4.9 + preprocessor64 MB memory cap, instruction/timeout watchdog, hoi4.* bridge
DX11 PipelinePresent / ResizeBuffers / PS & VS hooksHLSL via D3DCompile, cbuffer b12, F11 ImGui DockSpace overlay

Mod Entry Points ​

GUI Overrides

Bind Paradox triggers, effects, and Lua callbacks to existing buttons, icons, and textboxes without editing vanilla interface files directly.

reClausewitz/scripts/gui/*.txt

Lua 5.4 Functions

Write fast math, scope chains, array batch reads, and localized string formatting with built-in syntax sugar and strict sandboxing.

reClausewitz/scripts/functions/*.lua

DX11 Shader Pipeline

Replace vanilla pixel or vertex shaders by FNV-1a DXBC hash, inspect reflection in-game via F11, and drive uniforms from Lua via b12.

reClausewitz/shaders/shaders.txt

Workshop Load Order

Automatically resolves enabled mods from Paradox Launcher dlc_load.json and supports manual overrides via load_order.txt.

reClausewitz/load_order.txt