A few more checks for Tools > Check > For Corrupted Files #170
Replies: 6 comments
-
I can certainly implement such a check. But wouldn't that produce a lot of noise? I can imagine there are many zeroed out offsets in the game resources? |
Beta Was this translation helpful? Give feedback.
-
What's the alternative of zeroed offsets to data blocks that don't exist? Pointing to the last byte of the file, even if that's pointing into some irrelevant structure? Pointing beyond the end of the file? Neither seem any better to me... |
Beta Was this translation helpful? Give feedback.
-
I did a first test, and the "noise" is mostly present in ARE resources where almost every unused offset is currently zero. |
Beta Was this translation helpful? Give feedback.
-
Usually you point it wherever such effects would normally be inserted. For effects that's typically between the memorization info and the item block in a creature file e.g. The danger here is an edge case, as evidenced by the Amber link above. Basically you need one of these junk offsets plus another mod trying to utilize them--in this case the second mod was intelligent and recognized it as a bad offset, because the alternative would have been inserting effects at the beginning of the file and corrupting it.
More stuff for the Fixpack, woo! In seriousness, thanks for checking on this. If it's an overwhelming number of false positives then it severely reduces the utility of the check. It's not currently structured to have the warning/error tabs you get for the dialogue checks, but perhaps that could be an alternative? |
Beta Was this translation helpful? Give feedback.
-
I don't think Warning tabs make sense for checking corrupted files. It's either valid data or corrupted data. Feature has been implemented, and it confirms my initial tests that only ARE resources produce a greater number of issues. There are also some issues with CHR files. But I don't think there is anything we can do about it since they are created by the game engine itself. The feature can already be tested in the Nightly Release. |
Beta Was this translation helpful? Give feedback.
-
See, I'm over wasting time in Discord while you're quietly knocking this out. Cheers! |
Beta Was this translation helpful? Give feedback.
-
I typically run most, if not all, of NI's checks when I start maintenance of a new mod, as it saves all sorts of troubles down the line. This came up in the context of Amber: long story short, a pair of creature files listed offsets as zero. The files worked as the associated counts were also zero, but this could (and in this case did) cause problems down the line as other mods seek to read or add info to these fields.
To that end, I'd like to propose an additional series of file checks a part of this process. I'd like NI to flag (either as error or warning) any file which has offset fields pointing to the 'static' part of a file type, e.g. in this particular case these would have been flagged as being in the header (value < 0x2d4) of a CRE v1.0 file.
If it helps here are the lengths of the headers of the current file types available for this check:
Beta Was this translation helpful? Give feedback.
All reactions