XeNTaX
http://forum.xentax.com/

Game Engines Filetypes Reverse Engineering
http://forum.xentax.com/viewtopic.php?f=29&t=17276
Page 1 of 1

Author:  lolbas [ Thu Nov 09, 2017 9:36 pm ]
Post subject:  Game Engines Filetypes Reverse Engineering

Since a while I am keen on trying to use game files somewhere outside of the game. While most of the formats are unique per game engine, for less popular or new games there is a necessity to write your own format parser. This can be very exhausting when working alone, especially for those who are not very familiar with format subject. It would be great if several people could collaborate on parsing particular file type. For this purpose I've create GitHub repository to gather information about different file format used by different games. There is not much info there yet, but I really do hope people will contribute.

Repository: https://github.com/lOlbas/Game-Engines-Filetypes-Reverse-Engineering

Please, refer to the README file for more information.

Author:  PredatorCZ [ Fri Nov 10, 2017 12:15 pm ]
Post subject:  Re: Game Engines Filetypes Reverse Engineering

Uh-oh, I don't think storing samples aswell is a great idea, they are copyrighted material.
IF your github gets bigger overtime, then having all those sample files from different games can be dangerous.
If you have script then why do you have samples?
When end user needs, then he will download only template/script, he don't need sample files since he already have extracted files, he needs.

Author:  lolbas [ Fri Nov 10, 2017 12:34 pm ]
Post subject:  Re: Game Engines Filetypes Reverse Engineering

PredatorCZ wrote:
they are copyrighted material

Good point, haven't thought of that.

PredatorCZ wrote:
If you have script then why do you have samples?

Well... For templates and scripts development it might be good to be able to store samples somewhere just like scripts itself. Also, for those who are just curious to RE, they might not be aware of where to get those files. Another good point is to add a list of games which contain this or that file.

Author:  voidapex [ Mon Nov 20, 2017 2:56 pm ]
Post subject:  Re: Game Engines Filetypes Reverse Engineering

Hello,

i'm new to reversing game engine models.
i've tried to reverse the ".smd" data file of the game Path of Exile, but it cannot get it to extract all information properly.
I've also tried to export it through noesis plugin "fmt_PoE_sm.py", but it fails to encode the meshdata bytearray.

i would really appreciate it if any of the xentax community professionals could take a look on these files.

Image

I have zipped the files and uploaded it to my webspace.

PoEMonsterVoll.zip


here is the 010 template for the .smd data structure (not created by me, not final and does not fully work)

Code:
typedef struct (int size) {
    wchar_t data[size/2];
} STRING_BLOCK <read=ReadBlockBytes>;

string ReadBlockBytes(STRING_BLOCK &block) {
    local string s;
    SPrintf(s, "%s",  block.data);
    return s;
};

struct FILE {
    struct HEADER{
        byte version <format=hex>;
        uint numIdx;
        uint numVert;
        byte prop_0;
        byte numMeshes;
        byte prop_2;
        uint totalStringLength;
        float boundingBox[6];
        struct MESH {
            uint meshNameLen;
            uint meshUnkProp;
        } mesh[numMeshes];
    } header;

    struct STRINGS {
        local int i <hidden=true>;
        for ( i = 0 ; i < header.numMeshes; i++ )
        {
            STRING_BLOCK data(header.mesh[i].meshNameLen) <open=suppress>;
        }
    } strings;
   
    ushort indexBuffer[header.numIdx * 3]; 

    struct VERTEX{
        float x <bgcolor=0xC0F0C0>, y <bgcolor=0xC0F0C0>, z <bgcolor=0xC0F0C0>;
        byte unk0[8];
        hfloat u <bgcolor=0xA0D0A0>,v <bgcolor=0xA0D0A0>;
        byte boneIndex[4] <bgcolor=0xF0D0A0>;
        byte unk1[4] <bgcolor=0xA0D0F0>;
    } vertex[header.numVert];

} file;



Regards

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/