Open
Conversation
Two fixes for parsing cooked assets from UE4.27 games that use IoStore: 1. ObjectVersionUE5 enum panic: UE4.27 files with legacy_file_version <= -8 write a small integer (e.g. 1) in the UE5 version field. The enum has no variant between UNKNOWN (0) and INITIAL_VERSION (1000), causing TryFromPrimitive to fail. Fix: fall back to UNKNOWN for unrecognized values. 2. Compression block count rejection: UE4.27 cooked assets use Zlib compression with non-zero block counts. The parser hard-rejected these. Fix: skip the FCompressedChunk entries (16 bytes each) instead of erroring. These fixes enable tools like Stove to open cooked .umap files from UE4.27 games such as Return to Moria and DeltaForce. Fixes bananaturtlesandwich/stove#39 Co-Authored-By: Claude Opus 4.6 <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.
Summary
Fixes two issues that prevent parsing cooked assets from UE4.27 IoStore games (e.g. Return to Moria, DeltaForce):
ObjectVersionUE5 enum panic: UE4.27 files with
legacy_file_version <= -8write a small integer (e.g.1) in the UE5 version field. TheObjectVersionUE5enum jumps fromUNKNOWN = 0toINITIAL_VERSION = 1000with no variants in between, soTryFromPrimitivepanics. Fix: fall back toUNKNOWNfor unrecognized values instead of propagating the error.Compression block count hard rejection: UE4.27 cooked assets use Zlib compression and have non-zero
compression_block_count. The parser returned an error for any value > 0. Fix: skip theFCompressedChunkentries (16 bytes each: two i64 fields) so parsing can continue.Context
This is blocking bananaturtlesandwich/stove#39 — Stove (the cooked .umap editor) cannot open any UE4.27 map files due to these two errors in
unreal_asset.Changes
unreal_asset/src/asset.rsline 568:try_into()→try_into().unwrap_or(UNKNOWN)for ObjectVersionUE5unreal_asset/src/asset.rslines 675-678: Skip compression block entries instead of rejectingTest plan
🤖 Generated with Claude Code