dreadylein Posted October 20, 2012 Share Posted October 20, 2012 (edited) would use tables from the september 2011 sdk, this is what there engine is based of The tables are in the UE Explorer directory under Native Tables Edited October 20, 2012 by dreadylein Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 (edited) 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.NTLor, 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 October 20, 2012 by kanet32 Link to comment Share on other sites More sharing options...
dreadylein Posted October 20, 2012 Share Posted October 20, 2012 isnt ue explorer written in c# ? :o Then we could peek to see how it use the the other bytes Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 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. Link to comment Share on other sites More sharing options...
Daemonjax Posted October 20, 2012 Share Posted October 20, 2012 (edited) 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 October 20, 2012 by Daemonjax Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 Actually, I don't have the job; Dreadylein's already taken care of it! Dreadylein's also worked out some more detail on the NTL format, so you might want to wait a bit before trying to write that parser. Link to comment Share on other sites More sharing options...
tbkiah Posted October 20, 2012 Share Posted October 20, 2012 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 More sharing options...
dreadylein Posted October 20, 2012 Share Posted October 20, 2012 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 functions02 for operators03 pre increment operator04 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 More sharing options...
Daemonjax Posted October 20, 2012 Share Posted October 20, 2012 (edited) [operator name] [operator precedence] [format] [bytecode] Format can be:01 for functions02 for operators03 pre increment operator04 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 October 20, 2012 by Daemonjax Link to comment Share on other sites More sharing options...
dreadylein Posted October 20, 2012 Share Posted October 20, 2012 nice :)This will make everything a good bit easier Link to comment Share on other sites More sharing options...
Recommended Posts