Ok, I looked at the xac file using chrrox's maxscript for reference, and it's the typical chunk-based format.
One problem I see is the material chunk. There might be an extra struct afterwards which doesn't follow the proper chunk-based format for whatever reason (maybe they just hacked it in lol).
Anyways this is how I handled the materials in DK online:
Code: Select all
def parse_material(self):
self.inFile.read('16f')
power = self.inFile.readFloat()
self.inFile.read('4f')
matName = self.read_name()
#stuff in DK online
unk = self.inFile.readFloat()
while unk == 1:
self.parse_material_extra()
unk = self.inFile.readFloat()
else:
self.inFile.seek(-4, 1)