COBJ, ENCH (possibly more?) unexpected KSIZ + KWDA subrecords

Issue #34 new
Sabrina created an issue

Patched or copied constructible objects and enchantments are exported with an unused KSIZ and KWDA subrecord. It has no real effect in-game that I'm aware of, but if opened with TES5Edit this error is shown.

tes5edit-error.png

Caused by something in this commit, but I'm not sure what. Reverting the commit solves the issue.

Comments (2)

  1. Daria Tynan repo owner

    COBJ shouldn't have keywords and I've fixed that.

    While tesvedit doesn't support keywords on ENCH records skse has them (as it inherits MagicItem the shared parent to ALCH, ENCH, INGR, SPEL, and SCRL). It bears investigation if you add keywords to an ENCH if skyrim will load them. This should be easy to test by calling the papyrus hasKeyword or getNumKeywords on an edited ENCH.

    The commit in question changed KeywordSet to not check KSIZ for validity and set it to the number of keywords (as a fix for mods with incorrect KSIZ counts) but this means records with uninitialized KeywordSets will export a KSIZ of 0 and an empty KWDA. That would be easily fixed by only exporting if there are keywords but I seem to recall that some records require a KSIZ/KWDA pair even if there are no keywords. There's not currently a way to specify that in skyproc that I know of so I took the simplest way to work around that. If you are able to verify with the tesvedit team that that is never the case I can change it to only export if there are keywords. Otherwise I'm going to leave this as a harmless bug that's more effort to solve than its worth.

  2. Log in to comment