Jump to content

UPK file format


wghost81

Recommended Posts

  • Replies 111
  • Created
  • Last Reply

Top Posters In This Topic

Hmm. Does that mean the initial null object is not automatically created by the existing decompiler tools, and is a recommendation to be adopted manually? If so, I should rewrite that section in the article.

 

-Dubious-

It's more like an internal programming thing.
Link to comment
Share on other sites

Dubious, this is more of a detail for those wishing to write utilities to parse the upk themselves. For the user of a tool such as UE Explorer or wghost81's tools everything is handled automatically.

 

I'm pretty sure the reason that the Export/Import lists start at index 1 instead of zero is that they occupy the same number space -- Export starts at 1 and counts up, while Import counts at -1 and goes down. If they started at 0 there would be a collision where the 0 value reference could ambiguously be from either list.

Link to comment
Share on other sites

Some updates on format:

First 3 fields of ExportList (aka ObjectList) entry are signed integers:

  • int32 ObjTypeRef
  • int32 ParentClassRef
  • int32 OwnerRef

All those are references to corresponding object lists: if > 0 — to ExportList, if < 0 — to Import List.

 

3rd field of ImportList entry is an index to NameList table, defining an object type:

  • uint32 ObjTypeIdx

1st field is also an index to NameList table, so it is better defined as:

  • uint32 PackageIDidx
Link to comment
Share on other sites

 

Some updates on format:

 

First 3 fields of ExportList (aka ObjectList) entry are signed integers:

  • int32 ObjTypeRef
  • int32 ParentClassRef
  • int32 OwnerRef

All those are references to corresponding object lists: if > 0 — to ExportList, if < 0 — to Import List.

 

3rd field of ImportList entry is an index to NameList table, defining an object type:

  • uint32 ObjTypeIdx

1st field is also an index to NameList table, so it is better defined as:

  • uint32 PackageIDidx

 

Okay, I've added this where I think it's appropriate to the wiki article, but I'm sure everyone would appreciate it if you verified it's accuracy. I'm not clear if your last entry refers to the '1st field' of the ExportList, but am assuming so as you didn't reference any other collection of fields.

 

I also want to add a word of caution: when we have to cross reference between several sources of information (such as the various references to the file format), it really helps if they use the same terminology. For instance, you refer to the 'Name List', the 'Export List', and the 'Import List' and sometimes as arrays. But the Epic Games description refers to them as 'tables'. Sometimes those terms have very specific meanings as to how they are interpreted in code. If you are going to use terms interchangeably, you should probably mention the fact or whose terminology you elect to utilize.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

dubiousintent, I'll try to bring my terminology in order and clarify things. Can I edit wiki article directly?

 

UPD Found a small login url in top right corner. :smile: Will try to edit wiki article and bring everything in order. :smile:

Edited by wghost81
Link to comment
Share on other sites

I know. Documentation is a pain, always, but such attention to details reduces confusion.

 

Yes indeed you can edit directly. Can't recall if you need to create another account there, especially since the 'cloud consolidation', but I think any Nexus account will work. Try that first.

 

If you can't figure out the formatting from what is there, when you are editing the page (and it makes a difference if you select the 'edit' tab at the top: loads the whole page; or the link at the end of each section header: loads only that section), at the very bottom of the page to the right of the grey/white buttons is a gold link to a page with edit help. And you can always ask me for explanations.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Edited wiki article. dubiousintent, could you, please, correct typos/formatting? I'm not very good at this. :smile:

 

Also, be careful, when adding info from other (non-XCOM) sources, as it not always correspond with what can be actually seen in UPK.

Edited by wghost81
Link to comment
Share on other sites

Edited wiki article. dubiousintent, could you, please, correct typos/formatting? I'm not very good at this. :smile:

 

Also, be careful, when adding info from other (non-XCOM) sources, as it not always correspond with what can be actually seen in UPK.

You did fine. Only found one (minor) format correction.

 

Good point about other sources. (And why we need people to cross check.) Added this to the 'Separate Content' section.

 

One more bit I think could use clarification (I'll be happy to add it): are the various 'Offsets' from "the beginning of the Header", or the point of the entry in the Header?

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...