Show mod diff status and file versions in the join data window - #972
Open
romangr wants to merge 1 commit into
Open
Show mod diff status and file versions in the join data window#972romangr wants to merge 1 commit into
romangr wants to merge 1 commit into
Conversation
Color both mod lists by diff status: mods the client is missing are red on the server list, while extra mods (orange) and mods loaded out of relative order (yellow) are flagged on the client list, since reordering is resolved locally. Out-of-order mods are found with a longest-common-order pass so a single displaced mod doesn't mark everything after it. A legend between the two lists explains the colors. Leaf file nodes in the Files tab gain a tooltip showing each side's last write time, plus the assembly, file and product versions for .dll files. The host reads these when snapshotting mod files and sends them along in ClientInitDataPacket. They are kept out of ModFile equality so they never affect the diff itself, which stays keyed on relative path and hash. New keys: MpMismatchModListWrongOrder, MpMismatchFileAssemblyVersion, MpMismatchFileVersion, MpMismatchFileProductVersion, MpMismatchFileModified, MpMismatchFileUnknown (added in the locale repo, pointer bump pending). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
When a join fails on a mod mismatch, the Data mismatch window doesn't give the player enough to act on.
The two mod lists are drawn almost entirely in white: the server list marks a mod red only when
ModInfo.Installedis false, and the client list has no coloring at all. There's no way to see at a glance which mods are extra, which aremissing, and which are merely in the wrong load order.
Installedalso resolves throughIsModInstalledCached(packageId), which ignoresContentSource, whileRemoteData.CompareModskeys on(packageId, source). A mod present on both sides but installed from different sources — Steam workshop vs a localMods/folder — therefore fails the set comparison and blocks the join, yet is drawn white as if it matched.In the Files tab, a mismatched
.dllreports only that the hash differs. The usual cause is one side running a newer build of the mod, but the window shows neither a version nor a file date, so nothing indicates which side is stale.Change
Both mod lists are colored by diff status, keyed on
(packageId, source)so the coloring agrees withCompareMods:Wrong order is flagged on the client list only, since reordering is something the client resolves locally; the server list only marks missing mods. The out-of-order set comes from a longest-common-order pass — a longest-increasing-subse
quence over the local positions of the common mods, taken in server order — so a single displaced mod doesn't mark every mod after it. A legend between the two lists explains the colors.
Leaf file nodes in the Files tab gain a tooltip listing each side's last write time, plus the assembly, file and product versions for
.dllfiles. The host reads these while snapshotting mod files and sends them along inClientInitDat aPacket. They are kept out ofModFileequality, so they stay display-only and never affect the diff itself, which remains keyed on relative path and hash.Testing
dotnet build Source/Multiplayer.sln -c Releaseis clean and the test suite passes (158/158). Behavior was verified by joining a host with mods that were missing, extra, reordered and installed from a different source, and with a.dlldiffering only by build — see the screenshots above. Platform-independent, though it was exercised on macOS/arm64.It was checked together with other changes, to be tested in isolation
Follow-up
New i18n keys:
MpMismatchModListWrongOrder,MpMismatchFileAssemblyVersion,MpMismatchFileVersion,MpMismatchFileProductVersion,MpMismatchFileModified,MpMismatchFileUnknown. These are added in the locale repo; theLanguage ssubmodule pointer bump is still pending, so the new labels render as raw keys until that lands.