Skip to content

Conversation

@Masusder
Copy link
Contributor

@Masusder Masusder commented Jul 5, 2025

I have implemented a Diff Viewer for side-by-side comparison and visualization of assets from two game builds.

To add it I had to refactor core of the app unfortunately, as obviously FModel was designed to load and work with only a single game build at a time. Although, I think many would love to have this feature.

Below is quick overview of everything I added:

  • Settings, ability to load second game build (can be null). I made it an expandable button, so it won't bother anyone who isn't interested in this option. It's saved to app settings just as usual game build would be, mappings can be only set after first save.

image

  • Diff viewer option. It's disabled by default if second game build isn't configured.

image image

  • Diffs are computed via DiffPlex library, for large assets (150k+ lines) I've added chunking to handle the quadratic complexity problem (O(N²)), more chunks are loaded as you scroll to the bottom. Unfortunately this approach loses full diff aligment, but it's better than not having support for large assets at all.

image
image

  • Viewer comes with expandable navigation bar on the right side which you can use to quickly find content that was changed.

image

  • I've reused searchbar from AvalonEditor.

image

  • In case compared assets are identical, appropiate message will be shown. Images are compared by visual hash approach instead, because I don't want to show users images that visually look identical.

image

  • If given asset path doesn't exist anymore, but asset with the same name exists in different directory, user will be given option to select one of these files manually. That's because file might have been simply moved and still exists under different directory.

image

  • Backups are now divided into two categories - Lite/Heavy. Lite backup works just like before, while Heavy backup copies currently selected game directory into folder of user choice. User will be notified how much space it's going to take and in case there's not enough warning will be displayed instead. Backup creation buttons are now blocked until backup is finished.

image image
image

Other info:
I've split CUE4ParseViewModel into multiple files, simply because it was huge and this way it's easier to maintain in my opinion, especially that now it handles two Providers.
I haven't tested any game that uses dynamic AES keys, so no idea if AES settings will work for these.

There's a chance I might have broken something along the way and haven't noticed (mainly talking about Provider logic), so it would be great if you let me know.

I really hope this PR could be included officially. I shared it to a couple of people for testing and they all found this feature very useful.

Masusder added 26 commits June 7, 2025 22:33
Big mess right now, but working
Still need to add searchbar
Proto image diff viewer
View Diff option won't be enabled if compared build isn't set
Improved diff tabs behavior

(I still need to add AES settings for compared build)
Moved search bar logic from AvalonEditor to AvalonSearchbar (which I previously isolated for diff viewer)
@AllyJaxx
Copy link
Contributor

image image

As you suggested, games with AES keys (in this case an old version of Fortnite) do not work as expected here, with no option to add a key either as far as I can tell.

@4sval
Copy link
Owner

4sval commented Jul 10, 2025

the dedication to make this work on top of the current outdated architecture is crazy
so is the time the review will take

@Masusder
Copy link
Contributor Author

@AllyJaxx Dynamic AES keys configuration should work now, thank you for the samples

@Masusder
Copy link
Contributor Author

I made some further improvements

Compared game build can now also be selected from directory selector (feature requested by @AllyJaxx):

NzhEpP5

Instead of forcing loading of diff chunks when scrolled to the bottom, users can now choose whether to load more chunks and how many to load at a time:

image

@0belous
Copy link

0belous commented Oct 5, 2025

Bump this
I would love to see this feature

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.

4 participants