Skip to content

feat(installed): flag mods that ship outdated vdata - #419

Merged
Slush97 merged 4 commits into
mainfrom
feat/outdated-vdata-warning
Oct 4, 2026
Merged

Slush97 merged 4 commits into
mainfrom
feat/outdated-vdata-warning

Conversation

@Slush97

@Slush97 Slush97 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

A mod that ships a game .vdata_c (scripts/heroes.vdata_c, scripts/abilities.vdata_c) replaces the whole file in game. Anything Valve added after the mod was built goes missing, e.g. a new hero's abilities. This flags those mods on the Installed page.

Uses vpkmerge vdata-check from Slush97/vpkmerge#47, released in v0.20.0. The pin in scripts/fetch-vpkmerge.mjs is bumped to v0.20.0 with the three new sha256s.

How it works

  • electron/main/services/vdataCheck.ts: after each get-mods, a queued background pass reads the VPK directory trees through the shared parse cache. Only mods that contain a .vdata_c go to vpkmerge vdata-check --json, 50 per spawn to stay under the Windows command line limit, so most libraries never spawn it.
  • Results are keyed on each mod's path, size and mtime, follow the file through renames (toggle, reorder, Global, launch stash) and are forgotten on delete. They all reset when pak01_dir.vpk changes (a game update).
  • Results are matched by path. A mod that fails to open comes back with an error and is just marked checked, so it never hides the rest of a batch. A failed run marks its files as checked until they change, so it doesn't spawn again on every scan.
  • enrichMod attaches outdatedVdata to the wire Mod, same pattern as safety. When a check changes what any card shows (a warning appears or clears), main sends mod-vdata-checked and Layout reloads mods silently.
  • Only fields the mod deletes are flagged. Fields only the mod has (the game dropped them) and value-only differences are not, since those can't be told apart from the mod's intended edits.

UI

  • ModCard: "Outdated data" tag in grid (overlay) and list (inline) views. Amber while the mod is disabled, red while it is enabled. The tooltip gives the file, how many game fields the mod removes, and the first few paths. Group cards prefer an enabled flagged variant.
  • Installed top bar: a red "N outdated mods" button when any enabled mod is flagged, next to Conflicts. It opens a list of those mods with what each removes, plus Disable and Disable all.
  • A warning toast when the user enables a flagged mod.

No network use; everything is local.

Testing

  • tsc -b, eslint, ui:check, i18n:check and vitest (141 files, 1772 tests) pass. Manifest regenerated. New vdataCheck.test.ts covers: no spawn for a library without vdata, flag once, extra-only not flagged, one failed mod in a batch, no respawn after a failed run, change drops the warning, rename keeps it, game update clears it, batches of 50.
  • Ran a dev build against a real install with 64 mods and the v0.20.0 CLI. Two disabled mods are flagged: an emotes mod whose heroes.vdata_c predates the 2026-09-29 hero batch (104 missing fields, including Rat King's ability slots and the new lifesteal stat in every hero) and a Plague Doctor Graves skin missing 9 whole heroes. The tag, toast, top-bar button and list were checked by hand in that dev build.
  • node scripts/fetch-vpkmerge.mjs downloads v0.20.0 and the sha256 check passes.

A mod that ships a game .vdata_c (scripts/heroes.vdata_c, ...) replaces
the whole file, so anything Valve added after it was built is deleted in
game. After each get-mods, a background pass runs `vpkmerge vdata-check`
on mods whose VPK contains a .vdata_c and shows an "Outdated data" tag
on flagged cards, with the removed fields in the tooltip. Results are
keyed on file size and mtime and reset when pak01 changes.
- Results follow a VPK through renames (toggle, reorder, Global) and are
  forgotten on delete, so the tag no longer flickers and vpkmerge is not
  respawned on every toggle.
- Mods go to vpkmerge 50 at a time (Windows argv limit), results are matched
  by path, and a mod that fails to open no longer hides the rest of a batch.
- The renderer reloads whenever a check changes what a card shows, so a
  warning that a game update clears goes away too.
- Only fields a mod deletes are flagged; fields the game dropped are not.
- Enabled outdated mods get a red tag, an "N outdated mods" button on
  Installed that lists them with Disable / Disable all, and a warning toast
  when one is enabled.
@Slush97
Slush97 marked this pull request as ready for review October 4, 2026 11:01
…arning

# Conflicts:
#	src/locales/manifest.json
@Slush97
Slush97 merged commit 9f70fc1 into main Oct 4, 2026
1 check passed
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.

1 participant