lslib icon indicating copy to clipboard operation
lslib copied to clipboard

May I know where to start on parsing D2R file?

Open Ifurzzar1 opened this issue 2 years ago • 2 comments
trafficstars

Hi Mr.Norbyte, Sorry posting the request here, but github doesn't have a message system.... I just saw one of the old issues where you added the support for Diablo2 Resurrected GR2 model. I have been wanting to import D2R model into blender by writing a plugin myself, I think first step is I need to figure out how to parse GR2 format, but I do not know where to start, can you pls tell me where I can find some documentation or reference or even sample codes on parsing GR2 format? great great thx if you can give me some directions!

Ifurzzar1 avatar Mar 24 '23 14:03 Ifurzzar1

Hi,

The GR2 format is proprietary and as far as I'm aware there is no public documentation for it anywhere. The way the format works is that most of the data structures are the same across all games, and there is a small subset that contain game-specific data, which is usually what you need to be able to write to add support for a specific game. The GR2 file also has a "metadata" section that essentially describes what each structure within the file looks like, so you don't really need to guess.

The code I have for reading/writing GR2 is all here: https://github.com/Norbyte/lslib/tree/master/LSLib/Granny/GR2

Norbyte avatar Mar 25 '23 13:03 Norbyte

A lot of thx Sir Norbyte! hope I can generate something useful within 1 year(I am not an efficient programmer haha)

Ifurzzar1 avatar Mar 27 '23 09:03 Ifurzzar1