Although I don't think it will matter for this specific concern, the game I'm looking at is
Omno*** ERROR: Unversioned UE4 packages are not supported. Please restart UModel and select UE4 version in range 14-27 using UI or command line.
I thought that
umodel -pkgver=14 foo.uasset (or a different version) would potentially resolve this, but it has no apparent effect. Maybe I'm using the wrong option to satisfy this error message? If so, I'd appreciate a hint. If not, though...
I looked into the source and see that the
pkgver option sets
GForcePackageVersion, but the code path toward
UE4UnversionedPackage() and that error message never checks that. Instead it seems to only honor
GForceGame.
My initial effort to implement support for this option here was the following patch, which did get past the error but then predictably failed in the actual extraction, which would be a subject of a game-specific post.
diff --git a/Unreal/UnrealPackage/UnPackage4.cpp b/Unreal/UnrealPackage/UnPackage4.cpp
index 340d044..9643363 100644
--- a/Unreal/UnrealPackage/UnPackage4.cpp
+++ b/Unreal/UnrealPackage/UnPackage4.cpp
@@ -112,6 +112,9 @@ void FPackageFileSummary::Serialize4(FArchive &Ar)
FileVersion = Version & 0xFFFF;
LicenseeVersion = LicenseeVersion & 0xFFFF;
+ if (GForcePackageVersion)
+ FileVersion = GForcePackageVersion;
+
// store file version to archive
Ar.ArVer = FileVersion;
Ar.ArLicenseeVer = LicenseeVersion;