Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[PC] Darkened Skye. Help with reversing a .GRP file of unknown file structure.

Featured Replies

I'm a beginner attempting to understand and begin reversing a file format from an old game with extremely little information about its development. As far as I can find the filetype is either unique or masked. I have attempted to form some of the models with modelresearcher and got some of the vertices correct but couldn't get any face information to work properly. I've never attempted this before and have been following some of the guides here and got some help on xentax a long while ago before its closure. Would appreciate if anyone could point me in the right direction or give some insight into the files, I haven't got the strongest idea of what I'm looking for and I'm not exactly sure what to provide here so I will attach various files that I've been attempting to make some progress in.

Zip folder contains:

Armor.GRP, the only one I've gotten a little progress on, I think the file contains the model, textures, and animations as well so could be tricky to work with. I have attached a screenshot of the progress I got on this one
Catapult.GRP, just another model I think also contains textures and animations
FoodMerchant.GRP, another model to compare with the others
Empty.GRP, strange empty model I found. Could maybe be used to determine some structure of the file format by comparing with the others but I'm not sure if that would be helpful
 

armorss.png

files.zip

Edited by fieldnoted
Correction for rule 13

Solved by Durik256

  • Supporter

For me it looks okay (some superfluous faces, though):

edit: well, if you delete them some essential seem to vanish, too...

 

GRP-Armor.png

Foot/leg after having deleted dozens of faces:

 

wrongFaces.png

Edited by shak-otay

  • Author

Thank you for the quick reply, are you using hex2obj? I tried it but couldn't get the face count correct. Also I'm not sure why the faces problem occurs, has something similar happened before?

  • Supporter
9 hours ago, fieldnoted said:

Thank you for the quick reply, are you using hex2obj? I tried it but couldn't get the face count correct. Also I'm not sure why the faces problem occurs, has something similar happened before?

Yep, hex2obj. But shouldn't make a difference. I used face index count of 1716*3, so 1716 faces, too. Problem occurred a 100s of times. (On Xentax Bigchillghost usually solved  them;-)

edit: this time it's rather simple. Comment out each 2nd face line like so:

f 8 9 1 
#f 3 2 1 
f 11 9 10 
#f 5 2 4 

...

 

Armor_grp.png

hex2obj_armorGRP.png

Edited by shak-otay

  • Supporter

What a surprise. Well, I don't like being fooled. I'm off for now here...

except for this one:

 

catapult.png

Edited by shak-otay

  • Author

With Catapult.GRP I think the vertices begin at offset 0x3c0dc but I can't seem to track down where they might end as they don't seem to end in a similar manner to Armor.GRP

  • Supporter

Here's a little struct to get at least one model. Still not sure how are UV stored. And same for vertices.

If you want output it to object just remove two slashes at all "Printf" functions. Also on last line.

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
LittleEndian();OutputPaneClear();
local string FileName=GetFileName(),FilePath=FileNameGetPath(FileName,true),BaseName=FileNameGetBase(FileName,false);
local uint32 i,j,k,l;
struct MainInfo {
    byte Sign[4];
    uint32 Null;
    uint32 FileSize;
    uint32 TexCount,TextureInfoOffset,MdlCount,VtxInfoOffset,Unknown_4,Unknown_5,Unknown_6,Unknown_7;
};

struct TextureInfo {
    uint32 Flag;
    char TextureName[24];
    uint32 TexWidth,TexHeight,Unk_2,RawDataSize,Unk_4,Unk_5,Unk_6,Unk_7,Unk_8,Unk_9,Unk_10,Unk_11,Unk_12,Unk_13;
    uint16 Unk_14,Unk_15;
};

struct VertexInfo {
    for (i=0; i < mainInfo.MdlCount; i++)
    struct BufferInfo {
        uint32 Null;
        uint16 IdxCount,VtxCount,Unk_2,Unk_3;
        uint32 IdxBufferOffset,UvIdxOffset,VtxBufferOffset,
        Unk_7,Unk_8,Unk_9,Unk_10,Unk_11;
        }bufferInfo;
};

struct Vertices {
    float PosX,PosY,PosZ;
    //Printf("v %f %f %f\n",PosX,PosY,PosZ);
};

struct UnitVector {
    float PosU0,PosV0,PosU1,PosV1;
    //Printf("vt %f %f\n",PosU0,PosV0);
};

struct Indices {
    int16 F0,F1,F2,F3,F4,F5;
    //Printf("f %d/%d/%d %d/%d/%d %d/%d/%d\n",F0+1,F0+1,F0+1,F1+1,F1+1,F1+1,F2+1,F2+1,F2+1);
};

MainInfo mainInfo;

FSeek(mainInfo.TextureInfoOffset);
TextureInfo textureInfo[mainInfo.TexCount];

FSeek(mainInfo.VtxInfoOffset);
VertexInfo vertexInfo;

FSeek(vertexInfo.bufferInfo.VtxBufferOffset);
Vertices vertices0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.UvIdxOffset);
UnitVector unitVector0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.IdxBufferOffset);
Indices indices0[vertexInfo.bufferInfo.IdxCount]<optimize=false>;

//OutputPaneSave(FilePath+BaseName+".obj");

 

Edited by h3x3r

  • Author
15 hours ago, shak-otay said:

What a surprise. Well, I don't like being fooled. I'm off for now here...

except for this one:

 

catapult.png

Could you provide the offset and count of the face info you found for this file? I'm still having trouble with this one

  • Author
4 hours ago, h3x3r said:

Here's a little struct to get at least one model. Still not sure how are UV stored. And same for vertices.

If you want output it to object just remove two slashes at all "Printf" functions. Also on last line.

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
LittleEndian();OutputPaneClear();
local string FileName=GetFileName(),FilePath=FileNameGetPath(FileName,true),BaseName=FileNameGetBase(FileName,false);
local uint32 i,j,k,l;
struct MainInfo {
    byte Sign[4];
    uint32 Null;
    uint32 FileSize;
    uint32 TexCount,TextureInfoOffset,MdlCount,VtxInfoOffset,Unknown_4,Unknown_5,Unknown_6,Unknown_7;
};

struct TextureInfo {
    uint32 Flag;
    char TextureName[24];
    uint32 TexWidth,TexHeight,Unk_2,RawDataSize,Unk_4,Unk_5,Unk_6,Unk_7,Unk_8,Unk_9,Unk_10,Unk_11,Unk_12,Unk_13;
    uint16 Unk_14,Unk_15;
};

struct VertexInfo {
    for (i=0; i < mainInfo.MdlCount; i++)
    struct BufferInfo {
        uint32 Null;
        uint16 IdxCount,VtxCount,Unk_2,Unk_3;
        uint32 IdxBufferOffset,UvIdxOffset,VtxBufferOffset,
        Unk_7,Unk_8,Unk_9,Unk_10,Unk_11;
        }bufferInfo;
};

struct Vertices {
    float PosX,PosY,PosZ;
    //Printf("v %f %f %f\n",PosX,PosY,PosZ);
};

struct UnitVector {
    float PosU0,PosV0,PosU1,PosV1;
    //Printf("vt %f %f\n",PosU0,PosV0);
};

struct Indices {
    int16 F0,F1,F2,F3,F4,F5;
    //Printf("f %d/%d/%d %d/%d/%d %d/%d/%d\n",F0+1,F0+1,F0+1,F1+1,F1+1,F1+1,F2+1,F2+1,F2+1);
};

MainInfo mainInfo;

FSeek(mainInfo.TextureInfoOffset);
TextureInfo textureInfo[mainInfo.TexCount];

FSeek(mainInfo.VtxInfoOffset);
VertexInfo vertexInfo;

FSeek(vertexInfo.bufferInfo.VtxBufferOffset);
Vertices vertices0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.UvIdxOffset);
UnitVector unitVector0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.IdxBufferOffset);
Indices indices0[vertexInfo.bufferInfo.IdxCount]<optimize=false>;

//OutputPaneSave(FilePath+BaseName+".obj");

 

Wow thank you for this. I've not used 010 Editor before so forgive me if this is an issue on my end or a simple fix I can't see. In the Catapult.GRP file I run into the error "ERROR Line 58: Invalid array size in declaration."

And in the Armor.GRP file i run into the error "ERROR Line 24: Template passed end of file at variable 'Flag'."

 

EDIT: Just realised my mistake, I used Import hex instead of open file. Sorry for the bother.

Edited by fieldnoted

  • Author
4 hours ago, h3x3r said:

Here's a little struct to get at least one model. Still not sure how are UV stored. And same for vertices.

If you want output it to object just remove two slashes at all "Printf" functions. Also on last line.

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
LittleEndian();OutputPaneClear();
local string FileName=GetFileName(),FilePath=FileNameGetPath(FileName,true),BaseName=FileNameGetBase(FileName,false);
local uint32 i,j,k,l;
struct MainInfo {
    byte Sign[4];
    uint32 Null;
    uint32 FileSize;
    uint32 TexCount,TextureInfoOffset,MdlCount,VtxInfoOffset,Unknown_4,Unknown_5,Unknown_6,Unknown_7;
};

struct TextureInfo {
    uint32 Flag;
    char TextureName[24];
    uint32 TexWidth,TexHeight,Unk_2,RawDataSize,Unk_4,Unk_5,Unk_6,Unk_7,Unk_8,Unk_9,Unk_10,Unk_11,Unk_12,Unk_13;
    uint16 Unk_14,Unk_15;
};

struct VertexInfo {
    for (i=0; i < mainInfo.MdlCount; i++)
    struct BufferInfo {
        uint32 Null;
        uint16 IdxCount,VtxCount,Unk_2,Unk_3;
        uint32 IdxBufferOffset,UvIdxOffset,VtxBufferOffset,
        Unk_7,Unk_8,Unk_9,Unk_10,Unk_11;
        }bufferInfo;
};

struct Vertices {
    float PosX,PosY,PosZ;
    //Printf("v %f %f %f\n",PosX,PosY,PosZ);
};

struct UnitVector {
    float PosU0,PosV0,PosU1,PosV1;
    //Printf("vt %f %f\n",PosU0,PosV0);
};

struct Indices {
    int16 F0,F1,F2,F3,F4,F5;
    //Printf("f %d/%d/%d %d/%d/%d %d/%d/%d\n",F0+1,F0+1,F0+1,F1+1,F1+1,F1+1,F2+1,F2+1,F2+1);
};

MainInfo mainInfo;

FSeek(mainInfo.TextureInfoOffset);
TextureInfo textureInfo[mainInfo.TexCount];

FSeek(mainInfo.VtxInfoOffset);
VertexInfo vertexInfo;

FSeek(vertexInfo.bufferInfo.VtxBufferOffset);
Vertices vertices0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.UvIdxOffset);
UnitVector unitVector0[vertexInfo.bufferInfo.VtxCount]<optimize=false>;

FSeek(vertexInfo.bufferInfo.IdxBufferOffset);
Indices indices0[vertexInfo.bufferInfo.IdxCount]<optimize=false>;

//OutputPaneSave(FilePath+BaseName+".obj");

 

Wow this works amazingly for a lot of the models. Although some models still have completely messed up faces such as image.png.80c29e2cc2ec1f2690297ee0376a0f16.png

 

I have no idea what separates these models from the others so not a clue why the issue occurs. I'll attempt to just look for the face values myself in the hex and see if I can find any differences.

files.zip

  • Supporter
  • Solution

I made a plugin for Noesis, but I think you made it before me..

Also, for the test I looked at the animation, here the vertices are animated

bandicam 2023-12-15 13-43-15-998.gifbandicam2023-12-1615-27-53-529.gif.791975f1b62520909316512bacede435.gif

 

Edited by Durik256

  • Author
3 hours ago, Durik256 said:

I made a plugin for Noesis, but I think you made it before me..

Also, for the test I looked at the animation, here the vertices are animated

bandicam 2023-12-15 13-43-15-998.gif

bandicam 2023-12-15 13-46-45-659.gif

Hey this looks amazing. Might I ask where to fetch the noesis plugin? I've never used the software before.

  • fieldnoted changed the title to [PC] Darkened Skye. Help with reversing a .GRP file of unknown file structure.
  • 5 months later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.