Staredit Network

Staredit Network -> Modding Assistance -> [Other] GRP Format
Report, edit, etc...Posted by Pie_Sniper on 2006-09-30 at 01:11:45
I haven't been able to find the GRP format anywhere, so I decided to figure it out myself.

I've spent about half an hour trying to work out the format of GRP files with a hex editor. Here is what I've found:
  • The first byte is the number of frames.
  • The second byte is just a continuation of the first, I believe, for if there were ever more than 255 frames.
  • The third byte is the X size of the frames.
  • The fourth byte is like the second byte, for if there was a file with an X size of more than 255.
  • The fifth byte is the Y size of the frames.
  • The sixth byte is like the fourth and second.
Now here is where I'm not exactly sure. Does the GRP contain a mini palette of all the colors it uses in the image? I would think it follows a format of:

[Pixels of the following color][Index color]

But I'm not exactly sure where that would start. Will the number of pixels be kept to a single row or does it go on to include all the rows of that color? Is there a separation between frames or does it just do this based on the X/Y sizes?

Actually, I just made a two-frame all-black GRP and it doesn't seem to follow my idea for the colors. It repeats "AA 01" over and over again for some reason. huh.gif
Report, edit, etc...Posted by TERRAINFIGHTER on 2006-09-30 at 08:07:06
No, GRP files do not include the palette in them, it's loaded separately.

Instead, GRP files have indexed numbers, and those numbers point directly to the palette index number to color the GRP with.
Report, edit, etc...Posted by Ojan on 2006-09-30 at 08:53:26
People should look at Camelot Systems more often wink.gif

I don't know if it's flawless, but it should certainly provide you with a good starting point.
Report, edit, etc...Posted by BroodKiller on 2006-09-30 at 10:53:45
Google, first page of results for "GRP format starcraft": http://www.wotsit.org/search.asp?page=2&s=game

Whatever...
Report, edit, etc...Posted by Pie_Sniper on 2006-09-30 at 14:00:59
I can't believe I forgot about Wotsit. pinch.gif
Report, edit, etc...Posted by ShadowFlare on 2006-10-02 at 19:23:38
I've almost memorized the entire format. Maybe I'll write up my own spec sheet one of these days...
Report, edit, etc...Posted by Ojan on 2006-10-03 at 08:52:41
That would be awesome.

BroodKiller should also make his improvements to the CamSys .dat-specs :P


[edit=1]FOR THE LOVE OF ALL HOLY!!! I CAN'T STAND THE BLASTED SMILIES[/edit]
Report, edit, etc...Posted by BroodKiller on 2006-10-03 at 12:39:09
Yeah, I wanted to update them for quite some time already. Maybe I'll have time to do it after I'm back.
Next Page (1)