Skip to content

Implement TestModels (T3D) console command

OpenMW already implements the TestCells and TestInteriorCells console commands from Morrowind.exe, but not the TestModels command. The cell test commands are already very useful for modmakers, particularly large projects with lots of game assets and IDs to keep track of. I think that the TestModels command would also be useful.

According to Hrnchamd, this is what TestModels does in Morrowind.exe:

It checks if the model file exists for all objects. There are checks for model file existence, and scans the nif for NiRawImageData, but doesn't actually use the NIF loader. That means it detects missing files but not invalid NIFs.

Simply reporting a list of missing meshes, as described, would be very helpful. But I certainly would not complain if OpenMW had an implementation of TestModels which actually did load and check every nif. At present I am only able to find out (using TestCells and TestInteriorCells) about issues like out of bounds UVs or improperly attached RootCollisionNodes for meshes with existing cell references.