Jump to content

UPK Utils


wghost81

Recommended Posts

wghost, thanks for verifying that "bad" import entries added to XComStrategyGame.upk don't cause crashes. That's one piece of the puzzle, at least.

 

I hadn't thought about the issues involved with trying to declare import objects from XComGame or XComStrategyGame in a newly created script package, although that definitely makes a lot of sense. I guess I'd been thinking of using them more as library functions (accessed via class'MyMod'.default.MyFunction(), for example), but being able to access things from the existing upks would definitely make things a lot more flexible. Plus it would be necessary to read data elements from passed structures and classes.

 

Interestingly, XMTS and I are running into similar issues when trying to load existing weapon/helmet/armorkit packages. These packages have import references to elements in XComGame.upk that UDK can't resolve when trying to load them, resulting in an error. At any rate, it appears that creating new such 3D model packages will require adding import references to those packages as well. So it's definitely something that would add a lot of capabilities.

 

I'm definitely not a pro with UDK, although I'm figuring some things out. So far I've figured out how to create a new script project, although the resulting .u file isn't parsable by UE Explorer, and I've yet to figure out how to get script into a upk. But will keeping working at it.

 

And no worries about not being able to mess with UDK -- you've got enough work trying to work out Linux modding issues :)

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 235
  • Created
  • Last Reply

Top Posters In This Topic

I'm having problems with using the FIND_HEX function. This I teh result:

 

Package file: xcomstrategygame.upk
Package opened successfully!
Searching for specified data chunk ...
Data found!
Global offset: 0x003229C4 (3287492)
Invalid package offset!
Execution stopped at #4 command named FIND_HEX.

 

Resovlved used before_hex/after_hex combo instead.

Edited by Amphibious
Link to comment
Share on other sites

It works. But it depends on what you're trying to do.

 

BTW... Are you using global search or search inside an object? I don't use global package search myself, as I prefer to work with objects. So there may be some bugs I haven't noticed.

Link to comment
Share on other sites

it was nothing special something like this:

 

 

MOD_NAME=LH
AUTHOR=Amphibious
DESCRIPTION=Includes Realistic Base mod and enables realistic item production time.

UPK_FILE=xcomstrategygame.upk

FIND_HEX=F9 28 00 00 E0 25 00 00 00 00 00 00 F2 28 00 00 00 00 00 00 00 00 00 00 F9 28 00 00 00 00 00 00 D7 00 00 00 FA 16 00 00 C9 04 00 00 79 03 00 00 0F 00 F6 28 00 00 92 26 A7 12 20 2E FE FF FF 09 00 4D FB FF FF 00 02 4D FB FF FF 16 16 54 01 C9 28 00 00 90 2C 05 2C 07 16 16 54 01 CA 28 00 00 90 2C 05 2C 07 16 16 0F 00 F8 28 00 00 25 07 33 03 96 00 F8 28 00 00 2C 05 16 0F 00 F9 28 00 00 25 07 25 03 96 00 F9 28 00 00 2C 07 16 07 D3 00 9A 00 F8 28 00 00 25 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 03 06 91 02 07 81 01 9A 00 F8 28 00 00 26 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 03 07 7E 01 82 97 00 F9 28 00 00 91 2C 07 2C 02 16 16 18 0D 00 1B 36 2A 00 00 00 00 00 00 2C 4B 16 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 25 06 91 02 07 DF 01 1B 7B 17 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 03 06 91 02 07 2D 02 1B 36 2A 00 00 00 00 00 00 2C 14 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 02 06 91 02 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 25 55 00 F7 28 00 00 1D 00 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 16 0F 35 1B 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 00 F9 28 00 00 0F 35 1A 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 00 F8 28 00 00 A5 00 F9 28 00 00 16 06 75 00 A5 00 F8 28 00 00 16 06 5A 00 0F 00 F4 28 00 00 25 07 E0 03 96 00 F4 28 00 00 00 F6 28 00 00 16 0F 00 F5 28 00 00 A7 36 00 F7 28 00 00 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 10 00 F5 28 00 00 00 F7 28 00 00 01 C9 28 00 00 26 55 01 C8 28 00 00 14 00 10 00 F5 28 00 00 00 F7 28 00 00 16 40 00 F7 28 00 00 00 F5 28 00 00 26 16 A5 00 F4 28 00 00 16 06 3E 03 1B DB 2A 00 00 00 00 00 00 26 25 25 16 1B DB 2A 00 00 00 00 00 00 2C 03 2C 02 25 16 1B DB 2A 00 00 00 00 00 00 2C 02 2C 04 25 16 1B DB 2A 00 00 00 00 00 00 2C 04 2C 06 25 16 1B DB 2A 00 00 00 00 00 00 2C 06 2C 03 26 16 0F 35 17 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 2C 03 26 16 01 C9 28 00 00 26 1B DB 2A 00 00 00 00 00 00 2C 09 2C 00 26 16 07 BC 04 98 19 1B F5 10 00 00 00 00 00 00 16 0A 00 35 4F 00 00 00 1B CB 11 00 00 00 00 00 00 16 26 16 1B DB 2A 00 00 00 00 00 00 2C 0C 25 26 16 0F 10 2C 0C 19 1B

MODDED_HEX=F9 28 00 00 E0 25 00 00 00 00 00 00 F2 28 00 00 00 00 00 00 00 00 00 00 F9 28 00 00 00 00 00 00 D7 00 00 00 FA 16 00 00 C9 04 00 00 79 03 00 00 0F 00 F6 28 00 00 92 26 A7 12 20 2E FE FF FF 09 00 4D FB FF FF 00 02 4D FB FF FF 16 16 54 01 C9 28 00 00 90 2C 05 2C 07 16 16 54 01 CA 28 00 00 90 2C 05 2C 07 16 16 0F 00 F8 28 00 00 25 07 33 03 96 00 F8 28 00 00 2C 05 16 0F 00 F9 28 00 00 25 07 25 03 96 00 F9 28 00 00 2C 07 16 07 D3 00 98 00 F8 28 00 00 26 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 03 06 91 02 07 81 01 98 00 F8 28 00 00 2C 03 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 25 07 7E 01 82 97 00 F9 28 00 00 91 26 2C 02 16 16 18 0D 00 1B 36 2A 00 00 00 00 00 00 2C 14 16 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 02 06 91 02 07 DF 01 1B 7B 17 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 03 06 91 02 07 2D 02 1B 36 2A 00 00 00 00 00 00 2C 0A 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 2C 02 06 91 02 0F 35 19 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 25 55 00 F7 28 00 00 1D 00 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 16 0F 35 1B 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 00 F9 28 00 00 0F 35 1A 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 00 F9 28 00 00 00 F8 28 00 00 16 01 C9 28 00 00 00 F8 28 00 00 A5 00 F9 28 00 00 16 06 75 00 A5 00 F8 28 00 00 16 06 5A 00 0F 00 F4 28 00 00 25 07 E0 03 96 00 F4 28 00 00 00 F6 28 00 00 16 0F 00 F5 28 00 00 A7 36 00 F7 28 00 00 16 0F 35 19 05 00 00 1C 05 00 00 00 01 10 10 00 F5 28 00 00 00 F7 28 00 00 01 C9 28 00 00 26 55 01 C8 28 00 00 14 00 10 00 F5 28 00 00 00 F7 28 00 00 16 40 00 F7 28 00 00 00 F5 28 00 00 26 16 A5 00 F4 28 00 00 16 06 3E 03 1B DB 2A 00 00 00 00 00 00 26 25 25 16 1B DB 2A 00 00 00 00 00 00 2C 03 2C 02 25 16 1B DB 2A 00 00 00 00 00 00 2C 02 2C 04 25 16 1B DB 2A 00 00 00 00 00 00 2C 04 2C 06 25 16 1B DB 2A 00 00 00 00 00 00 2C 06 2C 03 26 16 0F 35 17 05 00 00 1C 05 00 00 00 01 10 1B E9 30 00 00 00 00 00 00 2C 03 26 16 01 C9 28 00 00 26 1B DB 2A 00 00 00 00 00 00 2C 09 25 26 16 07 BC 04 98 19 1B F5 10 00 00 00 00 00 00 16 0A 00 35 4F 00 00 00 1B CB 11 00 00 00 00 00 00 16 26 16 1B DB 2A 00 00 00 00 00 00 2C 0C 2C 06 26 16 0F 10 2C 0C 19 1B

Link to comment
Share on other sites

Thanks, found a bug in the code. Fixed, git repo updated. Also added an "object-oriented" uninstall files: uninstall data are now using OBJECT and REL_OFFSET key instead of OFFSET key. This should make uninstall feature compatible with ADD_NAME/IMPORT/EXPORT_ENTRY features.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...