emoose/MBINCompiler

MBIN serializer broken?

emoose opened this issue · 4 comments

Noticed that I commented out part of the recompileFiles test which compares the decompiled exml of the recompiled mbin with the exml of the original, just uncommented it and it fails straight away on the first file, METADATA\SIMULATION\SPACE\AISPACESHIPMANAGER.MBIN

The structure is all there, but the values of the strings are blank. The remade MBIN is also only 0x60 bytes, so there's definitely something wrong here.

Making this to remind myself to look into this tomorrow, if anyone wants to try helping in the meantime be my guest.

GcAISpaceshipInstanceData.cs contains the field public string File which is using the NMSAttribute.
Currently, the NMSAttribute is ignored while deserializing exml.

I fixed this in #50.

It shouldn't be getting ignored, I already pushed a fix for that a few commits ago: bdb37d9#diff-53c1d1d10f57a89a0704071f7b08e3e7R72

EDIT: Oh sorry I'm too tired lol, your right, it looks like it's still ignored when deserializing from exml to mbin, I'll take a look at your p/r now.

Looks like that fixed it @Bananasft, nice work.

There's still some issues with templates that use GcAudioWwiseEvents though, some reason the value inside GcAudioWwiseEvents is being set to 0 after being recompiled, might be an issue with the xml deserializer.

Ah the DeserializeEXml method didn't support unsigned fields, easy fix: 0977e1c

That about does it, tests seem to run fine for me now 💯 💯