Repository navigation
feat(installed): flag mods that ship outdated vdata - #419
Merged
Merged
Conversation
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
marked this pull request as ready for review
October 4, 2026 11:01
…arning # Conflicts: # src/locales/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-checkfrom Slush97/vpkmerge#47, released in v0.20.0. The pin inscripts/fetch-vpkmerge.mjsis bumped to v0.20.0 with the three new sha256s.How it works
electron/main/services/vdataCheck.ts: after eachget-mods, a queued background pass reads the VPK directory trees through the shared parse cache. Only mods that contain a.vdata_cgo tovpkmerge vdata-check --json, 50 per spawn to stay under the Windows command line limit, so most libraries never spawn it.pak01_dir.vpkchanges (a game update).errorand 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.enrichModattachesoutdatedVdatato the wireMod, same pattern assafety. When a check changes what any card shows (a warning appears or clears), main sendsmod-vdata-checkedandLayoutreloads mods silently.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.No network use; everything is local.
Testing
tsc -b, eslint,ui:check,i18n:checkand vitest (141 files, 1772 tests) pass. Manifest regenerated. NewvdataCheck.test.tscovers: 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.heroes.vdata_cpredates 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.mjsdownloads v0.20.0 and the sha256 check passes.