Gildor's Forums

Author Topic: Upk file format (Rocket League)  (Read 818 times)
thoo0224
Newbie
*
Posts: 7


View Profile
Upk file format (Rocket League)
« on: November 15, 2021, 03:26 »

Hello, I'm trying to read packages from Rocket League (UE3) but I can't get any further than the Exports.

This is what I'm reading
```
            ClassIndex = archive.Read<int>();
            ParentIndex = archive.Read<int>();
            PackageIndex = archive.Read<int>();
            ObjectName = archive.ReadFName(package);

            ArcheType = archive.Read<int>();
            ObjectFlags = archive.Read<ulong>();

            SerialSize = archive.Read<int>();
            if (SerialSize > 0)
            {
                SerialOffset = archive.Read<int>();
                SerialOffset = archive.Read<int>();

                Debug.Assert(SerialOffset == 0);
            }

            ExportFlags = archive.Read<uint>();
            NetObjectCount = archive.ReadArray<int>();
            Guid = archive.Read<FGuid>(); // 16 bytes

            archive.Seek(4, SeekOrigin.Current);
```

With every export, SerialOffset, NetObjectCount and Guid are 0. However the Indexes like Object Name are right.
« Last Edit: November 15, 2021, 11:39 by Gildor » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Upk file format
« Reply #1 on: November 15, 2021, 11:38 »

Looking at code which was contributed (I'm not the author) for Rocket League support in UModel, there's encryption of package header (FPackageFileSummary), starting with Summary.NameOffset.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #2 on: November 15, 2021, 11:41 »

Yes, I'm already decrypting it.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #3 on: November 15, 2021, 11:47 »

I can read the imports and the names, but reading the exports of some packages work (the offset, guid etc are still null), and with some i'm getting an exception because NetObjectCount is a very large number.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Upk file format (Rocket League)
« Reply #4 on: November 15, 2021, 11:58 »

Check if these packages works in UModel. If they do - then just try using debugger to trace over UModel's code and see what happens inside.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #5 on: November 15, 2021, 12:10 »

Yes they do work with UModel, I already tried to debug, but I got errors with compiling UModel.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #6 on: November 15, 2021, 13:53 »

Okay, I fixed the error with the debugging. I'm reading the exact same as UModel but a lot of my values are 0.



Could compression or decryption be the problem? I'm not very experienced with it, although It's strange that values like indexes are right.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #7 on: November 15, 2021, 16:40 »

I found the issue, I was assigning the serial offset stopper to SerialOffset as Rocket League uses 64 bit offsets. But about the other problem, there's 347 exports but at the 100th export the ObjectName is "None", after that there's `A` and than at the NetObjectCount it crashes. I debugged in UModel and it's skipping "A", and I can't figure out how and where.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7971



View Profile WWW
Re: Upk file format (Rocket League)
« Reply #8 on: November 15, 2021, 16:46 »

A little hint. In UModel's UnPackage.h, you may enable this line:
Code:
//#define DEBUG_PACKAGE 1
and you'll get some logging of package file structures. This might be helpful in your case.
Logged
thoo0224
Newbie
*
Posts: 7


View Profile
Re: Upk file format (Rocket League)
« Reply #9 on: November 15, 2021, 18:02 »

I can still not figure it out.  Sad
Logged
Jump to:  

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