Modular Architecture — The monolithic 11,683-line dllmain.cpp has been decomposed into 12 source files across headers, inline class includes, and a separate overlay translation unit. The codebase is now 12,937 lines of mod source plus 1,672 lines of tests.
In-Game Config Menu — A full UMG configuration widget with three tabbed panels: Optional Mods (Free Build, No Collision toggles), Key Bindings (17 rebindable keys with scroll support), and Build From Target settings. Press F12 (default) to open.
Runtime Reflection — All hardcoded Blueprint class offsets replaced with runtime property resolution via Unreal's ForEachProperty() API, making the mod resilient to game updates that shift class layouts.
199 Unit Tests — Expanded test suite covering file I/O, key helpers, localization, memory utilities, and string helpers.
Monolithic dllmain.cpp split into 12 files:
moria_common.h— Shared types, constants, forward declarationsmoria_keybinds.h— Keybind definitions and tablesmoria_reflection.h— Runtime property resolution utilitiesmoria_debug.inl— Debug display and diagnosticsmoria_hism.inl— HISM instance removal/undo systemmoria_inventory.inl— Inventory and toolbar managementmoria_overlay.cpp— Win32 GDI+ overlay (separate translation unit)moria_overlay_mgmt.inl— Overlay slot management and config togglemoria_quickbuild.inl— Quick-build and target-build state machinesmoria_widgets.inl— UMG widget creation, Target Info, Config Menu
- Three tabbed panels: Optional Mods, Key Bindings, Build From Target
- Tab 0: Toggle Free Build and No Collision with full-row click areas
- Tab 1: 17 rebindable keys with scrollable list and yellow "[Press key...]" capture feedback
- Tab 2: Build From Target distance and settings
- DPI-aware hit-test coordinate system using game viewport scale
- Alt-Tab focus recovery — re-applies UI input mode when game regains foreground
- ESC or click-outside to close
FWeakObjectPtrfor GC-safe UObject references- GDI+ lifecycle management (proper init/shutdown)
ProcessEventbuffer safety (zero-initialized parameter blocks)unique_ptrfor icon extraction texture buffers- RAII
CriticalSectionLockfor overlay thread synchronization stopOverlayrace condition fix (join with timeout)- Consistent error checking on property resolution failures
- New
WaitReopenphase in both quick-build and target-build state machines - Configurable frame delay (
m_quickBuildSwapDelay, default 5 frames) between menu close and reopen - Mitigates UE4.27
FSlateCachedFastPathRenderingDatacrash when rapidly switching build recipes
- Chat widget system (
findWidgets,showGameMessage) commented out with BELIEVED DEAD CODE markers - InfoBox popup system (4 functions, never displayed) commented out
toggleBuildHUDdiagnostic function commented out
- 137 tests expanded to 199 tests (+45%)
- New test files:
test_key_helpers.cpp,test_memory.cpp,test_loc.cpp,test_file_io.cpp
- Placeholder Info Box resized to match real Target Info widget (1100x320)
- DPI-aware toolbar repositioning with fractional viewport coordinates
- Widget rendering uses engine DPI (
RenderScale=1.0, unscaledDesiredSize)
- Restored non-uniform Build Bar scaling from v1.7 (0.825x, 0.75y)
- Fixes squished appearance reported on 2560x1440 displays
- Replaced
keybd_event(B)hack with FGKShow()/Hide()API for build menu control OnAfterShowProcessEvent hook as definitive "menu ready" signal- Eliminated
PrimeClosephase — direct transition fromPrimeOpentoSelectRecipe
- Switched from
CapsuleComponent::SetCollisionEnabledtoAActor::SetActorEnableCollision - Fixes camera dropping below character model during noclip flight
- Removed
countVisibleBuildItems()helper (replaced by OnAfterShow hook) - Added fly mode localization string
Replaced all inline hardcoded offsets on Blueprint/UObject classes with runtime reflection:
- 4 reflected properties:
TargetActor,selectedRecipe,selectedName,recipesDataTable - LineTraceSingle parameters:
LTOffnamespace (14 constexpr values) replaced withLTResolvedstruct - UpdateInstanceTransform parameters: Hardcoded offsets replaced with
UITResolvedstruct - GetInstanceTransform_Params: Runtime validation against
ForEachProperty()results - Struct-internal offsets (FSlateBrush, FSlateFontInfo, FMorRecipeBlock, etc.) remain hardcoded — POD types verified stable against CXXHeaderDump
logBLockDiagnostics()logs Tag, CategoryTag, SortOrder, Variants, and hex dumps at 4 instrumentation points to differentiate same-named recipes across categories
swapToolbarTick()rewritten to useGetItemForSlot(replacesGetItemForHotbarSlot)- Removed dead
clearHotbarstate machine guard
- 7
#if 0blocks removed:startRotationSpy,testAllDisplayMethods,dumpAllWidgets,dumpBuildCraftClasses,probeInventoryHotbar,clearHotbar/clearHotbarTick,rotateBuildPlacement - Dead state variables removed
- Stale comments fixed (F12 references, deleted keybind notes)
- All 11 section headers audited for accuracy
- Clean build, zero warnings (MSVC v14.50, VS2026)
- Source: ~12,937 lines across 12 files (up from ~10,858 single-file at v2.0)
- Tests: 199 tests across 5 test files (1,672 lines)
- Version 2.5
- Code-signed with SSL.com eSigner
- No configuration changes required — existing
MoriaCppMod.ini,quickbuild_slots.txt, andremoved_instances.txtfiles are fully compatible - The mod logs
Resolved 'PropertyName' @ offset ...messages on first use of each reflected property — this is normal startup behavior - Config menu accessible via F12 (or your rebound key)
v2.0 → v2.5: 11,091 insertions, 9,502 deletions across 18 files