Gildor's Forums

Author Topic: pkgver option doesn't have expected effect  (Read 80 times)
sparr
Newbie
*
Posts: 1


View Profile
pkgver option doesn't have expected effect
« on: April 14, 2023, 03:44 »

Although I don't think it will matter for this specific concern, the game I'm looking at is Omno

Code:
*** 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.

Code:
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;
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1929


View Profile
Re: pkgver option doesn't have expected effect
« Reply #1 on: April 14, 2023, 04:46 »

@sparr: Not sure what you're trying to do. pkgver is designed for previous engine versions, for UE4 you can use -game=ue4.20 or other version or specific override, obtained through -taglist, to force respective version for either package or separate asset.
« Last Edit: April 14, 2023, 04:48 by spiritovod » Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS