Skip to content

Conversation

@hypermodule
Copy link
Contributor

This is to make to-zen work for assets produced with UE 5.5.

I would have liked to add a test_zen_asset_identity_conversion test for this, but the test I tried to add failed because e.g. the name map had a slightly different order than the one produced by UE (one entry would be at a different index than in the editor's version). Does retoc aim to always produce the same ordering as the editor for the various maps?

From manual testing it seems to work (tested with the third person example and with Borderlands 4).

@trumank trumank force-pushed the data-resource-cooked-index branch from 1a3e13d to e9cd200 Compare September 24, 2025 03:01
@trumank
Copy link
Owner

trumank commented Sep 24, 2025

I took the liberty of finally running cargo fmt on the repo and rebased this PR.

Does retoc aim to always produce the same ordering as the editor for the various maps?

If it's reasonable to do, yes. Binary compatibility isn't preserved everywhere, but it makes testing a lot easier in places where it is. Please add the test and I'll investigate why it's failing and see if it's something that can be fixed.

@hypermodule
Copy link
Contributor Author

Please add the test and I'll investigate why it's failing and see if it's something that can be fixed.

Thanks, I've added two test cases now: a texture asset and a static mesh, both produced with UE 5.5.4. The .uzenasset files I obtained by using retoc v0.1.2's unpack command (renaming the resulting .uasset files to .uzenasset), let me know if that was the wrong way of going about it, it was a guess on my part. 😄

@trumank
Copy link
Owner

trumank commented Sep 24, 2025

More annoying than name map: imported packages should be sorted by package ID, which I believe I have fixed. I need to go back and test conversion on a 4.27 game to be confident in the change.

Also if it's not too much trouble, it would be great to have a larger test asset with more names and more imported packages. Sorting two imports isn't very comprehensive. 😆

@hypermodule
Copy link
Contributor Author

More annoying than name map: imported packages should be sorted by package ID, which I believe I have fixed.

Nice! 👍

Also if it's not too much trouble, it would be great to have a larger test asset with more names and more imported packages. Sorting two imports isn't very comprehensive. 😆

Hehe, fair enough. 😄 I've added a larger test asset now (which triggers a new test failure). Let me know if I can help further.

@trumank trumank force-pushed the data-resource-cooked-index branch from 8e8e040 to 103a4ad Compare September 25, 2025 05:43
@trumank trumank merged commit d273a01 into trumank:master Sep 25, 2025
5 checks 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.

2 participants