ME3Tweaks / LegendaryExplorer

Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
https://me3tweaks.com
GNU General Public License v3.0
125 stars 29 forks source link

Binary editor new Class: Class #9

Closed Kinkojiro closed 6 years ago

Kinkojiro commented 6 years ago

Template:

0x0 Unreal header (sequential to other headers in the class content) 0x4 Superclass
0x8 blank 0xC Object link for start of unrealscript tree 0x10 Unreal code unknown (mainly used by pawns/ai) 0x2C Local Function Table {Count [int] [Name, Object reference]} Following function table: 4 byte code unknown Core.Object Component table [this is primarily used by actors and other complex code] {Name (e.g. weapon, game etc} or None if empty Count [int] [Name, Object reference]} Following Component table: None Blank int Default__Class object Linked functions {Count [int], List of links Obj}

Mgamerz commented 6 years ago

Can you revisit this and let me know what's been done so far in Binary Editor for this, it's been there for some time, however I am not sure if i have implemented 100% of it. I think I've done the function table.

Mgamerz commented 6 years ago

I know this would be a pain, but if you could annotate an image and highlight the blocks of a simple class, it would be greatly appreciated, as I plan to add this to binary interpreter and hopefully binary relinker.

Right now binary interpreter reads Class backwards. so we can see the list of functions, the count, etc. However I need a more detailed document describing the layout of Class.

Kinkojiro commented 6 years ago

On EGM chat

Mgamerz commented 6 years ago

This is the format for classes in Mass Effect, Mass Effect 2, and Mass Effect 3 for technical documentation purposes.

Mass Effect, Mass Effect 2

These are 100% identical to each other in both games.

Unreal Unique Index (Int32) SuperClass Index (Int32 ObjectReference) Unknown1 (Int32) CompilingChainNextItem (Int32 ObjectReference) IgnoreMask (UInt64) LabelOffset (Int16) [UnrealScript Block. Ends with 10 consecutive FF's. It seems there is always at least 0x6 bytes before the FF's can start. ] StateMask (Int32) Local Functions Table Size (Int32)

Class Mask (Int32) 00 (Byte) - Seems to be a spacer or alignment, however during all my scans this is always present Outerclass (Int32 ObjectReference) Implemented Interfaces Table

Components Table Count (Int32)

Unknown2 (Int32) Unknown3 (Int32) Class Defaults Reference (Int32 ObjectReference)

Mass Effect 3

This is similar but not identical to the previous 2 games.

Unreal Unique Index (Int32) SuperClass Index (Int32 ObjectReference) Unknown1 (Int32) CompilingChainNextItem (Int32 ObjectReference) IgnoreMask (UInt64) LabelOffset (Int16) [UnrealScript Block. Ends with 10 consecutive FF's. It seems there is always at least 0x6 bytes before the FF's can start. ] StateMask (Int32) Local Functions Table Size (Int32)

Class Mask (Int32) Outerclass (Int32 ObjectReference) Components Table

Implemented Interfaces Table Size (Int32)

None NameReference (Int32, Int32) Unknown2 (Int32) Class Defaults Reference (Int32 ObjectReference) Full Functions Table Size (Int32)

There appears to be 8 bytes at the bottom after this that are also functions, like the size is -2 or something. I will need to look into this.