Skip to content

Normalize: Pathfinder: Kingmaker#23249

Draft
halgari wants to merge 5 commits into
masterfrom
normalize/game-pathfinderkingmaker
Draft

Normalize: Pathfinder: Kingmaker#23249
halgari wants to merge 5 commits into
masterfrom
normalize/game-pathfinderkingmaker

Conversation

@halgari
Copy link
Copy Markdown
Contributor

@halgari halgari commented May 19, 2026

Summary

Normalize game-pathfinderkingmaker extension per project checklist.
1:1 behavioral replacement, no feature changes. Introduces @vortex/game-extension-helpers shared library.

Changes

  • Converted from JavaScript to TypeScript with strict null checks
  • Replaced queryPath (steam.findByAppId) with queryArgs shorthand for Steam 640820
  • Removed Bluebird dependency
  • Moved winapi-bindings from top-level import to lazy require inside readRegistryKey
  • Removed process.platform guard (setup only runs on discovered Windows game)
  • Converted gameart.jpg and umm.png to WebP
  • Added rolldown build.mjs and tsconfig.json
  • Dropped redundant mergeMods (defaults to true), environment.SteamAPPId, and details.steamAppId (auto-derived from queryArgs.steam)
  • Replaced runtime requireExtension("modtype-umm") with compile-time imports from @vortex/game-extension-helpers

New package: @vortex/game-extension-helpers

Shared library at packages/game-extension-helpers/ providing:

  • registerUmmSupport(context, gameIds, options): registers UMM tool installer + mod type via TypeScript imports (no runtime extension dependency)
  • registerDefaultModInstaller(context, id, gameIds): explicit catch-all copy installer at low priority, replacing Vortex's implicit built-in fallback

Designed to be reused by all Unity Mod Manager games (pathfinderkingmaker, pathfinderwrathoftherighteous, dawnofman, gardenpaws, oni).

Test integration

  • Opted into @vortex/game-extension-test framework
  • Tested against all 2424 active files on Nexus Mods
  • 2415 fixtures passed, 9 skipped (7 CDN unavailable, 2 directory-only source archives)
  • 1 healthcheck: pfk-mod-has-files (validates installer produced output)
  • Fixed harness proxy to handle requireExtension as a no-op

Skipped files

Reason Example fixture Count
CDN manifest unavailable various 7
directory-only manifest (source code) modId=109 fileId=1047 2

Verification

  • Independent review subagent verified no regressions
  • Steam discovery path preserved (Steam 640820)
  • Setup behavior unchanged (ensureDirWritable + UMM registry check + dialog)
  • Typechecks clean, builds clean

LAZ-297

halgari added 5 commits May 19, 2026 13:29
Apply normalization checklist: convert to TypeScript, replace queryPath
with queryArgs (Steam 640820), remove Bluebird dependency, remove
winapi-bindings top-level import (lazy-require in readRegistryKey),
remove process.platform guard, convert images to WebP, drop redundant
mergeMods/environment.SteamAPPId/details.steamAppId. Add rolldown
build.mjs and tsconfig.json. 1:1 behavioral replacement with no
feature changes.

Not opted into game-extension-test framework: this extension has no
custom installer (installation is handled by the modtype-umm extension).

LAZ-297
Add default copy-all installer fallback in the test harness for game
extensions that rely on external mod-type extensions (e.g. modtype-umm)
for installation. Also handle requireExtension as a no-op in the stub
context proxy.

Add test descriptor, healthcheck, and opt into game-extension-test for
Pathfinder: Kingmaker. All 2417 Nexus fixtures pass.

LAZ-297
Create shared library at packages/game-extension-helpers/ providing:
- registerUmmSupport: UMM tool installer + mod type, imported via TS
- registerDefaultModInstaller: explicit catch-all copy installer

Replaces runtime requireExtension("modtype-umm") with compile-time
imports. Each game extension is now self-contained with no transient
runtime dependencies outside the TypeScript module graph.

Update game-pathfinderkingmaker to use the shared library. Revert
the harness default-copy fallback (extensions register their own
installers explicitly now). Fix harness proxy to handle
requireExtension.

2415 Nexus fixtures pass, 9 skipped (7 CDN-unavailable, 2
directory-only source code archives).

LAZ-297
…nstallers

Add content-type-specific installers that route files to the correct
location instead of dumping everything into the game directory:

- Portrait installer (priority 25): detects Small/Medium/Fulllength.png,
  deploys to LocalLow/Owlcat Games/Pathfinder Kingmaker/Portraits/
- Save installer (priority 30): detects .zks files, flattens to
  LocalLow/Owlcat Games/Pathfinder Kingmaker/Saved Games/
- Default copy-all (priority 200): catch-all for regular UMM mods

Add healthchecks validating each content type:
- pfk-mod-has-files: all mods produce at least one file
- pfk-portrait-has-canonical-files: portrait mods contain the expected PNGs
- pfk-save-has-zks: save mods contain .zks files

Remove harness default-copy fallback (extensions register their own
installers explicitly now).

2415 Nexus fixtures pass, 9 skipped.

LAZ-297
- Fix misleading comments in getPortraitPath/getSavePath that described
  a fallback strategy the code doesn't implement
- Use lastIndexOf in installUmmTool to avoid incorrect path stripping
  if a parent directory name matches the exe
- Lift full method signatures onto UmmContext and InstallerContext
  interfaces, removing redundant body casts in both helpers
- Document intentional non-portrait file filtering in installPortrait
@github-actions
Copy link
Copy Markdown

This PR has conflicts. You need to rebase the PR before it can be merged.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant