Quote:
Originally Posted by Anvart
Where full template of parsing? ![Hmmm](images/smilies/39.gif)
...
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... ![03](images/smilies/03.gif)
|
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
![](images/smilies/icon_mad.gif)
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.