monkeyman192 / MBINCompiler

A tool for decompiling No Man's Sky .MBIN files to XML format
https://monkeyman192.github.io/MBINCompiler
Other
249 stars 49 forks source link

Versions from 1.59.0 pre2 on won't decompile some mbins #98

Closed MuteButtonHero closed 5 years ago

MuteButtonHero commented 5 years ago

Versions from 1.59.0 pre2 on won't decompile some mbins and give an error message instead. Version 1.59.0 pre1 gives the error message but does produce the EXML file. Version 1.58 does the decompile with no complaint.

This is the error message: [ERROR]: [MbinException]: Failed to read TkAttachmentData from MBIN.

I have found the following files affected so far: MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMALBUMEN\ENTITIES\PLANTINTERACTION.ENTITY.MBIN MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMBARREN\ENTITIES\PLANTINTERACTION.ENTITY.MBIN C:\SD1\Program Files\MNS-MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMDEADCREATURE\ENTITIES\PLANTINTERACTION.ENTITY.MBIN MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMGRAVITINO\ENTITIES\PLANTINTERACTION.ENTITY.MBIN

I suspect the rest of the files with the same name are also affected.

Can't seem to upload the log, so here it is C&P:

[VERSION]: MBINCompiler v1.63.0.1 [ARGS]: "C:\SD1\Program Files\NMS-XMM\Unpacked\MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMGRAVITINO\ENTITIES\PLANTINTERACTION.ENTITY.MBIN"

If you encounter any errors, please submit a bug report and include this log file. Please check that there isn't already a similar issue open before creating a new one. https://github.com/monkeyman192/MBINCompiler/issues

[INFO]: Auto-Detected --input-format=MBIN [INFO]: --input-format=MBIN --output-format=EXML

[ERROR]: [MbinException]: Failed to read TkAttachmentData from MBIN. [InvalidListException]: Invalid list read, magic 5F33315F expected xxxxxx01

[INFO]: C:\SD1\Program Files\NMS-XMM\Unpacked\MODELS\PLANETS\BIOMES\COMMON\INTERACTIVEFLORA\FARMGRAVITINO\ENTITIES\PLANTINTERACTION.ENTITY.MBIN [INFO]: MBIN version: 0.0.0.0 guid: 87068490DC83B1C1 template: cTkAttachmentData

 at libMBIN.NMSTemplate.DeserializeGenericList(BinaryReader reader, Int64 templateStartOffset, NMSTemplate parent)
 at libMBIN.NMSTemplate.DeserializeValue(BinaryReader reader, Type field, NMSAttribute settings, Int64 templatePosition, FieldInfo fieldInfo, NMSTemplate parent)
 at libMBIN.NMSTemplate.DeserializeBinaryTemplate(BinaryReader reader, String templateName)
 at libMBIN.NMSTemplate.DeserializeValue(BinaryReader reader, Type field, NMSAttribute settings, Int64 templatePosition, FieldInfo fieldInfo, NMSTemplate parent)
 at libMBIN.NMSTemplate.DeserializeList[T](BinaryReader reader, FieldInfo field, NMSAttribute settings, Int64 templateStartOffset, NMSTemplate parent)
monkeyman192 commented 5 years ago

gah!! Right after I make another release... smh. Will have a look now...

monkeyman192 commented 5 years ago

Oh, I see the problem. Thanks for finding some files which had a struct in it that i wasn't sure of... I must have guessed right the first time! Will have it fixed very soon

MuteButtonHero commented 5 years ago

Same for this one

GCTERRAINGLOBALS.GLOBAL.EXML

monkeyman192 commented 5 years ago

terrain globals works fine for me.

MuteButtonHero commented 5 years ago

Ok I have an EXML from a mod author that compiled up through 1.61 but breaks in 1.63. Yeah, it's not an official part of the game. And using an older version is a workaround. But here it is if you want to look at it (I had to rename it a .txt since I could not upload an .exml) BEACON.ENTITY.TXT

MuteButtonHero commented 5 years ago

Ok, I;ll look over terrain globals again and see if I have a wrong version or something.

MuteButtonHero commented 5 years ago

BTW, awesome work. :-)

MuteButtonHero commented 5 years ago

You are correct, I went back to the unmodded version of terrain globals from the latest release and it did both compile and decompile. So I'll track it down from there. Sorry, I made an assumption because the result looked similar.

monkeyman192 commented 5 years ago

Mbincompiler is not backward compatible. If you have an older file, always try use an older version.

monkeyman192 commented 5 years ago

also, that entity will probably have the same issue as others here. I think I have fixed it, just gotta test a little bit more to make sure I didn't break anything else but I'll push the update once it is done :)

MuteButtonHero commented 5 years ago

Thought I was. Turns out I failed to edit that file and thus update the version. My bad. So now I have done my update edit and it's all good now.

monkeyman192 commented 5 years ago

cool. Check out the most recent release: https://github.com/monkeyman192/MBINCompiler/releases/tag/v1.63.0-pre3 This should fix your problems with the entity files. I'll close this but post if there are still issues.

MuteButtonHero commented 5 years ago

I did a fresh extract of the game to make sure I was working with the latest files. So many rapid-fire updates lately it's hard to keep up. Anyway, I rechecked and the issues I was seeing before are resolved. Many thanks for your work on this.

monkeyman192 commented 5 years ago

haha, you are telling me! I wake up to find there is a new exe to decompile, it's tiring!! lol