View Single Post
Old 10-11-11, 01:06 PM   #61
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Anvart View Post
Where full template of parsing?
...
I agree, it's easier at once to write code in C ... C#...
but the template will help to other modders (programmers) to write better code... may be...
I fully agree with a full template helping other modders. The problem is you can't exactly write a full template due to the way the pointers work. You can't define the materials section until you know what all the pointers for the materials are doing. This is because some materials can have textures, no textures, or reference another material. I ran into this block when updating the template trying to define the materials. I couldn't write a 'template' for them that worked because I needed to know what the pointers for them did I had a template for the materials section that worked on one file but when tried on another file was totally hosed. Reason is due to not knowing what the pointers for that section said.

There is another problem with writing a full template and that deals with the art tool info section. All the names listed in the art tool info section is not the full list of names. Duplicate names are not put into this list BUT the pointers for the art tool info section will reveal that multiple names are being used. Hard to write a template for that.

These GR2 files are dynamic in nature, they are not static like .dat files. One can write a parser that reads a .dat file from start to finish very easily. This is not so with the GR2 files. There is a defined structure (that is dynamic in nature from file to file) in the GR2 file.

Last edited by TheDarkWraith; 10-11-11 at 01:37 PM.
TheDarkWraith is offline   Reply With Quote