Mutagen-Modding / Mutagen.Bethesda.Analyzers

A project to diagnose and analyze the health of a mod or a load order
GNU General Public License v3.0
14 stars 4 forks source link

Object Bounds NAM0(Min) and NAM9 (Max) Analysis #32

Open Deigue opened 3 years ago

Deigue commented 3 years ago

NAM0 - Min (X, Y) and NAM9 - Max (X, Y) subrecords under WRLD (worldspace) records are a bit peculiar. These act differently from other sub-records that may conflict, in that the minimum X and minimum Y value for NAM0 is considered across all the mods in a given modlist. Similarly, the maximum X and maximum Y is what will win for NAM9. The game engine merges this at run time and makes the minimum/maximum value win, rather than the last plugin in the load order like for almost every other Record. This is of interest because these fields are not uncommon to have wild-edits while playing around in the Creation Kit, and if a certain patch brings the NAM0 down with a more min or NAM9 with a higher value, then this means that many more cells are generated for that worldspace.

Even though this does not cause CTD, it has caused misalignment on things such as scale-based paper map markers which tries to render map markers based on drawn cells on the world map. Furthermore, these cannot simply be patched, and needs to be corrected explicitly in the plugin that introduces it, because of the way it works. An analyzer to detect and log these would probably be useful, with potentially flexibility to add known plugins that are meant to change these values deliberately ...