1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE1 - UT UT Package signature

Discussion in 'Programming' started by Zur, Mar 19, 2009.

  1. Zur

    Zur surrealistic mad cow

    Joined:
    Jul 8, 2002
    Messages:
    11,717
    Likes Received:
    4
    I'm trying to create a utility in Java to read the information contained in a package file.

    However, the information on the link below doesn't seem to correspond. For example, the signature at the start should be "0x9E2A83C1" but it's not.

    Am I doing things wrong or was the format changed after this was written ?

    http://wiki.beyondunreal.com/Legacy:Package_File_Format
     
    Last edited: Mar 20, 2009
  2. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,915
    Likes Received:
    36
    Open packages with a hex editor to see the real thing. Keep in mind that Java, unlike most other programming languages, uses big-endian byte order by default. The Unreal package file format is defined to use little-endian, though.
     
  3. Zur

    Zur surrealistic mad cow

    Joined:
    Jul 8, 2002
    Messages:
    11,717
    Likes Received:
    4
    Good remark. I'll see if it's possible to convert from little-endian to big-endian.
     
  4. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,915
    Likes Received:
    36
    Either use "Integer.reverseBytes(in.readInt())" or simply read the value byte-wise and use bit-shifting and bitwise OR to combine them in little endian order.
     

Share This Page