Exporting Blender model in .odr and .mesh format (Gims Evo for Blender)

I wanted to make an exporter for .odr files, a format that OpenIV can use to convert to .ydr. I have a 3DS Max script that does this, and was wondering where to start to make a plugin for Blender.

I could use 3DS Max, but I have thousands of models that I need to convert, and I am currently exporting them form Blender in .obj format. Making a Blender plugin would allow me to export correct format directly from Blender.
The 3DS Max program that does this is called GIMS Evo.

(Source code available on GitHub, not my script. GitHub license allows distribution and modification if changes are stated. GitHub source is in 3DS Max encrypted format, I am providing decrypted version)
03_MAXFactory.ms (142.0 KB)
EGIMS_V_Model.txt (10.5 KB)