Mutagen-Modding / Spriggit

A tool to facilitate converting Bethesda plugin files to a text based format that can be stored in Git
GNU General Public License v3.0
88 stars 10 forks source link

[BUG]: Spriggit.CLI does not include the number of records #69

Closed MissCorruption closed 1 week ago

MissCorruption commented 2 months ago

When serializing a light plugin the number of records and the next FormID are not serialized correctly, they are missing from the RecordData.yaml. An example is here

This causes plugins that are de-serialized with that input to be treated as dummy plugin. Likewise, editing the RecordData.yaml to include the NumRecords and NextFormID fields does not carry them over to the de-serialized ESP.

The current fix is to open the ESP in xEdit, remove the ESL flag and add it again. As for NextFormID, renumber the FormIDs using xEdit to fix that as well.

Noggog commented 2 months ago

See if this persists in the upcoming v0.25. Reopen if you see it after upgrading

I did a test on my end locally, and the (still unreleased) v0.25 is doing better: image

It is intentional that the number of records and next formID is NOT serialized into the spriggit info. It's "derivative" data that spriggit calculates when writing the esp. (this was to help avoid unnecessary merge collisions on unintersting data #52 #72)

MissCorruption commented 4 weeks ago

Upon closer inspection the record number was one off for my ESP, Spriggit saved it as 1, but CK then corrected it to 2. Using Spriggit version 0.26

Noggog commented 3 weeks ago

Thanks for the update. Can you upload the file in question? Can PM me if you dont want to upload it here or somesuch.

Otherwise, can you tell me which record you think it's "not counting" in the sum?

Lastly, I don't think this is related to it being a Light master. is there any indication that it works if it's not Light? I think it's unrelated to the master style, and is just a record counting bug in Mutagen

MissCorruption commented 3 weeks ago

Appreciate the concern, but my mod is open source anyway. Attached is an ESPFE that has the correct form number. Serializing & de-serializing it causes the Form Header to show 1 instead of 2, notable by CK complaining about it when loading the plugin.

As for which record isn't counting, I'm unsure. Potentially the file header itself counts as record?

It most likely is unrelated to the master style, I just assumed it was light specifically, as no other reports were made, my apologies. QuickLootIE.zip

Noggog commented 3 weeks ago

https://github.com/Mutagen-Modding/Mutagen/issues/544

Noggog commented 1 week ago

Updated some of the count logic in Mutagen. Reopen if you notice any other count desyncs!