Posts: 225
Threads: 27
Joined: Jan 2012
09-25-2012, 04:15 PM
(This post was last modified: 09-25-2012, 04:34 PM by eliot.)
As requested, I have taken a look at Borderlands 2. The package opens in the present public version but the functions are not decompiled at all.
I have made some progress(~2 hours) on the decompiling the BL2 functions, so far this is how it looks:
Code:
static final simulated function float FindDeltaAngle(float A1, float A2)
{
@OBJECT[1] = A2 - A1;
// End:0x45 Loop:False
if(@OBJECT[1] > 3.14)
{
@OBJECT[1] = @OBJECT[1] - 3.14 * 2.00;
// This is an implied JumpToken;
goto J0x6f;
// End:0x6f Loop:False
if(@OBJECT[1] < -3.14)
{
@OBJECT[1] = @OBJECT[1] + 3.14 * 2.00;
}
return @OBJECT[1];
return ReturnValue;
}
}
Many functions are decompiled perfectly except for those using Let tokens(Assigments =) and Local variables as you see there are none but in the UDK build there is at least one local variable named Delta, e.g:
Code:
static final simulated function float FindDeltaAngle(float A1, float A2)
{
local float Delta;
Delta = A2 - A1;
// End:0x55 Loop:False
if(Delta > 3.14)
{
Delta = Delta - 3.14 * 2.00;
}
// End:0x8b
else
{
// End:0x8b Loop:False
if(Delta < -3.14)
{
Delta = Delta + 3.14 * 2.00;
}
}
return Delta;
}
For as far as I know the local variables seem to have just dissapeared, although they've added a new array at the beginning of the functions with values I haven't figured out yet, perhaps they are the replacement for local variables.
I suppose I'll have to test more functions to get an idea of those changes
Posts: 225
Threads: 27
Joined: Jan 2012
Odd, discovered plenty of functions which still have locals that work fine, and others that don't.
Posts: 16
Threads: 1
Joined: Mar 2012
09-26-2012, 06:47 AM
(This post was last modified: 09-26-2012, 06:48 AM by AR1911.)
Nice
,
Question: Does Borderlands 2 have alot of things written in Unreal Script or is it just a massive collection of native function names?
I remember Singularity, probably one of the only games i know which has ALOT of things put into native code that could have been in the script easily (heh consoles).
Posts: 225
Threads: 27
Joined: Jan 2012
Borderlands 2 has 1426 classes and they are quite big :p
Posts: 1
Threads: 0
Joined: Sep 2012
I've been looking at Bordlands 2 a lot this week. Trying to figure out a few functions, would love to get the bytecode decompiling nicely.
Trying to fix up unhood to work properly is giving me a head ache.
Posts: 225
Threads: 27
Joined: Jan 2012
10-02-2012, 02:49 PM
(This post was last modified: 10-02-2012, 02:51 PM by eliot.)
I have built the new developer version, you can give it a try
http://eliotvu.com/files/UE-Explorer-1.2-Dev.rar
This version adds support for Borderlands 2 and Stargate Worlds.
Please report any issues here that you find with Borderlands 2, with the package, class, and function names.
Posts: 3
Threads: 0
Joined: Oct 2012
Hey eliot, love the program, but I seem to be having an issue with the Borderlands 2 classes... Few of them have any functions (it usually stops after variable declaration), and many classes have an exception similar to this:
Deserialization failed by the following exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Occurred on position:132/133
StackTrace: at UELib.UnrealPackage.GetIndexObject(Int32 objectIndex)
at UELib.Core.UClass.Deserialize()
at UELib.Core.UObject.BeginDeserializing()
Any help on this would be awesome
Posts: 225
Threads: 27
Joined: Jan 2012
(10-03-2012, 08:40 AM)ratrace135 Wrote: Hey eliot, love the program, but I seem to be having an issue with the Borderlands 2 classes... Few of them have any functions (it usually stops after variable declaration), and many classes have an exception similar to this:
Deserialization failed by the following exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Occurred on position:132/133
StackTrace: at UELib.UnrealPackage.GetIndexObject(Int32 objectIndex)
at UELib.Core.UClass.Deserialize()
at UELib.Core.UObject.BeginDeserializing()
Any help on this would be awesome
Did you try this with the new build I linked to in this thread?
Posts: 3
Threads: 0
Joined: Oct 2012
Yeah, when I load the package it has the build as "Borderlands 2", so I'm guessing that's good...
But the title bar still says UE Explorer 1.1.0.0 if that means anything (probably not) :p
Posts: 225
Threads: 27
Joined: Jan 2012
I didn't change the version number.
Are you sure you're opening the correct packages? Also make sure it's decompressed(Just incase).
Posts: 3
Threads: 0
Joined: Oct 2012
10-04-2012, 08:02 AM
(This post was last modified: 10-04-2012, 08:03 AM by ratrace135.)
Umm, I've been playing around mostly with the code packages (AkAudio, Core, Engine, GameFramework, GearboxFramework, GFxUI, and WillowGame), not sure if there's a different package I should be loading...
But yeah, the packages load (unlike the compressed ones), it's just that a lot of the classes are throwing an exception and not getting fully loaded...
Also, sorry if this is causing you trouble, I'm just really interested in the code for Borderlands 2 :p
Posts: 225
Threads: 27
Joined: Jan 2012
Most Classes/Functions decompile perfectly for me :/
Posts: 225
Threads: 27
Joined: Jan 2012
Have you tried Engine.u and decompiling the Actor class? That class decompiles 100% for me, even though it is marked red.
Posts: 225
Threads: 27
Joined: Jan 2012
FYI: I have updated the link with a new build. The new build fixes(red classes) the deserializing of classes for Borderlands 2 and many other games, while also other minor things, beware though components are broken due me trying new ways of detecting them.
Posts: 16
Threads: 1
Joined: Mar 2012
10-21-2012, 11:04 PM
(This post was last modified: 10-25-2012, 03:47 AM by AR1911.)
(10-19-2012, 06:49 AM)eliot Wrote: FYI: I have updated the link with a new build. The new build fixes(red classes) the deserializing of classes for Borderlands 2 and many other games, while also other minor things, beware though components are broken due me trying new ways of detecting them.
Which other games are supposed to work now? i tried out Special Force 2 but it still freezes when i click on any class that is red.
EDIT: also tried out homefront, it still kills my ram when trying to load the main package gcgame.upk
Posts: 225
Threads: 27
Joined: Jan 2012
(10-21-2012, 11:04 PM)AR1911 Wrote: (10-19-2012, 06:49 AM)eliot Wrote: FYI: I have updated the link with a new build. The new build fixes(red classes) the deserializing of classes for Borderlands 2 and many other games, while also other minor things, beware though components are broken due me trying new ways of detecting them.
Which other games are supposed to work now? i tried out Special Force 2 but it still freezes when i click on any class that is red.
EDIT: also tried out homefront, it still kills my ram when trying to load the main package gcgame.upk
I haven't uploaded the build which supports Special Force 2. Homefront is not supported.
Posts: 2
Threads: 0
Joined: Nov 2012
Hello eliot,
Thank you very much for this fantastic tool. I couldn't help but pledge my support via Paypal
I also wanted to let you know that I tried the latest 1.2.0 preview build from the link above on Borderlands 2 and I found that pretty much everything from WillowGame, Core and Engine decompiled successfully.
The only meaningful package I am having problems with is Startup.upk. It seems like some ArrayProperties in Startup.upk keep throwing Index out of Bounds exceptions causing most if not all of the classes in Startup.upk to be non-decompilable.
Both option in the Export menu are then greyed out. I decompressed all UPK's with Gildor's tools, so that shouldn't be the problem. Just thought I'd let you know. Looking very much forward to the final 1.2.0 version!
Thanks again for making this tool public.
Andy
Posts: 225
Threads: 27
Joined: Jan 2012
(11-23-2012, 04:43 PM)andy Wrote: Hello eliot,
Thank you very much for this fantastic tool. I couldn't help but pledge my support via Paypal
I also wanted to let you know that I tried the latest 1.2.0 preview build from the link above on Borderlands 2 and I found that pretty much everything from WillowGame, Core and Engine decompiled successfully.
The only meaningful package I am having problems with is Startup.upk. It seems like some ArrayProperties in Startup.upk keep throwing Index out of Bounds exceptions causing most if not all of the classes in Startup.upk to be non-decompilable.
Both option in the Export menu are then greyed out. I decompressed all UPK's with Gildor's tools, so that shouldn't be the problem. Just thought I'd let you know. Looking very much forward to the final 1.2.0 version!
Thanks again for making this tool public.
Andy
Thank you for your support
Great to know. Could you send me this Startup.upk file, I'd like to have a look at this issue, though it might not make it in 1.2 if the issue ain't obvious
Posts: 2
Threads: 0
Joined: Nov 2012
Startup.upk is THE main UPK file for Borderlands 2. If you have a Borderlands 2 installation already you can find it in BL2_INSTALL_DIR\WillowGame\CookedPCConsole\Startup.upk
If you don't have a BL2 install, I can send it to you, but it is about 15 MB in size.
Posts: 225
Threads: 27
Joined: Jan 2012
(12-07-2012, 12:00 AM)andy Wrote: Startup.upk is THE main UPK file for Borderlands 2. If you have a Borderlands 2 installation already you can find it in BL2_INSTALL_DIR\WillowGame\CookedPCConsole\Startup.upk
If you don't have a BL2 install, I can send it to you, but it is about 15 MB in size.
I don't own BL2.