Jump to content

UE Explorer 1.2 Suggestions


EliotVU

Recommended Posts

Thanks a lot for the tool. Being able to browse the code to spot/fix bugs is really great.

 

I have one question though. I'm not sure if it's due to the tool or my average coding skills, but I have hit several dead ends when searching for several key functions.

For instance under XComGame.upk, I'm looking for isHuman() and IsAlien().

 

First, I've reached this point under XGUnitNativeBase class:

simulated event bool isHuman()
{
    return class'XGGameData'.static.isHuman(GetPawnType());
    //return ReturnValue;    
}

simulated event bool IsAlien()
{
    return class'XGGameData'.static.IsAlien(GetPawnType());
    //return ReturnValue;    
}

So I checked under XGGameData class and found the following:

// Export UXGGameData::execisHuman(FFrame&, void* const)
native static function bool isHuman(XGGameData.EPawnType PawnType);

// Export UXGGameData::execIsAlien(FFrame&, void* const)
native static function bool IsAlien(XGGameData.EPawnType PawnType);

But now I'm stuck. I doubt those functions are part of the Unreal native code considering their purpose. Any idea if I've missed something ?

 

Thanks!

Link to comment
Share on other sites

  • Replies 86
  • Created
  • Last Reply

Top Posters In This Topic

@ fogia 99: I cannot give you a technical explanation about why this unaccessible, I can just say that so far we've been unable to access native functions. Function signature suggests it's written in C++, not UnrealScript.

Link to comment
Share on other sites

My best understanding is that the 'native' functions are implemented in XcomGame.exe, not any of the upk files. This makes them inaccessible via UE Explorer. There are some key code parts that would be VERY useful to have access to. So far I've either had to abandon ideas or try and find clever workarounds.

Link to comment
Share on other sites

Native functions are written in C++ which is compiled to the GAME.exe file.

 

UE Explorer outputs a comment above the function's declaration indicating what it might be called in the Export table of the .exe file, though this could be inaccurate in some games.

 

For example: "// Export UXGGameData::execisHuman(FFrame&, void* const)"

Says the C++ name is execIsHuman, you could try look for that with a reverse-engineering tool.

Edited by EliotVU
Link to comment
Share on other sites

  • 3 weeks later...

I have a suggestion for a future version of UE Explorer.

 

Currently the integretion between the decompiled code and the hex code is somewhat weak, in terms of being able to associate hex code with particular lines of decompiled code. The only way to access the hex code is through the hex browser, which requires scanning through potentially large blocks of hex code trying to find a particular start value. The color coding and underlining make this much easier - thank you for that!

 

However, I've taken to associating specific sub-blocks of hex code with each line, and indenting the results. This makes it much easier to make larger scale changes and to update the jump offsets (the new View Tokens view is fantastic in making this process easier).

 

here is an example of a function I've broken down in this manner:

 

XComGame.upk >> XGBattleDesc.InitAlienLoadoutInfos

 

 

original hex broken down:

header:
25 A0 00 00 50 55 00 00 00 00 00 00 0E A0 00 00 00 00 00 00 00 00 00 00 10 A0 00 00 00 00 00 00 24 01 00 00 3F 2B 00 00 CC 04 00 00 18 03 00 00
body:
PlayerIndex = 0;
0F 00 10 A0 00 00 25
if(PlayerIndex < 4)
07 C9 04 96 00 10 A0 00 00 2C 04 16
if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 16)
07 51 00 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 10 16
return nothing
04 0B
else
06 BB 04
if(m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam == 0)
07 BB 04 9A 38 3A 35 96 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 38 3A 24 00 16
m_arrTeamLoadoutInfos[PlayerIndex].m_eTeam = 16;
0F 35 96 9F 00 00 98 9F 00 00 00 01 1A 00 10 A0 00 00 01 BF 9F 00 00 24 10
if(!m_bUseAlienInfo)
07 BF 03 81 2D 01 A3 9F 00 00 16
iAlienPods = 0;
0F 00 0F A0 00 00 25
if(iAlienPods < m_kAlienSquad.arrPods.Length)
07 BC 03 96 00 0F A0 00 00 36 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16
if(m_kAlienSquad.arrPods[iAlienPods].eMain != 0)
07 DA 01 9B 38 3A 35 36 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eMain, m_kAlienSquad.arrPods[iAlienPods].eMainAltWeapon));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 36 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 33 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16
if(m_kAlienSquad.arrPods[iAlienPods].eSupport1 != 0)
07 C4 02 9B 38 3A 35 35 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport1, m_kAlienSquad.arrPods[iAlienPods].eSupport1AltWeapon));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 35 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 32 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16
if(m_kAlienSquad.arrPods[iAlienPods].eSupport2 != 0)
07 AE 03 9B 38 3A 35 34 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 38 3A 24 00 16
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(m_kAlienSquad.arrPods[iAlienPods].eSupport2, m_kAlienSquad.arrPods[iAlienPods].eSupport2AltWeapon));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 7D 00 1B 82 0D 00 00 00 00 00 00 35 34 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 35 31 00 00 00 38 00 00 00 00 00 10 00 0F A0 00 00 35 3B 00 00 00 3C 00 00 00 00 00 01 AE 9F 00 00 16 16
++ iAlienPods;
A5 00 0F A0 00 00 16
goto J0xC5; // [Loop Continue]
06 C5 00
else
06 B8 04
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodLeaderType)));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8C 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iPodSupporterType)));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 8B 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16
m_arrTeamLoadoutInfos[PlayerIndex].m_arrUnits.AddItem(BuildAlienContent(byte(m_kAlienInfo.iRoamingType)));
55 35 97 9F 00 00 98 9F 00 00 00 00 1A 00 10 A0 00 00 01 BF 9F 00 00 2A 00 1B 82 0D 00 00 00 00 00 00 38 3D 35 88 9F 00 00 93 9F 00 00 00 00 01 9E 9F 00 00 4A 16 16
goto J0x4C9; // [Explicit Break]
06 C9 04
++ PlayerIndex;
A3 00 10 A0 00 00 16
// [Loop Continue]
goto J0x0B;
06 0B 00
return nothing
04 0B
endofscript
53

 

The formatting isn't quite as clean above as it is in my text editor, but I think you can see the design.

 

It seems to me that UE Explorer might already have a lot of the information associating each line with its hex code. A display that could present something like the above would be fantastic.

 

As always, thank you for all your work on this great tool. I wouldn't be anywhere in modding XCOM without it.

Link to comment
Share on other sites

Glad you find it useful!

 

How about this?

 

http://img571.imageshack.us/img571/2108/5bb089aca83246688e296bb.png

 

I also updated the Hex Viewer to highlight selected and hovered tokens. The pink is a JumpIfNot token's content, then the more purple/pink color is the IntConstToken's content.

 

http://img189.imageshack.us/img189/9682/45b882ba6e6c48ddaa4bd73.png

Edited by EliotVU
Link to comment
Share on other sites

Been working on an awesome new feature!

 

Before:

http://img442.imageshack.us/img442/1718/lgt150b.png

 

After:

http://i.imgur.com/INZFUzZ.png

Noticed what it is? If not, it is now possible to edit within the Hex Viewer, save(permanently no dialog), and see the changes instantly without clicking anything but Ctrl+D to force-deserialize!

Link to comment
Share on other sites

Hi Eliot, it's great to see you're still about and continually making improvements to your excellent tool. I've made a donation as a token of thanks for your work :smile:

 

I like the sound of all the additions you've mentioned above. Have you managed to squash the bugs I mentioned in this thread, particularly the file locking problem? I've still been using 1.2.0.0 because of this issue in 1.2.2.1 and haven't been able to make use of the improvements in that version.

 

Again, thanks for all your efforts and keep up the good work! :smile:

Link to comment
Share on other sites

Hi Eliot, it's great to see you're still about and continually making improvements to your excellent tool. I've made a donation as a token of thanks for your work :smile:

 

I like the sound of all the additions you've mentioned above. Have you managed to squash the bugs I mentioned in this thread, particularly the file locking problem? I've still been using 1.2.0.0 because of this issue in 1.2.2.1 and haven't been able to make use of the improvements in that version.

 

Again, thanks for all your efforts and keep up the good work! :smile:

 

Hey, thanks for the donation, it's great to know people find my tool worthy a donation :smile:

 

Yes, I've fixed the issues, although the closing isn't fixed, I have put in a hack so it'll just play nice with other tools, so in a way it is fixed but not a true fix, but to the end-users that doesn't matter.

 

Resolved Issues:

  • 1. Streams now play nice together with other processes
  • 2. Not fixed(Virtual size problems are not indicated as you described)
  • 3. Not resolved(Links still don't open, no idea why, haven't looked into it yet!)
  • 4. Resolved(Replaced hyphens with spaces)
  • 5. Resolved(Paths are fully displayed)
  • 6. Resolved(Allow multiple instances using -newwindow commandline argument) (Single-instance is an intended feature by default)
  • 7. Not resolved(Minimum size is still at the minimum possible size the interface is designed for)
  • *. Dozen of fixes and improvements.

 

Also you are welcome to submit issues at https://bitbucket.org/eliotvu/ue-explorer/issues or view known issues and resolved issues. You can submit issues without registering if desired!

Edited by EliotVU
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...