Jump to content

Beyond DefaultGameCore.ini - Analyzing the Game Scripts


Beknatok

Recommended Posts

  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

Like I said, they're in the UE Explorer directory. If you have UE Explorer installed, it's:

 

Program Files (x86)\Eliot\UE Explorer\Native Tables\NativeTablesList_UT3.NTL

or, probably a better choice:

Program Files (x86)\Eliot\UE Explorer\Native Tables\NativeTablesList_UDK-2011-08.NTL

 

Open them up in a hex editor, and you'll see a bunch of stuff like:

 

3D 3D 18 02 9A ==..š

 

The 3D 3D is the operator (in ASCII). The 18 02 I'm not sure about, but there's always a couple characters after each operator or native function. I think they have to do with what type and number of parameters are allowed to follow it? And then the 9A is the bytecode.

 

== (and a few other operators) appear twice, once at the very top, and once a bit further down. I'm not sure why, but I bet it has to do with those middle two bytes that I don't understand yet. So when we're compiling a list of these we should include both possible bytecodes. (9A and F2 in the case of ==.)

 

EDIT: Aaaand Lein beats me to the punch again ;). Good to know about the SDK, I changed the filename in this post to reflect that.

Edited by kanet32
Link to comment
Share on other sites

Ah, good point. Tonight, if nobody else has done it, I'll get in there with dotPeek and take a look. The source code for that UnrealScript decompiler is probably also worth checking.

 

Awesome, you've got the job. :D

 

Also, thanks for the information guys! I can write a parser in java for those NTL files pretty quick!

 

UPDATE: I'll have to tweak the file it by hand first, since the format isn't entirely consistent.

Edited by Daemonjax
Link to comment
Share on other sites

 

 

Great find, man!

 

But what the code actually does:

 

if item category is NOT category 3, or it's a aircraft weapon, the time to build is 0 hours. :D

 

 

I'll look at it, and try to come up with a mod that'll work.

 

Honestly, i didn't even look at the code itself when i copy/pasted the info... I had seen it a few days ago and just kinda threw it out there off the top of my head... I initially had completely different code in the code box. So i knew what the code did after i read it, but i never actually changed the words in my post.

Link to comment
Share on other sites

Well, after a quick peek on ue explorer and some chattering with kanet32 we came up with the following Informations about the NTL files.

 

Every entry in the table seems to have the following format:

 

[operator name] [operator precedence] [format] [bytecode]

 

Format can be:

01 for functions

02 for operators

03 pre increment operator

04 post increment operator

 

Example done by Kanet32

 

02 3D 3D 18 02 9A

 

The size of the operator name is 02 bytes, then the operator name is 3D 3D ("=="), then the precedence is 0x18, the format is 0x02, and the bytecode is 0x9A.

 

The operator precedence seems to be used to make a workorder where a lower value means a higher precedence (we arent realy sure about this yet)

 

 

A last little note, kanet32 stumble over something pretty hilarious, there seems to be like 8 different bytecode for the same operator , we dont know why, atm we just think its for backwards compatibility.

Link to comment
Share on other sites

[operator name] [operator precedence] [format] [bytecode]

 

Format can be:

01 for functions

02 for operators

03 pre increment operator

04 post increment operator

 

Looks right.... with 0x00 for padding afterwards. Thanks!

 

atm we just think its for backwards compatibility.

 

I came to the same conclusion while hand editing the ntl file for human readability. Almost done, btw.

 

EDIT: I should probably just stop and write a java program to do it.

Edited by Daemonjax
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...