Jump to content

UPK Utils


wghost81

Recommended Posts

Is it possible to change decimal REL_OFFSET to use base 0?

 

0x0 == 1 is a bit counter-intuitive.

 

Using base zero for decimal would also be consistent with how UE Explorer's view buffer describes locations (Location of first byte + X bytes offset starting at 0).

 

Hopefully there are still very few mods existing that would need adjusting.

Link to comment
Share on other sites

  • Replies 235
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Slowly updating UPK Utils for recent discoveries on UPK format. ExtractNameLists now has compact and verbose modes and outputs full header info.

 

Package summary example:

 

 

ExtractNameLists
Signature: 0x9E2A83C1
Version: 845
LicenseeVersion: 64
HeaderSize: 67702 (0x00010876)
Folder: None
PackageFlags: 0x208A0009
	0x00000001: AllowDownload
	0x00000008: BrokenLinks
	0x00000008: Cooked
	0x00020000: Map
	0x00800000: Imports
	0x20000000: NoExportsData
NameCount: 661
NameOffset: 0x00000110
ExportCount: 623
ExportOffset: 0x00005916
ImportCount: 142
ImportOffset: 0x0000498E
DependsOffset: 0x0000FEBA
SerialOffset: 0x00010876
Unknown2: 0x00000000
Unknown3: 0x00000000
Unknown4: 0x00000000
GUID: 85AD4BC545CE46189340EBAEAACE40D6
GenerationsCount: 1
Generation[0]:
	ExportCount: 623
	NameCount: 661
	NetObjectCount: 467
EngineVersion: 8916
CookerVersion: 721031
CompressionFlags: 0x00000000
NumCompressedChunks: 0

 

 

Export table example

 

 

0x00000001 (1): BrushComponent'DGN_DropShipSoldierSpawn.Prefabs.SoldierSpawns_DrpshipVol.SoldierSpawns_DrpshipVol_Arc0.BrushComponent0'
	TypeRef: 0xFFFFFFFC -> BrushComponent
	ParentClassRef: 0x00000000 -> 
	OwnerRef: 0x00000005 -> SoldierSpawns_DrpshipVol_Arc0
	NameIdx: 0x0000004F (Index) 0x00000000 (Numeric) -> BrushComponent0
	ArchetypeRef: 0xFFFFFFFE -> BrushComponent0
	ObjectFlagsH: 0x00000400
		0x00000400: ArchetypeObject
	ObjectFlagsL: 0x00070004
		0x00000004: Public
		0x00010000: LoadForClient
		0x00020000: LoadForServer
		0x00040000: LoadForEdit
	SerialSize: 0x0000038D (909)
	SerialOffset: 0x00010876
	ExportFlags: 0x00000001
		0x00000001: ForcedExport
	NetObjectCount: 0
	GUID: 00000000000000000000000000000000
	Unknown1: 0x00000000

 

 

Now if Amineri ask about the purpose of UPK Utils :smile: , I'll say they're aimed, first, on getting as much info from packages as possible to help analyzing their structure, and second, on using format info for "smart" upk patching.

Link to comment
Share on other sites

Found I nasty problem with patcher uninstall feature. It's kinda obvious, I'm surprised I didn't ran into this earlier.

 

Uninstaller writes the script in the same order, as it applies changes. And since all uninstall changes except renaming and move undo are written as OFFSET-MODDED_HEX pair, it never caused a problems. But when you have subsequent changes, like re-writing, which changes some offsets, and then value tweaking, which uses new offset, uninstall order should be reversed: last change have to be the first undo. Well, as I said, it's obvious and I don't know why I didn't think about it earlier. :smile:

 

I will release patcher 2.0 soon with all new cool features. :smile: And will include this fix in that release. Untill then be careful with subsequent changes! :wink:

Link to comment
Share on other sites

:thumbsup:

 

I found EXPAND_FUNCTION isn't expanding, until some hex is changed. I wanted to expand function and then play with it, but using expand without any additional changes resulted in 0 changes. Even uninstall file missed EXPAND_UNDO. I'm just reporting it, as it is small issue most people won't mind.

Edited by Drakous79
Link to comment
Share on other sites

It IS expanding, actually. Are you sure you're doing everything right? Example:

UPK_FILE=XComStrategyGame.upk
EXPAND_FUNCTION=XGStrategyAI.GetAltWeapon:300
BTW, you absolutely need to add an empty line in the end. You may use comment line like

{ the end }
I know it isn't the best solution to the "last line problem", but the good news is I've finally beaten it and new patcher will correctly parse all the lines.

 

Seems like I'm getting quite an education in the field of programming with this one. :smile:

Edited by wghost81
Link to comment
Share on other sites

Thanks, that's it! Added another line break and it works (with comment too).

 

Good news, less stuff to care about hehe.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...