Skip to content

Add native ZIP/REZ mod manager with in-game Mods menu - #44

Open
techerrorcode wants to merge 1 commit into
nolffan:masterfrom
techerrorcode:contribution/native-mod-manager
Open

techerrorcode wants to merge 1 commit into
nolffan:masterfrom
techerrorcode:contribution/native-mod-manager

Conversation

@techerrorcode

@techerrorcode techerrorcode commented Oct 23, 2026 •

Copy link
Copy Markdown

What this adds

Adds one complete, optional data-only ZIP/REZ mod management framework for NOLFSRC's modern build. Players drop a supported package into Mods, launch NOLF.exe, open Mods, enable it, save choices and restart. The bundled headless helper performs discovery and transactional application automatically.

This PR contains no weapons, ADS, suppressors, gore, ragdolls, dismemberment, renderer changes or other personal gameplay modifications. It was assembled on a fresh upstream master base, not by merging the development branch. There is one contribution commit and no unrelated development history.

Main capabilities

  • Native NOLF-style menu with descriptions, metadata, active/pending states, mouse-wheel navigation, named-profile selection, conflict approvals, package notices and restart.
  • Startup ZIP/REZ discovery through the same validated importer; new packages always start disabled. Content hashes and stable IDs prevent duplicate imports and preserve pinned copies when an archive changes.
  • Dependency/version/cycle checks, explicit declared resource overrides with user approval, deterministic ordering and a single composed resource overlay.
  • Named configurations, exact content/version pins, asset-free profile manifests, separate saves per combination and restoration of those saves when returning to a combination.
  • Staged import/profile publication, space and integrity checks, OS locking, interrupted-operation recovery, last-good fallback and preservation of pending choices after failed activation.
  • A self-contained windowless Windows helper, native launcher/restart bridge, read-only-installation user storage, trusted installation tooling, source packaging and runtime notices.
  • An optional advanced interface for previews, profile creation/renaming, detailed conflicts and troubleshooting. Ordinary installation/activation never requires that window.

Installation and build experience

Players do not install Python, pip, dependencies or another application; there is no manual extraction, original-file replacement or launch-time download. Developers build the helper with already installed Python/PyInstaller and initialize a separate managed installation from an owned, complete modern game. The original input and its saves remain untouched.

The source generates the complete ModManager/ component and its hashes/notices. No runtime binaries, retail assets, test ZIPs, imported caches, private profiles or installations are committed. The existing public disc installer is retained. This is an optional component with documented release-preparation steps; automatic inclusion in upstream nightly distributions is deliberately not enabled by this PR.

See player instructions, build/storage/license contract, package format, and qualification/provenance.

Compatibility and scope audit

All client/launcher hooks are isolated behind NOLFSRC_MODERN; seven edited reconstructed source files match upstream exactly after the project's variant stripping (canonical Git line endings). The modern build already discovers the added client source. The layout is a recipe applied to owned data, not a proprietary asset.

The optional campaign adapter and private native/gameplay launch paths were removed from the extracted framework; the packaged module inventory was inspected. No engine renderer, weapon implementation, character physics or server gameplay source is changed. The installer permits user packages under Mods while retaining checksum validation for shipped files and checks for unexpected files elsewhere.

Testing

Against this extracted contribution:

Check Result
Baseline archive/profile suite 27 passed
Extended security/profile suite 63 passed, including 10 inherited repeats
Discovery/native metadata/installer suite 25 passed, 2 host-dependent skips
Final packaged helper suite 11 passed
Modern client/server and launcher builds Passed; 211 client objects, clean upstream server sources
Launcher resource comparison / non-modern launcher compile 22 payloads unchanged / passed
Stripped reconstructed source / layout recipe 7 identical files / exact application passed

116 distinct automated cases passed, plus the actual binary integration checks. The two skips concern filesystem operations unavailable on this Windows host; archive-internal collision/link rejection is tested.

A new disposable game copy used the freshly built clean client/server/launcher and final bundled helper. Normal NOLF.exe startup, disabled discovery, invalid-package rejection, native-bridge enable/restart, and disable/restart restoring the exact original profile passed with Python absent from PATH and invalid Python environment variables. The loaded runtime DLL was verified inside the bundle; no advanced manager was used. All 29 owned clean-game inputs retained their hashes.

This run found and fixed a fast-exit restart race: an already-terminated game's retained handle can no longer cause an image-query failure to reject restart. The binary test deliberately exercises that timing; an unrelated live process remains rejected and untouched.

Earlier, the owner personally enabled a real main-menu texture ZIP through the native menu, saw its unmistakable replacement, disabled it, and saw the original return. That visual acceptance was on the verified development build. Its 119-case qualification, five private campaign checks and 624 protected-file matches remain historical evidence, not new claims about this branch. Three gameplay-specific tests and the campaign adapter are excluded here.

Limitations and redistribution

Windows x64 hosting the x86 single-player game is qualified. Linux/Wine, Steam Deck, CrossOver and Windows x86 hosts are not. The clean game-code test reused existing local modern engine/middleware binaries; it is not a fresh-OS or full-engine rebuild claim. Current binary tests exercise the native process bridge and menu INI contract, not automated mouse clicks or full-campaign acceptance.

Packages are data-only; the validator is not a sandbox for legacy asset decoders. Existing ANSI/MAX_PATH limits, printable ASCII native metadata, 64-mod/profile limits and one installed version per ID remain. Read-only release updates need deliberate migration. Advanced profile authoring remains optional desktop functionality.

The qualified helper uses CPython 3.10.11 x64 / PyInstaller 6.21.0, with CPython, Tcl/Tk, PyInstaller bootloader and app-local runtime notices. Runtime updates, signing and binary redistribution terms need release-maintainer review; the source does not alter NOLFSRC's existing mixed licensing or claim rights to retail assets.

Attribution

Credit to nolffan for NOLFSRC and its reverse-engineering foundation. This is our independently developed mod management enhancement, contributed as a complete framework for review without requiring adoption of any personal gameplay overhaul.

@nolffan

nolffan commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Hey,

Thank you for you time putting this together. I am humbled by how many people are actually interested in this little project - and remember the NOLF series of games as fondly as I do.

I have been slow to reply because I've been mulling over where I want to take this project; I think as it stands I want to make the most stable canonical release of all lithtech games, engines, and tools. This means all platforms, zero bugs, all languages, etc. At present, I do not think I am in a position support mods.

I think it would take me a lot of time to review this (which I don't have, sadly). The PR itself would need a lot of work for me to be comfortable merging it. That said, you have clearly made something which works and that people want.

I would like to suggest that you work on an alternative "nolfsrc-with-mods launcher". This way, I can focus on making nolfsrc (and the other games) the most solid foundation that I can - and you (and others!) can work on mods without me becoming a bottleneck.

Off the top of my head, it would be cool if:

  • Alternative launcher (which is cross platform)
  • GitHub can host a repository of mods
  • Launcher can download releases directly for GitHub, and auto-update
  • Specific mod versions + order can be chosen
  • Launcher can tack on client dll changes that enable mod configuration in the game

LMK what you think; and thanks again for your contribution.

nolffan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants