EliotVU / Unreal-Library

UnrealScript decompiler library for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3
MIT License
367 stars 86 forks source link

Gigantic Support #75

Closed HyenaCoding closed 5 months ago

HyenaCoding commented 6 months ago

Hi, I was wondering if it'd be possible to get support for Gigantic (Rampage Edition)? The game is build in Unreal Engine 3, and it'd be nice to see into the game's files as the original developers have long moved onto other projects.

I know that Gildor's UE Viewer has Gigantic support, though it seems to be for an older liscensee version it still works as afar as I can tell.

I've tried to add support myself, but beyond aligning the buffer at the start so it reads the correct inputs and adding in a JsonRefProperty default property, I'm not sure how to further improve support for the game.

EliotVU commented 6 months ago

That would be nice, if you have a working patch, feel free to submit a pull request.

HyenaCoding commented 6 months ago

Submitted a pull request with what I have at the moment, which is mostly just the Package Deserialization. https://github.com/EliotVU/Unreal-Library/pull/79 I appologies if this is not correct, I'm unfamiliar with GitHub as I do not use it.

I don't think objects load correctly, a lot of them are exports but don't appear in Objects. In older editions of UEExplorer they did appear under a "Content" tab, but don't since I switched to trying to build this for the latest version. Some objects throw deserialization errors, such

I added a JsonRefProperty as that seems to be a property added to handle moving Json values about which are relevant to objects, such as configurations for hero upgrades and abilities. It seems to be an Array Size(12Bytes)+Array Index of 0+Name of an Object(8 Bytes)+The Object(4 Bytes). Name might be optional?

Doesn't seem to work well with arrays, for example in the DYNPAWN_Shadow_SF file (A file containing data for one of the game's heroes) their 2nd ability has a line of "OnSkillFire". This has Array Type not detected. When declared as Array of Struct Property, shows 3 structs inside: Conditions, ExclusionConditions, Actions. Each of these then also need to be declared as Arrays of JsonRefProperty to show their actual content.

I'm fairly sure that JsonRefProperty is just a Map, but when I tried making it so it interpreted it as just a Map property, it threw casting errors at me. I feel like submitting my findings regarding the packet headers and seeing if it's of any interest is better than me just trying to take stabs in the dark without having the necessary knowledge of the code or Unreal Engine until it works.

I can send some of the game's core UPK files if that helps, but I'm not incredibly familiar with any of this stuff, I'm not even super confident with the package deserialization; it seems to match the same values as Gildor's UE Extractor, assuming those are correct, and gets the correct values for engine version as it matches with what I can find in a Build.Properties file in the gamefiles (EngineVersion=19100).